Skip to main content

Ubuntu Deployment

This guide covers deploying Plugged.in on Ubuntu servers (20.04 LTS or later) for production or staging environments.

System Requirements

Minimum Requirements

  • Ubuntu 20.04 LTS or later
  • 2 CPU cores
  • 4GB RAM
  • 20GB storage
  • Node.js v20+
  • PostgreSQL 15+

Recommended Setup

  • Ubuntu 22.04 LTS
  • 4+ CPU cores
  • 8GB+ RAM
  • 50GB+ SSD storage
  • Dedicated database server
  • Redis for caching

Prerequisites Installation

1. System Updates

2. Node.js Installation

3. PostgreSQL Setup

4. pnpm Installation

5. Python and uv (for Python MCP Servers)

6. Sandboxing Tools (Required for Security)

Sandboxing is critical for secure execution of MCP servers. Install at least one sandboxing tool.
Why Sandboxing is Required:
  • Security Isolation: Prevents MCP servers from accessing sensitive system files
  • Resource Limits: Controls CPU, memory, and I/O usage
  • Network Isolation: Optional network restrictions for untrusted servers
  • Process Containment: Prevents escape from sandbox environment

Application Deployment

1. Clone Repository

2. Environment Configuration

Create .env file:
Configure essential variables:

3. Install Dependencies

4. Create Cache Directories

Systemd Service Setup

1. Create Service File

2. Enable and Start Service

Nginx Configuration

1. Create Nginx Config

2. Enable Site

3. SSL Certificate

Security Hardening

1. Firewall Configuration

2. Configure Sandboxing

Sandboxing is enabled by default for all STDIO MCP servers. Ensure tools are properly installed.
Sandboxing Modes:
  • bubblewrap: Lightweight, user-namespace based isolation (recommended)
  • firejail: SUID-based sandboxing with extensive security profiles
  • none: Disable sandboxing (NOT recommended for production)

3. Database Security

Monitoring & Maintenance

1. Log Management

2. Health Checks

Create health check script:

3. Backup Strategy

Add to crontab:

Troubleshooting

Common Issues

Solution: Install npm globally or ensure Node.js installation includes npm
Solution: Install uv and add to PATH
Solution: Check file ownership and permissions
Solution: Verify PostgreSQL is running and credentials are correct

Debug Mode

Enable debug logging:
Check logs for:
  • [MCP Wrapper] Environment info
  • [MCP Wrapper] Command not found
  • [MCP Wrapper] Current PATH

Performance Optimization

1. Node.js Tuning

2. PostgreSQL Tuning

3. Redis Cache (Optional)

Support

For deployment issues: