Docker Setup
Deploy SellServ Voice with Docker Compose in minutes.
Prerequisites
- Docker and Docker Compose installed
- A server with a public IP address
- A domain name pointed to your server
- Ports 80, 443 (TCP) and 40000-40100 (UDP) open in your firewall
1. Clone and Configure
git clone https://github.com/sellserv/voice-server.git
cd voice-server/deploy/self-hosted
cp .env.example .env
# Edit .env — set JWT_SECRET and DOMAIN
nano .env
Required:
JWT_SECRET— Generate withopenssl rand -hex 32DOMAIN— Your domain (e.g.chat.example.com) for Caddy/Let's EncryptMEDIASOUP_ANNOUNCED_IP— Your server's public IP address
Recommended:
ADMIN_USERS— Comma-separated admin user IDs (set in.env)RESEND_API_KEY+EMAIL_FROM— For email MFA and verification
2. Start the Server
docker compose up -d
Your instance is now running at https://your-domain (Caddy handles HTTPS automatically).
3. Admin Setup
- Register an account on your instance
- Verify your email (if email is configured)
- Add your user ID (UUID) to
ADMIN_USERSin.env - Restart:
docker compose up -d
Updating
docker compose pull
docker compose up -d
Data and uploads persist across updates via Docker volumes. Database migrations run automatically on startup.
All Environment Variables
| Variable | Required | Description |
|---|---|---|
JWT_SECRET | Yes | Run openssl rand -hex 32 |
DOMAIN | Yes | Your domain (for Caddy / Let's Encrypt) |
MEDIASOUP_ANNOUNCED_IP | Yes | Server's public IP for WebRTC voice |
CORS_ORIGINS | Yes | Your domain (e.g. https://chat.example.com) |
RESEND_API_KEY | Yes | For email verification, MFA, and password resets (resend.com) |
EMAIL_FROM | Yes | Sender address (e.g. noreply@example.com) |
ADMIN_USERS | Recommended | Comma-separated admin user IDs (set in .env) |
Optional Features
| Variable | Description |
|---|---|
GIPHY_API_KEY | Enables GIF picker |
TURNSTILE_SITE_KEY + TURNSTILE_SECRET_KEY | Cloudflare CAPTCHA on registration |
FIREBASE_SERVICE_ACCOUNT | Firebase Admin SDK JSON for mobile push notifications |
Firewall Ports
| Port | Protocol | Purpose |
|---|---|---|
| 22 | TCP | SSH |
| 80 / 443 | TCP | Caddy — HTTP / HTTPS |
| 40000-40100 | UDP | mediasoup RTP (voice/video) |
Backups
Back up the Docker volumes to save your entire instance:
# Find volume paths
docker volume inspect sellserv-data sellserv-uploads
# Or copy from the container
docker cp sellserv:/app/data ./backup-data
docker cp sellserv:/app/uploads ./backup-uploads