Register a production server
Enable API registration to make your server available through a join code. Use
the project credential supplied through developer access as project_secret.
The same credential can register several servers for your project. Keep it in
private server configuration. For installation and service setup, follow
Deploy a production server.
Configure registration
Section titled “Configure registration”Merge these settings into config.toml. Put the top-level settings above any
[section]:
name = "Example #1"language = "en"dev = falseport = 27015
[api]enabled = trueproject_secret = "YOUR_PROJECT_SECRET"public_host = "play.example.com"state_file = ".api/data.json"Replace YOUR_PROJECT_SECRET with your credential and play.example.com with
your server’s public hostname or IP address.
api.public_hostis the address given to clients. Enter only the hostname or IP, without a URL scheme or port. The advertised game port comes fromport.name,languageanddevappear in the server listing. Use a language tag such asenorru. Setdev = trueto mark a registered test server.
Allow incoming game traffic on UDP port 27015. If the server is behind NAT,
forward that same external port to the game server. The networking guide
covers the remaining ports and firewall rules. Set resources.url to an
address players can reach. For production resource hosting, follow
Packaging and hosting resources.
Get the join code
Section titled “Get the join code”Start revo-server.exe from the directory containing config.toml. After
successful registration, the console prints a line like:
Registered server 0e79a9cc-3bb9-4d15-a99d-30fa0755b162. Join code: example_01Use the code printed by your server in helper commands:
.\client-helper.exe inspect --join-code example_01.\client-helper.exe launch --join-code example_01The join code is assigned during registration. To display servers in a custom launcher, request the list using your public project ID, as shown in Server selection and join codes.
The server publishes its player count, capacity, password requirement, client
compatibility and selected resource release automatically. Changes to
config.toml take effect after a restart.
Preserve the registration
Section titled “Preserve the registration”The server writes its assigned ID to api.state_file. With the example above,
this is .api/data.json inside the server’s working directory.
Keep this file across restarts and binary updates. When moving the instance to
another machine, move the file with it and update api.public_host and port
as needed. Registration then updates the existing entry and keeps its join
code.
For an additional instance, use a separate state file and a different public host/port combination. Each instance needs its own registered server ID.
If the file is missing, registration looks for an existing entry with the same public host and port under your project. Starting at a different address without the saved ID creates a new entry and join code. The server account needs permission to create and update the state file and its directory.
Registration and availability
Section titled “Registration and availability”The server sends heartbeats while it runs. The directory marks it offline
when heartbeats stop arriving within the API’s timeout. Join-code resolution
then reports server_offline until heartbeats resume. Existing game
connections continue during a directory outage.
A registered server serving client resources must complete its initial
registration before entering the game loop. If the API is unavailable or
rejects the selected resource release, startup fails with
Resource registration failed. Resolve the reported problem and start the
server again.
For a local session, set api.enabled = false and use dev or
dev:<local_port> on the same PC. The development server guide
covers that setup.
Common problems
Section titled “Common problems”| Symptom | Check |
|---|---|
api.project_secret must be a generated project credential or registration returns HTTP 401 |
Use the complete credential supplied through developer access. A project ID cannot be used as the credential. |
api.public_host must be the advertised host name or IP, without a port or URL |
Enter a public hostname or IP such as play.example.com. Remove the URL scheme and port. |
Could not save server ID |
Check the working directory and write permissions for api.state_file and its parent directory. |
| The server is listed, but joining times out | Check public DNS, the advertised game port, firewall rules and NAT forwarding from outside the server’s network. |