Skip to content

SquashyHydra/Rust-Server-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Server Manager

Rust Server Manager is a Linux-only Python CLI for managing a Facepunch Rust dedicated server with built-in WebRCON support.

installation, updates, startup, shutdown, configuration, Oxide/plugin management, SSL generation, and direct websocket RCON access.

Features

  • Installs SteamCMD automatically when it is missing
  • Creates and maintains server.properties
  • Generates runds.sh from the current configuration
  • Installs and updates the Rust dedicated server
  • Uses built-in websocket WebRCON instead of external helper scripts
  • Supports one-shot RCON commands and an interactive RCON console
  • Installs Oxide and downloads plugins from plugins.txt when enabled
  • Generates SSL assets for WebRCON
  • Removes the old map and blueprint wipe commands intentionally

Requirements

  • Linux
  • Python 3.11 or newer
  • openssl on the system path
  • Network access for SteamCMD, Rust updates, Oxide, and plugin downloads

Python dependency:

  • websockets>=12,<16

Installation

Install from the project root:

pip install .

Run the CLI:

rust-server-manager --help

For development from source:

PYTHONPATH=src python -m rust_server_manager --help

Home Directory Layout

By default the manager uses the current user's home directory. You can override this with --home.

$HOME/
├── server.properties
├── plugins.txt
├── rust_server.log
├── rust_server/
│   ├── RustDedicated
│   ├── runds.sh
│   ├── .rust_server_manager.pid
│   ├── RustDedicated_Data/
│   ├── oxide/
│   │   └── plugins/
│   └── server/
├── steamcmd/
└── rust_ssl/
    ├── rust_key.key
    ├── rust_crt.crt
    └── rust_ssl.pfx

Commands

General form:

rust-server-manager [--home PATH] <command>

Available commands:

  • install - Install SteamCMD if needed and install Rust dedicated server
  • update - Update Rust and Oxide when enabled
  • start - Update and start the Rust server
  • stop - Stop the server with WebRCON when configured, otherwise fall back to the tracked process
  • restart - Stop and start the server
  • console - Open an interactive WebRCON console
  • rcon <command> - Send a single WebRCON command
  • print - Print the server log file
  • delete [identity] - Delete a server identity directory
  • ssl - Generate SSL certificates for WebRCON
  • write-runscript - Regenerate runds.sh

Examples:

rust-server-manager install
rust-server-manager start
rust-server-manager stop
rust-server-manager console
rust-server-manager rcon "server.writecfg"
rust-server-manager delete my_first_rust_server
rust-server-manager ssl

Configuration

The manager creates server.properties automatically on first use.

Important keys include:

  • identity
  • ip
  • port
  • queryport
  • app_port
  • rcon_ip
  • rcon_port
  • rcon_pass
  • rcon_web
  • rcon_ssl
  • rcon_ssl_pass
  • hostname
  • description
  • motd
  • headerimage
  • logoimage
  • url
  • tags
  • gamemode
  • pve
  • tickrate
  • maxplayers
  • seed
  • worldsize
  • saveinterval
  • upkeep_period_minutes
  • enable_oxide
  • enable_rustio

Defaults are defined in src/rust_server_manager/config.py.

Oxide and Plugins

When enable_oxide=True, the manager:

  1. downloads the latest Oxide Rust release
  2. installs it into the Rust server directory
  3. optionally installs RustIO when enable_rustio=True
  4. reads plugin names from plugins.txt
  5. downloads each plugin from umod.org into the Oxide plugins directory

plugins.txt supports comma-separated values and newline-separated values.

Example:

AdminRadar, BetterChat
NTeleportation
StackSizeController

WebRCON

Rust uses a websocket-based RCON interface. This project includes a native WebRCON client instead of calling external RCON scripts.

Built-in WebRCON is used for:

  • one-shot RCON commands
  • the interactive console
  • graceful shutdown
  • post-start setup commands

Minimum configuration:

rcon_web=1
rcon_port=28016
rcon_pass="your_password"

Notes

  • This project is Linux-only by design.
  • The original bash wipe commands were intentionally removed.
  • stop, console, and rcon work best when WebRCON is configured correctly.
  • The generated runds.sh is kept as a compatibility and inspection artifact.
  • A separate home directory can be used per server instance with --home.

Development

Run tests from the project root:

PYTHONPATH=src python -m unittest discover -s tests

Run the CLI module directly:

PYTHONPATH=src python -m rust_server_manager --help

About

Rust Server Manager is a Linux-only Python CLI for managing a Facepunch Rust dedicated server with built-in WebRCON support.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages