Self-Hosting Plugged.in

Learn how to self-host Plugged.in for complete control over your MCP infrastructure

Overview

Self-hosting Plugged.in gives you complete control over your MCP infrastructure, data sovereignty, and customization options. This guide covers deployment from setup to production.

Full Control

Complete control over your infrastructure and configuration

Data Sovereignty

Keep all data within your own infrastructure

Prerequisites
  • Linux server (Ubuntu 20.04+ or similar)
  • Docker and Docker Compose installed
  • PostgreSQL 15+ (or Docker)
  • Domain name with DNS access
Step 1: Prepare Environment
Setup
Clone repositories and prepare your server

Clone Repositories

Get the latest source code:

git clone https://github.com/pluggedin-ai/pluggedin-app.git
git clone https://github.com/pluggedin-ai/pluggedin-mcp.git

System Requirements

Recommended minimum specifications:

  • 2 CPU cores
  • 4GB RAM
  • 20GB storage
Step 2: Set Up Database
Database
Configure PostgreSQL for Plugged.in

PostgreSQL Setup

Deploy PostgreSQL using Docker:

# PostgreSQL 15+
docker run -d \
  --name pluggedin-postgres \
  -e POSTGRES_PASSWORD=secure_password \
  -e POSTGRES_DB=pluggedin \
  -p 5432:5432 \
  -v postgres_data:/var/lib/postgresql/data \
  postgres:15

Run Migrations

Initialize the database schema:

cd pluggedin-app
pnpm db:migrate
pnpm db:migrate:auth
Step 3: Configure Application
Configuration
Set up environment variables and security settings

Environment Variables

Create production environment configuration:

# .env.production
DATABASE_URL=postgresql://user:password@localhost:5432/pluggedin
NEXTAUTH_URL=https://your-domain.com
NEXTAUTH_SECRET=generated-secret-key
PLUGGEDIN_API_KEY=your-api-key

# Optional features
ENABLE_RAG=true
ENABLE_NOTIFICATIONS=true
EMAIL_SERVER_HOST=smtp.example.com
EMAIL_SERVER_PORT=587
Step 4: Deploy Services
Deployment
Deploy Plugged.in using Docker Compose

Docker Compose Setup

Create a docker-compose.yml file:

# docker-compose.yml
version: '3.8'
services:
  app:
    build: ./pluggedin-app
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    depends_on:
      - postgres
      
  mcp:
    build: ./pluggedin-mcp
    ports:
      - "3001:3001"
    environment:
      - NODE_ENV=production

Reverse Proxy

Configure Nginx as a reverse proxy with proper headers and WebSocket support.

SSL/TLS Setup

Use Let's Encrypt for free SSL certificates with automatic renewal.

Next Steps
  • Set up monitoring and logging
  • Configure automated backups
  • Review security configuration guide