Run your game-only server + client on your own VPS and share a public play link.

Self-Hosting on a VPS

Run your game's server and client on a Linux VPS you control. This is the available way to put a game online today (managed hosting is coming — see Managed Hosting).

> You host the game-only stack: the game server, the client, and a database. Keep the Studio/admin authoring tools off the public server.

What you need

  • A Linux VPS (Ubuntu 22.04 / Debian 12). Start around 2 vCPU / 4 GB RAM and scale up for more players.
  • A managed PostgreSQL database for production — do not use the embedded PGlite database online (see Production Database).
  • A domain with DNS you can point at the VPS.

1. Provision the server

Create the VPS, then install Node 20 and pnpm:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
npm i -g pnpm

2. Build the game

Put your project's engine on the VPS and build the game server + client:
pnpm install
pnpm build        # builds the game server and the client

> The Studio Build modal exports a Player Launcher (and a web client build) for your players — it does not package the server for you. The game server is run from the built game server (packages/game-servernode dist/index.js). A one-click "export my server" bundle isn't available yet, so you build and run the server as shown here.

3. Configure environment

Set production environment variables (see .env.example for the full list). The essentials:
VariablePurpose
NODE_ENV=productionRun in production mode
DB_MODE=remoteUse managed Postgres (not PGlite)
DATABASE_URLYour managed Postgres connection string
GAME_SERVER_PORTGame server port (default 3001)
NEXT_PUBLIC_GAME_SERVER_WS_URLThe public wss:// URL clients connect to
ADMIN_API_KEYShared secret between admin tooling and the game server
CONFIG_ENCRYPTION_KEYEncrypts sensitive settings stored in the database

Plus your auth keys (Supabase or local JWT) — see Auth Setup. Then apply the schema to your database:

pnpm db:push      # or pnpm db:migrate for a managed migration workflow

4. Run it

Keep the services alive with a process manager (pm2, systemd, or Docker):
npm i -g pm2
pm2 start "node packages/game-server/dist/index.js" --name game-server
pm2 start "node apps/client/.next/standalone/server.js" --name client -- -p 3000
pm2 save && pm2 startup

If you prefer containers, the repo ships a docker compose up -d setup instead.

5. HTTPS + WebSocket

Put a reverse proxy (nginx, Caddy, or Cloudflare) in front and terminate TLS, forwarding:
  • the client on 443 → 127.0.0.1:3000
  • the game server WebSocket on a subdomain → 127.0.0.1:3001 (forward the Upgrade / Connection headers so WebSockets work)
Use Let's Encrypt or Caddy automatic TLS so both the client and the wss:// endpoint are secure.

6. Go live

With the server reachable over HTTPS/WSS, open your ED5 account dashboard, register the server under Connect your own VPS (its public URL + wss:// URL), then enable the Public play link for your project and share it. See Publishing Your Game.

Keep admin private

The admin app (authoring tools, port 3002) and your database should never be publicly exposed. Run admin only when you need it — behind auth or a VPN, on a private address.
Self-Hosting on a VPS — ED5 MMO Studio Docs | ED5 MMO Studio