Skip to main content
This guide walks you through deploying MetaMCP on a DigitalOcean VPS running Ubuntu from scratch, as an example.

Prerequisites

  • A DigitalOcean account
  • A domain name pointing to your VPS
  • Basic knowledge of Linux command line

System Requirements

MetaMCP requires at least 2GB-4GB of memory for optimal performance. The larger the instance, the better the performance due to MCP server pre-allocation and Docker operations. Recommended DigitalOcean Droplet:
  • Basic/Regular: 2GB RAM, 1 vCPU, 50GB SSD ($12/month)
  • Better Performance: 4GB RAM, 2 vCPU, 80GB SSD ($24/month)

Step 1: Create and Configure Your VPS

1.1 Create a Droplet

  1. Log into your DigitalOcean account
  2. Click “Create” → “Droplets”
  3. Choose Ubuntu 22.04 LTS as the OS
  4. Select a plan with at least 2GB RAM
  5. Choose a datacenter region close to your users
  6. Add your SSH key for secure access
  7. Create the droplet

1.2 Initial Server Setup

Connect to your server via SSH:
Update the system:
Install essential packages:
Configure firewall:
Create a non-root user (optional but recommended):

Step 2: Install Docker and Docker Compose

2.1 Install Docker

First, update your package index and install prerequisites:
Add Docker’s official GPG key and repository:
Install Docker CE:
Verify Docker is running:

2.2 Install Docker Compose

Download and install Docker Compose:

2.3 Configure Docker User (Optional)

To run Docker commands without sudo:
Log out and back in for group changes to take effect, or run:

Step 3: Deploy MetaMCP

3.1 Clone the Repository

3.2 Configure Environment

Edit the .env file with your domain and settings:
⚠️ IMPORTANT SECURITY NOTE: Because this is a production environment, make sure you modify POSTGRES_PASSWORD and BETTER_AUTH_SECRET from their default values. Also ensure you use HTTPS. A typical way to generate secure secrets is:
Key configurations to update:

3.3 Update Docker Compose for Production

Edit docker-compose.yml to ensure proper volume naming:
Update the volumes section to avoid conflicts:

3.4 Start MetaMCP

Step 4: Configure Nginx Reverse Proxy

4.1 Create Nginx Configuration

Create a new site configuration:
Add the following configuration (replace yourdomain.com with your actual domain):

4.2 Enable the Site

Step 5: SSL Certificate with Let’s Encrypt

5.1 Obtain SSL Certificate

First, temporarily use HTTP only configuration for initial certificate:
Add this temporary configuration:
Enable temporary config:
Obtain the certificate:

5.2 Restore Full Configuration

After obtaining the certificate, restore the full configuration:

5.3 Set Up Auto-Renewal

Add this line to check for renewal twice daily: