Headless Server
A headless server is a program that runs on a computer of yours, all the time, and hosts Rustball rooms for everyone. Players join it from the Online Game list like any other room. The game runs on your computer, as the authoritative server.
What you need
| Item | Where it comes from | What it is for |
|---|---|---|
| Headless Grant Token | The site administrator gives it to you. | Authorises you to run servers. If it is revoked, all your servers disconnect at once. |
| Headless Token | You create it on the token page, using your Headless Grant Token. | Identifies one server. It expires after 2 hours without use; a room that stays open keeps it alive. |
| A computer | Yours: a mini PC, a NAS, a Mac, or a Linux machine that stays on. | Runs the server. Windows is not supported yet. |
Setup in 5 steps
- Get a Headless Grant Token from the administrator.
- Create a Headless Token on the token page: fill in the bot name, the room name, the visibility, an optional password and your grant, then press Create Headless Token.
- Download
rustball-headless.tomlfrom that page. It already contains the site, both tokens and your first room. Keep it private. - Download the package for your computer (below) and install it (step 5 of the guide).
- Start it and check the log: your room must appear in the Online Game list.
Package for Linux (x86_64) · Package for macOS · Create a Headless Token
Configuration guide: rustball-headless.toml
Plain text, open it with any editor. Lines starting with # are comments.
| Field | What to write |
|---|---|
signal_url | Leave it as it is: wss://www.rustball.eu/ws. |
bind_ip | The address of this computer on your network (see below). Players must be able to reach it. |
[auth] grant_token | Your Headless Grant Token. |
[auth] headless_token | Your Headless Token. |
[[rooms]] name | Room name in the list, 1 to 40 characters. Unique in the file. |
[[rooms]] visibility | public (listed) or private (only with the code or link). |
[[rooms]] password | Room password, or "" for none. |
[[rooms]] max_connections | Maximum players, from 1 to 22 (default 22). |
Find bind_ip
| System | Command |
|---|---|
| macOS | ipconfig getifaddr en0 (Wi-Fi), or en1 |
| Linux | hostname -I, then take the address of your network interface |
More rooms on one server
Add one [[rooms]] block per room. Each room opens on its own, with its own settings:
[[rooms]] name = "Evening match" visibility = "public" password = "" max_connections = 22 [[rooms]] name = "Private room" visibility = "private" password = "secret" max_connections = 6
After changing the file, restart the server.
Start it
Linux (as a service):
sudo install -m 755 bin/rustball-headless /usr/local/bin/rustball-headless sudo install -m 755 bin/room-server /usr/local/bin/room-server sudo cp rustball-headless.toml /etc/rustball-headless.toml sudo chmod 600 /etc/rustball-headless.toml sudo install -m 644 rustball-headless.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable --now rustball-headless journalctl -u rustball-headless -n 20
macOS (from the folder of the package, with the file next to run.sh):
./run.sh
Keep the terminal open. To stop the Mac from sleeping: caffeinate -i ./run.sh.
Check that it works
The log shows each step, one line per event:
INFO token Headless Grant Token accepted INFO token accepted · server authorised INFO stanza open · code A4WGRDYN · waiting for players INFO giocatore joined: p1 (session 1) INFO partita started · score 0-0 INFO partita GOAL Red · score 1-0 INFO partita ended · final score 1-0
If something does not work
| Log message | What to do |
|---|---|
invalid_token / not valid or expired | The Headless Token is wrong, expired or revoked. Create a new one on the token page. |
invalid_grant | The Headless Grant Token is wrong or revoked. Ask the administrator. |
grant_required | The two tokens do not belong together. Create the Headless Token again with your grant. |
| REVOKED by the administrator | Your Headless Grant Token or this Headless Token was revoked. The server stops and does not restart. |
| Room is not in the list | Check the log: the server must be running and show accepted. |
| Players cannot join | Check bind_ip and open the UDP ports 1024–65535 on your router, or use a machine on the same network. |