Multiplayer lobby
- RAM requirements: 512 MB (may increase over time if lobby gets more active players)
- CPU requirements: 1 core (preferrably dedicated to ensure low latency)
- SSD requirements: up to 4 Gb (depending on log and database size over time)
Exposed to public as:
lobby.vcmi.eu:3031- user loginbeholder.vcmi.eu:3031- old domain name for logins (deprecated, kept for VCMI 1.7.3 and older clients)-
api.vcmi.eu- public REST API (behind Cloudflare; nginx proxies HTTPS to lobby's plain-HTTP listener on127.0.0.1:3032) -
Start:
cd /home/lobby && nohup sudo -u lobby /usr/games/vcmilobby &(also done bysetup.shandupgrade.sh) - Stop:
killall vcmilobby(and only fall back tokillall -9if the process refuses to exit —-9can leave an SQLite WAL behind) - Examine database (can be done live):
sqlite3 /home/lobby/.local/share/vcmi/vcmiLobby.db - Examine log file:
tail -n 100 /home/lobby/cache/vcmi/VCMI_Lobby_log.txt
Setup
All operational scripts live in scripts/lobby/. Copy the directory to /root/lobby/ on the target server.
- Place certificates in
/root/certs/on the server (dot.vcmi.eu.pem,dot.vcmi.eu.key,cloudflare-client.crt). - Place the lobby
.debpackage (produced by the "Build VCMI Lobby" CI job) at any reachable path, e.g./root/vcmi-lobby.deb. scp -r scripts/lobby root@new-server:/root/- On the server:
setup.sh creates a fresh SQLite database from the schema bundled in the .deb if one is not already present at /home/lobby/.local/share/vcmi/vcmiLobby.db. To restore from a previous backup instead, copy the backup into place first (or use ./import.sh after the database exists).
Upgrade
The upgrade is a two-stage process because sqldiff will occasionally "patch" a table by dropping and recreating it, silently losing every row. Always review the generated SQL before applying.
Stage 2 takes a fresh backup at /root/lobby-backup-pre-upgrade.db, stops the running lobby (graceful first, then SIGKILL if needed), installs the .deb, applies the SQL exactly as given, and restarts.
A non-empty residual sqldiff after apply is expected — differences in column order, index naming, etc. persist without affecting correctness. The script prints them for information only and does not abort.
Migration
- On the old server:
./export.sh— produces/root/lobby-backup.db.gz. - Provision the new server and run the Setup steps above using the same
.debpackage. - Transfer the backup directly between servers using your workstation's SSH agent for auth:
Or, if agent forwarding is not available, route through the workstation:
scp -3 root@old:/root/lobby-backup.db.gz root@new:/root/. - On the new server:
Troubleshooting
- Lobby crashes on start due to
boost::filesystem::status: Permission denied [system:13]: "config". Solution:cd /home/lobby(or any other directory writable bylobbyuser) - Lobby shut downs after logout from server: ensure that
vcmilobbywas started vianohup