Quick Start
Get a Realm dedicated server running in minutes with Docker Compose.
The fastest way to get running is Docker Compose. It starts the database and the Realm server together.
1. Install Docker
curl -fsSL https://get.docker.com | sh2. Download the Compose file
mkdir realm-server && cd realm-server
curl -O https://realmvoice.app/downloads/docker-compose.server.yml3. Set required environment variables
At minimum you need:
export REALM_IDENTITY_NAME="My Realm Server"
export REALM_WEBRTC_ANNOUNCED_IP="YOUR_SERVER_PUBLIC_IP"Replace YOUR_SERVER_PUBLIC_IP with the public IP of your VPS. This is required for voice to work. Without it, WebRTC ICE candidates will advertise the wrong address.
You can use a hostname instead of an IP and the server will resolve it
automatically: REALM_WEBRTC_ANNOUNCED_IP="my-server.example.com"
4. Start the server
docker compose -f docker-compose.server.yml up -dThis pulls the Realm server image and its dependencies, creates a Docker network, and starts the containers. The server runs on port 5000.
5. Check it's running
# Container status
docker compose -f docker-compose.server.yml ps
# Stream logs
docker compose -f docker-compose.server.yml logs -f realm-serverA healthy startup looks like:
[Realm] Starting Realm Dedicated Server v0.x.x
[Realm] Registered -- server ID: srv_abc123
[Realm] Listening on 0.0.0.0:50006. Open your firewall
Make sure these ports are open inbound:
| Port | Protocol |
|---|---|
| 5000 | TCP |
| 40000-49999 | UDP |
See Firewall & Networking for provider-specific instructions.
7. Add HTTPS with Caddy
If you have a domain pointed at your server, add Caddy as a reverse proxy. It handles TLS certificates from Let's Encrypt automatically, so you don't have to think about cert renewal.
Create a Caddyfile in the same directory:
my-server.example.com {
reverse_proxy realm-server:5000
}Then add Caddy to your docker-compose.server.yml:
services:
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
depends_on:
- realm-server
volumes:
caddy-data:Update your environment variables to tell the server clients now connect on port 443:
REALM_IDENTITY_PUBLIC_HOST="my-server.example.com"
REALM_IDENTITY_PUBLIC_PORT=443
REALM_WEBRTC_ANNOUNCED_IP="my-server.example.com"You can also restrict port 5000 so it's no longer publicly exposed:
# realm-server service: bind to localhost only
ports:
- "127.0.0.1:5000:5000"Then restart:
docker compose -f docker-compose.server.yml up -dCaddy will obtain a certificate on first start. Port 80 needs to be open for the ACME challenge, and your DNS must already point at the server.
Caddy only proxies HTTP/WebSocket traffic. The UDP voice ports (40000-49999) bypass Caddy entirely and go directly to the voice server, so voice still works normally.
Running without Docker Compose
If you already have a database running elsewhere:
docker run -d \
--name realm-server \
-p 5000:5000 \
-p 40000-49999:40000-49999/udp \
-e REALM_IDENTITY_NAME="My Server" \
-e REALM_STORAGE_MONGO_URL="mongodb://your-mongo-host:27017/realm" \
-e REALM_WEBRTC_ANNOUNCED_IP="YOUR_SERVER_PUBLIC_IP" \
-v server-data:/data \
ghcr.io/realm-app/realm-server:latestWhat's next
- Configuration -- server name, voice settings, attachment storage
- Firewall & Networking -- provider-specific firewall rules
- Updating -- how to pull new versions without losing data