Skip to content

JDProfresh/stationeers-dedicated

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Stationeers Dedicated Server Manager

License: MIT Platform: Linux Bash 5.0+

An LGSM-style CLI utility for deploying and managing Stationeers dedicated game servers on Linux.

Features

  • Single self-contained script - Dependencies auto-installed during setup
  • Complete lifecycle management - Install, update, backup, and uninstall
  • Multi-distribution support - Ubuntu, Debian, RHEL, Rocky, Alma, Fedora
  • tmux session management - Persistent console access
  • Automated maintenance - Scheduled restarts, backups, and log rotation
  • Discord/Slack notifications - Webhooks for server events
  • Multiple instances - Run several servers on one machine

Requirements

Supported Distributions:

  • Debian/Ubuntu: Ubuntu 24.10+, Debian 13 (Trixie)+
  • RHEL Family: RHEL 10+, Rocky 10+, Alma 10+, Fedora 41+

System Requirements:

  • glibc 2.40 or newer (required by Stationeers RakNet networking since Jan 2026)
  • 10GB disk space
  • 16GB RAM recommended (8GB minimum)
  • sudo privileges for installation

Quick Start

1. Download and Install

# Clone the repository
git clone https://github.com/jdprofresh/stationeers-dedicated.git
cd stationeers-dedicated

# Or download directly
curl -O https://raw.githubusercontent.com/jdprofresh/stationeers-dedicated/main/stationeers
chmod +x stationeers

# Run installation (requires sudo)
sudo ./stationeers install

2. Configure

su - steam
cd ~/stationeers
./stationeers config

Edit at minimum:

  • SERVER_NAME - Your server's display name
  • ADMIN_SECRET - Admin password (change from default!)
  • WORLD_TYPE - Planet choice (Lunar, Mars, Europa, etc.)

3. Start

./stationeers start

Usage

Server Control

Command Alias Description
start st Start server in tmux session
stop sp Save then graceful shutdown
stop --nosave Shutdown without saving first
restart r Stop then start
console c Attach to server console (Ctrl+B D to detach)
status s Show server status and resources
monitor m Health check and restart if crashed/hung (for cron)

Maintenance

Command Alias Description
update u Update server via SteamCMD
update --beta Update to beta branch
validate v Validate/repair game files
check-update cu Check for available updates
backup b Create backup of saves
backup -l List backups (numbered)
backup -r <N> Restore backup by number
backup -p <N> Preview backup contents
backup --full Full backup (saves + config + mods + BepInEx)

Save Management

Command Alias Description
saves sv List saves and autosaves (numbered)
saves -r <N> Roll back to autosave by number
saves -p [N] Prune autosaves, keep N newest (default: 5)

Configuration

Command Description
config Edit config in $EDITOR
config show Display current configuration
config set KEY=VALUE Set a config value
config validate Check config for errors
config generate-secret Generate random admin secret

Scheduling (requires sudo)

Command Alias Description
schedule restart <TIME> sched Schedule daily restart
schedule restart <TIME> <DAYS> Restart on specific days
schedule backup <TIME> Schedule daily backup
schedule list Show active schedules
schedule remove <TYPE> Remove a schedule

Administration (requires sudo)

Command Description
install Install server and dependencies
uninstall Remove server (preserves saves by default)
fix-permissions Fix file ownership on all server files

Other Commands

Command Alias Description
logs l View server logs
logs -f Live tail logs
logs --rotate [N] Delete logs older than N days
send <cmd> Send command to server
save Trigger manual save
test-alert ta Send test notification to configured webhook
logs --manager View management action log
details dt Show installation details
help h Show help
completions bash Output bash completion script
completions install Install completions system-wide

Mod Management

Command Alias Description
mods m List installed mods with status
mods add <id|path> Install from Workshop ID or local path
mods remove <mod> Uninstall a mod
mods enable <mod> Enable a disabled mod
mods disable <mod> Disable without removing
mods update [mod] Update Workshop mods (all if none specified)
mods info <mod> Show mod details
mods validate Check mod configuration integrity
mods setup-bepinex Install BepInEx for plugin mods
mods bepinex-status Show BepInEx installation status

Global Flags

Flag Short Description
--quiet -q Suppress non-error output (for cron/scripts)
--verbose -v Enable debug output for troubleshooting
--dry-run Preview destructive operations without executing
--instance NAME -I Operate on a named instance

Example: ./stationeers -v --dry-run backup -r 1

Configuration

The utility uses a two-tier configuration system:

  • stationeers.defaults.conf - All options with defaults and documentation. Overwritten on every install/update. Do not edit.
  • stationeers.conf - Your customizations. Only values you change from defaults. Never touched by the utility.
# Edit your overrides
./stationeers config

# View effective (merged) configuration
./stationeers config show

All Configuration Options

Setting Default Description
Server Identity
SERVER_NAME "My Stationeers Server" Display name in server browser
SERVER_PASSWORD "" Password to join (empty = public)
ADMIN_SECRET (generated) Secret for admin commands
MAX_PLAYERS 6 Maximum players (1-30)
Network
GAME_PORT 27016 UDP port for game traffic
UPDATE_PORT 27015 UDP port for Steam queries
UPNP_ENABLED false Auto port forwarding
World
WORLD_NAME "MyStation" Save file name
WORLD_TYPE "Lunar" Planet (see below)
DIFFICULTY "Normal" Game difficulty
START_CONDITION "DefaultStart" Spawn kit type (see below)
START_LOCATION "" Spawn point (see below)
Behavior
SERVER_VISIBLE true Show in public browser
AUTO_PAUSE true Pause when empty
SAVE_INTERVAL 300 Autosave frequency (seconds)
Maintenance
BACKUP_COUNT 7 Max backups to keep
LOG_ROTATE_DAYS 30 Auto-delete old logs (0 = disable)
Monitoring
MONITOR_QUERY_ENABLED true UDP query health check in monitor
MONITOR_QUERY_TIMEOUT 5 Health check timeout (seconds)
Notifications
WEBHOOK_URL "" Discord/Slack webhook URL
NOTIFY_ON_START false Alert on server start
NOTIFY_ON_STOP false Alert on server stop
NOTIFY_ON_CRASH true Alert on crash
NOTIFY_ON_UPDATE true Alert after updates
Mod Management
STEAM_LOGIN "" Steam username for Workshop downloads
USE_BEPINEX false Enable BepInEx plugin framework

World Types

Planet Value Notes
Moon Lunar Easiest, low gravity
Mars Mars2 Dust storms
Europa Europa3 Extreme cold
Mimas MimasHerschel Saturn's moon
Venus Venus Toxic atmosphere
Vulcan Vulcan2 Volcanic heat

Difficulties

Creative < Easy < Normal < Stationeer

Start Conditions

Value Description
DefaultStart Standard starter kit, shared spawn
DefaultStartCommunity Standard kit, each player spawns separately
Brutal Minimal gear, shared spawn
BrutalCommunity Minimal gear, separate spawns

Spawn Locations

Leave START_LOCATION empty for default spawn, or use random:

World Random Spawn
Lunar LunarRandom
Mars2 Mars2Random
Europa3 Europa3Random
MimasHerschel MimasHerschelRandom
Venus VenusRandom
Vulcan2 Vulcan2Random

Use <WorldType>Random for random spawn locations per player.

Firewall

Open UDP ports for Steam and game traffic:

ufw allow 27015:27016/udp

Advanced

Systemd Service

The installer can optionally set up a systemd service for auto-start on boot:

# During install, answer 'y' when prompted
# Or manually later:
sudo ./stationeers install  # Will ask about systemd

# Control with systemctl
sudo systemctl start stationeers
sudo systemctl stop stationeers
sudo systemctl status stationeers

Automation

Using Schedule Command (Recommended)

The built-in schedule command creates systemd timers for restarts and backups:

# Schedule daily restart at 4am
sudo ./stationeers schedule restart 04:00

# Schedule restart on specific days
sudo ./stationeers schedule restart 06:00 Mon,Wed,Fri

# Schedule daily backup at 3am
sudo ./stationeers schedule backup 03:00

# View active schedules
./stationeers schedule list

# Remove a schedule
sudo ./stationeers schedule remove restart

Using Cron

Alternatively, use cron for automated maintenance:

# Edit crontab
crontab -e

# Add entries:
*/5 * * * * /home/steam/stationeers/stationeers monitor  # Auto-restart if crashed
0 4 * * * /home/steam/stationeers/stationeers backup     # Daily backup at 4am
0 5 * * 0 /home/steam/stationeers/stationeers update     # Weekly update Sunday 5am

Multiple Instances

Run multiple independent servers on the same machine:

# Install a second server instance
sudo ./stationeers --instance mars install

# Each instance has its own config, saves, and logs
# Located at /home/steam/stationeers-mars/

# Start the mars instance
./stationeers --instance mars start

# Check status of both
./stationeers status                    # Default instance
./stationeers --instance mars status    # Mars instance

# Attach to mars console
./stationeers --instance mars console

Each instance runs independently with its own:

  • Configuration file (stationeers.conf)
  • Save data (saves/)
  • Logs (logs/)
  • Backups (backups/)
  • tmux session (stationeers-mars)

Multi-User Access

Allow others to manage the server by adding them to the steam group:

# Add a user (as root)
sudo usermod -aG steam frienduser

# After re-login, they can manage the server
/home/steam/stationeers/stationeers start
/home/steam/stationeers/stationeers status
/home/steam/stationeers/stationeers backup

# View who did what
./stationeers logs --manager

All management actions are logged to logs/manager.log with timestamps and usernames.

Notifications

Configure Discord or Slack webhooks to receive alerts:

  1. Create a webhook in your Discord channel or Slack workspace
  2. Edit the config file:
./stationeers config
  1. Add your webhook URL and enable desired notifications:
WEBHOOK_URL="https://discord.com/api/webhooks/..."
NOTIFY_ON_START=false
NOTIFY_ON_STOP=false
NOTIFY_ON_CRASH=true    # Alert when server crashes
NOTIFY_ON_UPDATE=true   # Alert when update is applied
  1. Test your webhook:
./stationeers test-alert

Mod Management

Stationeers supports two types of mods with different requirements:

Mod Types

Type Description Server Setup Client Auto-Download?
XML-only Recipe tweaks, item stats mods add <workshop-id> Yes
Plugin New mechanics, UI changes BepInEx + mods Mod files only

Public Server Considerations

Important: BepInEx and StationeersLaunchPad are NOT available on the Steam Workshop. They must be manually installed by players on their game client.

For public servers, this creates different player experiences:

Mod Type Player Experience
XML-only mods Seamless - players auto-download mods when joining
Plugin mods Players must manually install BepInEx + StationeersLaunchPad first

Recommendations:

  • For maximum accessibility: Use XML-only mods for a seamless "join and play" experience
  • For advanced mods: Use plugin mods, but document client setup requirements in your server description

Identifying Mod Types

Check the mod's Steam Workshop page:

  • XML-only: No special requirements mentioned, typically smaller mods
  • Plugin: Description mentions "BepInEx", "StationeersLaunchPad", or "requires plugin"

Common indicators of plugin mods:

  • Adds new game mechanics or systems
  • Modifies UI elements
  • Contains DLL files

Workshop Mod Setup

  1. Configure Steam credentials for Workshop downloads:

    ./stationeers config set STEAM_LOGIN=your_steam_username
  2. Install mods by Workshop ID:

    ./stationeers mods add 2847563921
  3. You may be prompted for Steam password and Steam Guard code on first download.

BepInEx Setup (for Plugin Mods)

  1. Install BepInEx and StationeersLaunchPad:

    ./stationeers mods setup-bepinex
  2. Verify installation:

    ./stationeers mods bepinex-status
  3. The server will automatically load BepInEx on next start (sets USE_BEPINEX=true).

  4. To remove BepInEx:

    ./stationeers mods setup-bepinex --remove

Client Setup Instructions (for Players)

If your server uses plugin mods, share these instructions with players:

  1. Download BepInEx 5.4.x (linux_x64 or windows_x64)
  2. Extract to your Stationeers game folder
  3. Download StationeersLaunchPad (client version)
  4. Extract to BepInEx/plugins/ folder
  5. Launch the game - BepInEx will initialize on first run

Directory Structure

After installation:

/home/steam/
  stationeers/
    stationeers          # CLI utility
    stationeers.conf         # User configuration overrides
    stationeers.defaults.conf # Default config (do not edit)
    saves/               # World saves
    logs/                # Server logs
      manager.log          # Management action audit log
    backups/             # Backup archives
  steamcmd/              # SteamCMD installation

Troubleshooting

Permission Errors on Saves

The server now auto-fixes common permission issues at startup. If auto-fix fails:

sudo ./stationeers fix-permissions

The fix-permissions command covers all server files: saves, logs, backups, config, server binary, BepInEx, and mods.

Uninstall

# Preserve saves (default)
sudo ./stationeers uninstall

# Remove everything including saves
sudo ./stationeers uninstall --full

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines on:

  • Reporting bugs
  • Suggesting features
  • Submitting pull requests

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by LinuxGSM - the Linux Game Server Managers project
  • Built for the Stationeers community

About

LGSM-style CLI for Stationeers dedicated servers on Linux. Single bash script with complete lifecycle management: install, update, backup, scheduling. Supports Ubuntu, Debian, RHEL, Rocky, Alma, Fedora. Features tmux sessions, systemd timers, Discord/Slack webhooks, multi-instance support, and bash completions.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages