Rust Server with Parameters
968
A Docker image for hosting a Rust Dedicated Server. Uses SteamCMD to automatically install and update Rust, so you can deploy your server quickly with Docker Compose or Docker Run.
version: "3.9"
services:
rust-server:
image: oytunistrator/rustserver:latest
container_name: rust-server
ports:
- "28015:28015/udp" # Game port
- "28016:28016/tcp" # Query port
- "28017:28017/tcp" # RCON
environment:
- HOSTNAME=Rust Server
- DESCRIPTION=Rust Server - Survive the wasteland!
- MAXPLAYERS=100
- SEED=12345
- WORLD_SIZE=3000
- RCONPORT=28017
- RCONPASSWORD=changeme
- IDENTITY=rustserver
- SAVEINTERVAL=300
version: "3.8"
services:
rust-server:
build: .
container_name: rust-server
restart: unless-stopped
environment:
- GAMEPORT=28015
- QUERYPORT=28016
- RCONPORT=28017
- RCONPASSWORD=presonlisea
- HOSTNAME=ODZ Rust Server
- MAXPLAYERS=666
- IDENTITY=odzrust
- SEED=12345
- WORLD_SIZE=3000
- SAVEINTERVAL=300
ports:
- "28015:28015/tcp"
- "28015:28015/udp"
- "28016:28016/udp"
- "28017:28017/tcp"
volumes:
- rust_data:/data
restart: unless-stopped
volumes:
rust_data:
docker run -d \
--name rust-server \
-p 28015:28015/udp \
-p 28016:28016/tcp \
-p 28017:28017/tcp \
-e HOSTNAME="Rust Server" \
-e DESCRIPTION="Rust Server - Survive the wasteland!" \
-e MAXPLAYERS=100 \
-e SEED=12345 \
-e WORLD_SIZE=3000 \
-e RCONPORT=28017 \
-e RCONPASSWORD=changeme \
-e IDENTITY=rustserver \
-e SAVEINTERVAL=300 \
-v rust-data:/data \
oytunistrator/rustserver:latest
| Variable | Description | Default |
|---|---|---|
HOSTNAME | Server name (shown in server browser) | Rust Server |
DESCRIPTION | Server description | (empty) |
MAXPLAYERS | Maximum number of players | 100 |
SEED | World seed | random |
WORLD_SIZE | World size (1000–6000) | 3000 |
IDENTITY | Server identity / save folder name | rustserver |
SAVEINTERVAL | Save interval in seconds | 300 |
RCONPORT | RCON port | 28017 |
RCONPASSWORD | RCON password (for RustAdmin / rcon-cli) | (empty) |
All persistent data is stored under /data.
Mount this directory to keep your saves and configs between restarts:
/data/serverfiles/server/IDENTITY/server.cfg, users.cfg) → /data/serverfiles/server/IDENTITY/cfg/To grant yourself admin privileges, add your Steam64ID to users.cfg:
ownerid steamid "Username" "owner"
server.writecfg
ownerid → full adminmoderatorid → moderator with limited permissionssteamid → your steamidUsername → your usernamercon-cli, or any tool supporting WebRcon.Content type
Image
Digest
sha256:61304d9ad…
Size
3 GB
Last updated
about 1 year ago
docker pull oytunistrator/rustserver