Run a self-hosted server on Linux with systemd
Make the Linux binary executable, run it with sudo and --install to set up a systemd service, then open ports 8088 and 7070.
Make the binary executable and install it as a service:
chmod +x gamevox-self-hosted-server
sudo ./gamevox-self-hosted-server --install The installer creates a gamevox system user, copies the binary to /opt/gamevox/ and sets up a systemd service that starts on boot. If you run the binary without --install, it asks whether to install as a service, or runs in the foreground with a data folder next to it.
Installer questions
Press Enter to keep each default:
Configuration (press Enter to accept defaults):
Data directory [/opt/gamevox/data]:
TCP port (client connections) [8088]:
UDP port (voice/video) [7070]: Then confirm the summary. If another GameVox server is already installed, this one becomes the next instance. See more than one server on one machine.
| Item | Location |
|---|---|
| Binary | /opt/gamevox/gamevox-self-hosted-server |
| Data | /opt/gamevox/data/ |
| Unit file | /etc/systemd/system/gamevox-self-hosted-server.service |
| Runs as | gamevox user |
| Control command | /usr/local/bin/gamevox |
| Manual | man gamevox-self-hosted-server |
Manage the service
sudo gamevox status
sudo gamevox restart
sudo gamevox logs -f # follow the server log
sudo gamevox journal -f # follow the systemd journal
gamevox help # all commands Plain systemd works too:
sudo systemctl status gamevox-self-hosted-server
sudo systemctl restart gamevox-self-hosted-server
sudo systemctl disable gamevox-self-hosted-server # no auto-start
sudo journalctl -u gamevox-self-hosted-server -f Open firewall ports
UFW:
sudo ufw allow 8088/tcp
sudo ufw allow 7070/udp
sudo ufw allow 7070/tcp # voice TCP fallback firewalld:
sudo firewall-cmd --permanent --add-port=8088/tcp
sudo firewall-cmd --permanent --add-port=7070/udp
sudo firewall-cmd --permanent --add-port=7070/tcp
sudo firewall-cmd --reload Behind a router, also set up port forwarding.
Set environment variables
Use a drop-in, because --install and --repair rewrite the unit file:
sudo systemctl edit gamevox-self-hosted-server
# add:
# [Service]
# Environment=PUBLIC_IP=198.51.100.25
sudo systemctl restart gamevox-self-hosted-server Uninstall or repair
sudo /opt/gamevox/gamevox-self-hosted-server --uninstall
sudo /opt/gamevox/gamevox-self-hosted-server --repair Uninstall removes the service and keeps the data folder. Repair rebuilds the program files and service entry for an install that will not start, with the same data folder and ports.