Dockerized Rust Game Server
8.9K
This is an extension of Didstopia/rust-server
He wrote an tutorial on how to use this image: Didstopia's Image Tutorial
This repository offers a docker-compose quick startup:
You can start a rust server simply by typing:
$ docker-compose up -d
Server's configuration is stored inside the repositories docker-compose file.
Server starts are executed as follows:
$ docker-compose restart
Will restart rust container.
Best practise: Saving the map before the restart:
$ docker-compose exec rust rcon save
Standard rust rcon command for server save.
$ docker-compose stop
$ docker-compose exec rust bash -c "rm -f /steamcmd/rust/server/docker/*.sav /steamcmd/rust/server/docker/*.map"
$ docker-compose start
Warning: Wipe is permanent, you will lose your map data!
Best Practise: Saving the map and warning players for server wipe:
$ docker-compose exec rust rcon say "Server Wipe In 5 Minutes!"
$ docker-compose exec rust rcon save
More Best Practise: Update docker image before restart:
$ docker-compose rm
$ docker-composel pull
$ docker-compose up -d
You can see the server log by typing:
$ docker-compose logs -f
Entering the server's console for administration purposes:
$ docker-compose exec rust -it bash
You can start multiple server with multiple docker-compose files and by adjusting the server's port and rcon port.
Server's standard ports: 28015 and 28016.
You will have to adjust the server's start command:
- 'RUST_SERVER_STARTUP_ARGUMENTS=-batchmode -load +server.secure 1 +server.port 28115'
Also adjust the server's rcon port:
- 'RUST_RCON_PORT=28116'
Rename the container:
container_name: rust2
Rename the container's volume:
volumes:
rust2_data:
external: false
Start the new server:
$ docker-compose up -d
You can install plugins:
RUST_OXIDE_ENABLED.plugins.$ docker cp plugins rust:/steamcmd/rust/oxide
Will copy all plugins from local folder
pluginsto server's plugin directory/steamcmd/rust/oxide/plugins. Note: All files will be overwritten. Restart the server afterwards.
You can either do full server backups or just saving the server's configuration and map.
This example uses the image blacklabelops/volumerize. More information and commands can be found here: blacklabelops/volumrize
Example: Full backup of binaries, plugins, player data and maps.
$ docker run -d \
--name volumerize \
-v rustgameserver_rust_data:/source \
-v backup_volume:/backup \
-e "VOLUMERIZE_SOURCE=/source" \
-e "VOLUMERIZE_TARGET=file:///backup" \
blacklabelops/volumerize
The container is pre-configured for automatic backups at 4am. Rust server will not be stopped!
Doing a manual backup:
$ docker exec volumerize backup
Will trigger the backup routine manually.
Example: Minimal backup of player data and maps.
$ docker run -d \
--name volumerize \
-v rustgameserver_rust_data:/source \
-v backup_volume:/backup \
-e "VOLUMERIZE_SOURCE=/source/server" \
-e "VOLUMERIZE_TARGET=file:///backup" \
-e "VOLUMERIZE_DUPLICITY_OPTIONS=--include=/source/oxide --include=/source/server --exclude=**" \
blacklabelops/volumerize
The container is pre-configured for automatic backups at 4am. Rust server will not be stopped!
You can restore the latest backup with the command:
$ docker exec volumerize restore
Will restore the server from the backup! Note: Will overwrite all destination files!
Content type
Image
Digest
Size
228.5 MB
Last updated
about 9 years ago
docker pull blacklabelops/rust-gameserver