Docs » Running a server » Docker

Docker

The official image runs the same server, with the world kept in a volume.

The image is ghcr.io/karagra/voxelmon-server. latest is the newest release; each version also has its own tag, such as 0.3.2. The java and 0.3.2-java tags add Java for Java plugins. Use the version that matches the game version your players have.

Run it

docker run -d -it --name voxelmon \
  --network host \
  --stop-timeout 20 \
  -v voxelmon:/data \
  ghcr.io/karagra/voxelmon-server:latest

docker logs voxelmon        # the join code is near the top
  • --network host: the server makes its join code from its own network address and answers codes on your network. Inside Docker's own private network it would see the wrong address, and players on your network could not find it.
  • -v voxelmon:/data: the world, server.toml and the blocked list live in the voxelmon volume, so they survive updates. Use a folder instead (-v /srv/voxelmon:/data) to edit server.toml directly; the server's user in the image has the ID 999 and must own that folder: sudo chown 999 /srv/voxelmon.
  • --stop-timeout 20: docker stop asks the server to stop as the stop command does: players are told and the world is saved. This gives it time.
  • -it: keeps a console you can reach with docker attach voxelmon. Leave it with Ctrl-P then Ctrl-Q; Ctrl-C there stops the server.

Docker Compose

services:
  voxelmon:
    container_name: voxelmon
    image: ghcr.io/karagra/voxelmon-server:latest
    network_mode: host
    stdin_open: true
    tty: true
    restart: unless-stopped
    stop_grace_period: 20s
    volumes:
      - voxelmon:/data
volumes:
  voxelmon:
docker compose up -d
docker attach voxelmon

Settings

On its first run the server writes server.toml into /data. Edit it there (in the volume or your folder) and restart the container: docker restart voxelmon.

Updating

docker pull ghcr.io/karagra/voxelmon-server:latest
docker stop voxelmon        # players are told and the world is saved
docker rm voxelmon
docker run ...              # as above; the volume keeps the world
Stop the container before removing it. docker rm -f and docker kill end the server at once, and whatever happened since its last save is lost.

To stay on one version, use its tag (for example :0.1.0) instead of :latest, and change it when your players update their game.

Java plugins

The image above runs Rust plugins. For Java plugins use the :java tag (or a version's, such as :0.1.0-java): the same image with Java 25 in it.

Locking it down

The server writes nowhere but /data and needs no privileges, so the container can be given none. Worth doing on any server that runs plugins you did not write:

docker run -d -it --name voxelmon \
  --network host \
  --stop-timeout 20 \
  --read-only --tmpfs /tmp \
  --cap-drop ALL --security-opt no-new-privileges \
  -v voxelmon:/data \
  ghcr.io/karagra/voxelmon-server:latest

In a Compose file the same four are read_only: true, tmpfs: [/tmp], cap_drop: [ALL] and security_opt: [no-new-privileges:true].

What is in the image

A small Debian base, the Linux server and Epic's library. The server runs as its own limited user, voxelmon (ID 999), which can write only to /data.