Skip to content

Run multiple server instances

Each server process runs its own world and scripts. You can run several on the same host, with a separate configuration and join code for each instance.

Choose a directory for each instance. This example uses C:\Revo\servers\one and C:\Revo\servers\two. Extract the complete server package and your mod into both directories, following the development setup.

Keep each instance’s config.toml, logs and generated state in its own directory. In both configurations, set:

[api]
state_file = ".api/data.json"
local_state_file = ".api/local.json"

Edit the existing [api] section. These relative paths resolve inside each server’s working directory, so the same values refer to different files.

When creating the second instance from an existing installation, leave out that installation’s .api/data.json and .api/local.json. Each instance creates its own identity. Keep the generated files on subsequent restarts and updates.

Starting from the development configuration, apply these values to the corresponding settings in each file:

Setting Instance one Instance two
name "Local one" "Local two"
port 27015 27115
voice.media_port 27017 27117
resources.http.port 27018 27118
resources.url "http://127.0.0.1:27018/" "http://127.0.0.1:27118/"
api.local_port 27019 27119

Keep api.enabled = false for this local setup, with embedded voice and local resource hosting enabled. Keep resources.path = ".resources" so each instance also has its own package output.

If you enable the Node inspector through scripting.js.node_args, give each instance a different inspector port too.

For external voice, run one voice process per game server and give each pair separate control and media ports. Follow the external voice setup for matching settings and keys.

In one terminal, start the first server:

Terminal window
Set-Location C:\Revo\servers\one
.\revo-server.exe

In another terminal, start the second:

Terminal window
Set-Location C:\Revo\servers\two
.\revo-server.exe

The working directory determines which configuration, scripts and state files the process uses. For Linux or service-based startup, use the corresponding working directory and executable path from the deployment guide. Give each service a distinct name.

From the client helper’s directory, use the code for the instance you want:

Terminal window
.\client-helper.exe launch --join-code dev
Terminal window
.\client-helper.exe launch --join-code dev:27119

These local codes work on the same PC as the servers. The number in dev:27119 is the discovery port. Discovery supplies game port 27115 to the client.

Use the production configuration for remote resource hosting and register each instance with api.enabled = true. They can use the same api.project_secret and api.public_host, with different game ports and separate api.state_file files. Each receives its own join code. Allow each instance’s game and voice ports through the firewall.

Several instances can use the same CDN resource URL and resource key. Set resources.release separately for each instance to test a new release on one server before updating the others. The matching server scripts must be deployed with that release. See resource updates for the rollout procedure.

Account for all instances when choosing worker counts and traffic budgets. workers.replication = "auto" chooses a count independently in each process from its CPU affinity. transport.bandwidth_budget also applies per process. Use replication and bandwidth tuning to allocate these settings across the host.