Deploy CollabAI on Your Server – A Self-Hosting Guide

CollabAI is a powerful AI-enhanced collaboration tool designed to bring knowledge management, team productivity, and automation under one roof. Whether you want to build internal knowledge bases, create custom GPT-powered agents, or manage intelligent workflows, CollabAI has you covered.
This guide walks you through self-hosting CollabAI — from prerequisites to complete setup — so you can take full control of your data and environment.
🧠 What is CollabAI?
CollabAI is a two-part application:
-
Frontend (Client) – React-based UI for users and admins.
-
Backend (Server) – Node.js API handling authentication, AI interactions, database ops, and more.
It uses MongoDB for primary data storage and Pinecone for storing and querying vector embeddings for AI-based search and knowledge retrieval.
🌟 Use Cases
Here are just a few ways teams can benefit from CollabAI:
-
🔍 AI-Powered Knowledge Base: Upload documents, websites, or FAQs and use GPT to answer questions instantly.
-
💬 Smart Agent Assistants: Train AI agents with specific knowledge and deploy them within teams.
-
🛠 Internal Automation: Automate workflows like ticket responses or customer inquiries.
-
📊 Data-Driven Insights: Use vector similarity and semantic search to surface the right content at the right time.
✅ Prerequisites
Before starting, make sure you have:
-
✅ A Unix-based server (Ubuntu/Debian recommended)
-
✅ MongoDB (local or Atlas)
-
✅ A Pinecone account with:
-
API Key
-
Index for storing embeddings
-
-
✅ Node.js v20+ installed
-
✅ npm or yarn installed globally
📦 Step-by-Step Deployment
1. Clone the Repository
| git clone https://github.com/sjinnovation/CollaborativeAI.git |
Navigate to the project directory
| cd CollaborativeAI |
2. Set Up the Frontend
Navigate to the frontend directory
| cd client |
Run the below command to install node
| curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash |
Export the path
| export NVM_DIR=”$([ -z “${XDG_CONFIG_HOME-}” ] && printf %s “${HOME}/.nvm” || printf %s “${XDG_CONFIG_HOME}/nvm”)” [ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh” # This loads nvm |
Install the node version
| nvm install 20 |
Install the frontend dependencies
| npm install |
Create and Configure the Environment File:
| cp .env.sample .env vim .env |
Update the .env file with the backend URL and port, for example:
| VITE_BACKEND_URL=http://localhost:8011 |
3. Set Up the Backend
| cd ../server npm install |
Prepare Environment Configuration:
| cp .env.sample .env.local vim .env.local |
Here’s an example .env.local configuration:
| JWT_SECRET=dummyJWTSecret123 MONGO_URI=mongodb+srv://<username>:<password>@<cluster-url>/ PORT=8011 CLIENT_URL=http://localhost:4000 NODE_MAILER_USER=myemail@example.com NODE_MAILER_PASS=myemailpassword ADMIN_EMAIL=admin@example.com MAILGUN_API_KEY=dummyMailgunAPIKey123 MAILGUN_DOMAIN=example.com CC_EMAILS=cc1@example.com,cc2@example.com MONGODB_NAME=mydatabase AWS_ACCESS_KEY_ID=dummyAWSAccessKey123 AWS_SECRET_ACCESS_KEY=dummyAWSSecretKey123 AWS_REGION=us-west-2 PINECONE_API_KEY=your-pinecone-api-key PINECONE_ENVIRONMENT=your-pinecone-environment PINECONE_INDEX_NAME=your-pinecone-index |
💡 Create your vector index from the Pinecone Console
4. Run Both Services Using PM2
Make sure PM2 is installed globally:
| npm install -g pm2 |
Start Backend
| cd server pm2 start npm –name “collab-ai-backend” –namespace collab-ai — start — -p 8011 |
Start Frontend
| cd ../client pm2 start npm –name “collab-ai-frontend” –namespace collab-ai — start — -p 4000 |
Check running services:
| pm2 status |
5. Initialize the Application
Create a Super Admin user via cURL:
| curl -X POST http://localhost:8011/api/init \ -H “Content-Type: application/json” \ -d ‘{ “fname”: “Super”, “lname”: “Admin”, “email”: “superadmin@example.com”, “password”: “Bolbona”, “employeeCount”: 100, “companyName”: “INIT_COMPANY” }’ |
Let’s Explore with the http://localhost:4000 with the above created super admin email and password.
🔒 Security Tips
-
Use strong secrets in your .env.local file.
-
Never expose your .env.local in version control.
-
Set up HTTPS (e.g., using NGINX + Let’s Encrypt).
-
Regularly back up your MongoDB and Pinecone index data.
📚 Conclusion
CollabAI is a flexible and powerful tool to supercharge internal knowledge and AI capabilities within your organization. With the steps above, you’ll have a production-ready instance of CollabAI hosted on your own infrastructure — giving you full control and endless customizations.
📬 Need Help?
Have questions or want to contribute? Open issues or submit pull requests via the GitHub repo.
Need help implementing any of this?
Talk to Code2Deploy about DevOps, CloudOps, and LLMOps consulting.
Contact us