Run more than one self-hosted server on one machine
Each self-hosted server on a machine needs its own TCP port, UDP port and data folder. The Windows and Linux installers set this up for you.
Give each server its own TCP port, UDP port and data folder. Sharing any of them stops a server from starting, or leaves two servers writing to one database. The Windows and Linux installers pick free values for you.
Each binary belongs to one server. To add a second server, use that server's own download. The installer refuses to install the same server twice.
Windows
Run the second server's .exe. The setup window lists the servers Already on this computer and fills in the next free data folder and ports. Tick Install as Windows Service (auto-start on boot) and click Save & Start.
| Instance | Service | Data folder | TCP | UDP |
|---|---|---|---|---|
| 1 | GameVoxServer | %ProgramData%\GameVox-Server | 8088 | 7070 |
| 2 | GameVoxServer2 | %ProgramData%\GameVox-Server-2 | 8089 | 7071 |
| 3 | GameVoxServer3 | %ProgramData%\GameVox-Server-3 | 8090 | 7072 |
Each instance has its own program folder (%ProgramFiles%\GameVox-Server-2 and so on), so each updates on its own.
From an Administrator PowerShell:
sc query GameVoxServer2
.\gamevox-self-hosted-server.exe --uninstall=2
.\gamevox-self-hosted-server.exe --repair=2 Linux
sudo ./gamevox-self-hosted-server --install The installer lists existing servers, picks the next instance number and suggests free ports. Press Enter to accept.
| Instance | Service | Install folder | TCP | UDP |
|---|---|---|---|---|
| 1 | gamevox-self-hosted-server | /opt/gamevox/ | 8088 | 7070 |
| 2 | gamevox-self-hosted-server-2 | /opt/gamevox-2/ | 8089 | 7071 |
Data is in data/ inside each install folder. Use -i N with the gamevox command, and =N on uninstall and repair:
sudo gamevox -i 2 status
sudo gamevox -i 2 logs -f
sudo /opt/gamevox-2/gamevox-self-hosted-server --uninstall=2
sudo /opt/gamevox-2/gamevox-self-hosted-server --repair=2 Docker
Extract each server's Docker zip into its own folder. In the second docker-compose.yml, change tcp_port and udp_port in the x-config block, and change container_name: gamevox to another name.
Start scripts
If you run binaries directly, give each its own folder and its own TCP_PORT and UDP_PORT. See environment variables.
Ports and addresses
Forward each server's ports on your router. PUBLIC_IP and PUBLIC_IPV6 can be shared, because the port tells servers apart.
Which server is this binary?
.\gamevox-self-hosted-server.exe --community-id
.\gamevox-self-hosted-server.exe --community-name