Skip to content

Managing a server

Once a server is running, you will likely have to make some adjustments to its configuration on a regular basis. This could be as simple as running a manual update command or banning a player you take issue with.

Reaching the console

Server have their management console, but currently no RCON interface. This means attaching if the server is running inside a container:

docker attach <container>

To make this work, the container has to have been started with a terminal. Add tty: true to your compose service:

compose.yaml (excerpt)
services:
  server:
    image: ghcr.io/replayre/server
    tty: true

Attaching gives you a prompt. Type exit to stop the server, or detach with Ctrl-P followed by Ctrl-Q to leave it running.

Terminal log output

A container started with a terminal writes its prompt and cursor movements into the container log, which makes docker compose logs hard to read. The log files in logs/ are unaffected and stay clean

Logs

Log files are written into logs/, versioned by timestamp. Files older than 7 days are removed automatically to preserve disk space.

Starting and stopping

docker compose stop      # stop the server, keeping the container
docker compose start     # start it again
docker compose restart   # stop and start
docker compose down      # remove the container, keep the volume

Bundles

Bundles are added by placing them in data/ugc/ and starting them via start <name> or restart <name>. You can also use sv_ugc_automatic_restarts during development, which restarts on file change.

Note

We do not recommend using sv_ugc_automatic_restarts in production, as multiple sequential file changes could lead to multiple restarts if they happen outside of the grace period that groups changes together.

Command Purpose
bundles List the bundles the server can see
start <name> Start a bundle
stop <name> Stop a running bundle
restart <name> Restart a bundle

How bundles are packaged and delivered to players is covered in Bundle Distribution.

Backups

Everything worth keeping is inside your server folder:

cfg/ Your server configuration
settings/ Update channel and related settings
data/ugc/ The bundles you added

In a container, the simplest approach is to back up the whole volume while the server is stopped.

Keeping the server running

While we try to maximize server stability, crashes are still possible. To ensure that a server restarts after exiting unexpectedly (or after an update), set the restart policy to:

compose.yaml (excerpt)
    restart: unless-stopped

Next steps