Deployment
Slidev MCP runs as a Docker Compose stack on a single VM. This guide covers production deployment with Let's Encrypt TLS.
Prerequisites
- A Linux VM with Docker and Docker Compose v2 installed
- A domain name pointed at the VM's IP address (e.g.
mcp.example.com) - Optionally, a second domain for slides (e.g.
slides.example.com) for origin isolation
Quick Start
bash
# Clone the repository
git clone https://github.com/joelbarmettlerUZH/slidev-mcp.git
cd slidev-mcp
# Create your .env file
cp .env.example .envEdit .env with your production values:
bash
DOMAIN=mcp.example.com
SLIDES_DOMAIN=slides.example.com # Optional, for origin isolation
POSTGRES_PASSWORD=a-strong-password
ACME_EMAIL=you@example.comStart the stack:
bash
docker compose -f docker-compose.prod.yml up -dTraefik will automatically obtain TLS certificates via Let's Encrypt. Your MCP server is now available at:
https://mcp.example.com/mcpServices
The stack runs 6 services:
| Service | Purpose |
|---|---|
| Traefik | TLS termination, routing, rate limiting |
| MCP Server | FastMCP server, build orchestration |
| Builder | Isolated Bun + Slidev build container (no network access) |
| PostgreSQL | Build metadata and garbage collection |
| Nginx | Static file serving for built slides |
Verify
Check that all services are running:
bash
docker compose -f docker-compose.prod.yml psTest the MCP endpoint:
bash
curl https://mcp.example.com/mcpUpdates
Pull the latest images and restart:
bash
docker compose -f docker-compose.prod.yml pull
docker compose -f docker-compose.prod.yml up -dBackups
Back up the PostgreSQL database and slide files:
bash
# Database
docker compose exec postgres pg_dump -U slidev slidev > backup.sql
# Slide files (optional — they can be rebuilt)
docker compose cp nginx:/data/slides ./slides-backup/See Configuration for all available environment variables.