Sign inSign up

sknnr/stationeers-server

By sknnr

Updated 8 months ago

Image for running Stationeers game server

Image
0

2.6K

sknnr/stationeers-server repository overview

stationeers-server

Run Stationeers dedicated server in a container. Optionally includes helm chart for running in Kubernetes.

Disclaimer: This is not an official image. No support, implied or otherwise is offered to any end user by the author or anyone else. Feel free to do what you please with the contents of this repo.

Usage

The processes within the container do NOT run as root. Everything runs as the user steam (gid:10000/uid:10000 by default). If you exec into the container, you will drop into /home/steam as the steam user. Stationeers will be installed to /home/steam/stationeers. Any persistent volumes should be mounted to /home/steam/stationeers and be owned by 10000:10000. If you need to run as a different GID/UID you can build your own image and set the build arguments for CONTAINER_GID and CONTAINER_UID to specify to new values.

Requirements
  • 16 or more Gigabytes of RAM. The server will load with less, but will run out of RAM quickly, potentially leading to instability or crashes.
  • 6-8 CPU cores. The server will run with less, but it is strongly recommended to give it at least 6 cores due to the load caused by atmospheric calculations.
Ports
PortProtocolDefault
Game PortUDP27016
Update PortUDP27015
Environment Variables
NameDescriptionDefaultRequired
GAME_PORTPort for server connections.27016False
UPDATE_PORTPort for query of server.27015False
UPNP_ENABLEDEnable or disable UPNP supportfalseFalse
START_LOCALHOSTStart server listening on loopbackfalseFalse
SERVER_NAMEName of server"Containerized Stationeers"False
SERVER_VISIBLEDoes server show up on in-game listtrueFalse
SERVER_PASSWORDPassword to joinNoneFalse
SERVER_AUTH_SECRETAdmin paspswordNoneFalse
SERVER_MAX_PLAYERSMax players for server5 (1-20)False
AUTO_SAVEEnable or disable autosaveTrueFalse
SAVE_INTERVALTime in seconds between autosaves300False
AUTO_PAUSE_SERVERShould the server pause if no players are connectedTrueFalse
WORLD_NAMEWorld ID for the world to createLunarFalse
DIFFICULTYDifficulty of worldNormalFalse
START_CONDITIONEquipment you start withDefaultStartFalse
LOCATION_IDLocation ID of where you startLunarSpawnCraterVesperFalse
World Types (October 2025)
World NameWorldIDDifficulty IDsStartCondition IDsStartLocation IDs
Lunar (The Moon)LunarCreative, Easy, Normal, StationeerDefaultStart, DefaultStartCommunity, Brutal, BrutalCommunityLunarSpawnCraterVesper, LunarSpawnMontesUmbrarum, LunarSpawnCraterNox, LunarSpawnMonsArcanus, LunarSpawnRoundRobin
MarsMars2Creative, Easy, Normal, StationeerDefaultStart, DefaultStartCommunity, Brutal, BrutalCommunityMarsSpawnCanyonOverlook, MarsSpawnButchersFlat, MarsSpawnFindersCanyon, MarsSpawnHellasCrags, MarsSpawnDonutFlats, MarsSpawnRoundRobin
EuropaEuropa3Creative, Easy, Normal, StationeerEuropaDefault, EuropaDefaultCommunity, EuropaBrutal, EuropaBrutalCommunityEuropaSpawnIcyBasin, EuropaSpawnGlacialChannel, EuropaSpawnBalgatanPass, EuropaSpawnFrigidHighlands, EuropaSpawnTyreValley, EuropaSpawnRoundRobin
MimasMimasHerschelCreative, Easy, Normal, StationeerMimasDefault, MimasDefaultCommunity, MimasBrutal, MimasBrutalCommunityMimasSpawnCentralMesa, MimasSpawnHarrietCrater, MimasSpawnCraterField, MimasSpawnDustBowl, MimasSpawnRoundRobin
VulcanVulcanCreative, Easy, Normal, StationeerVulcanDefault, VulcanDefaultCommunity, VulcanBrutal, VulcanBrutalCommunityVulcanSpawnVestaValley, VulcanSpawnEtnasFury, VulcanSpawnIxionsDemise, VulcanSpawnTitusReach, VulcanSpawnRoundRobin
VenusVenusCreative, Easy, Normal, StationeerVenusDefault, VenusDefaultCommunity, VulcanBrutal, VulcanBrutalCommunityVenusSpawnGaiaValley, VenusSpawnDaisyValley, VenusSpawnFaithValley, VenusSpawnDuskValley, VenusSpawnRoundRobin

further documentation: https://stationeers-wiki.com/Dedicated_Server_Guide

Docker

To run the container in Docker, run the following command:

docker volume create stationeers-persistent-data
docker run \
  --detach \
  --name stationeers-server \
  --mount type=volume,source=stationeers-persistent-data,target=/home/steam/stationeers \
  --publish 27015:27015/udp \
  --publish 27016:27016/udp \
  --env=GAME_PORT=27016 \
  --env=UPDATE_PORT=27015 \
  sknnr/stationeers-server:latest
Docker Compose

To use Docker Compose, create a compose.yaml file similar to the below:

docker-compose up -d

To bring the container down:

docker-compose down

compose.yaml file:

services:
  stationeers:
    image: sknnr/stationeers-server:latest
    ports:
      - "27015:27015/udp"
      - "27016:27016/udp"
    environment:
      GAME_PORT: "27016"
      UPDATE_PORT: "27015"
    volumes:
      - stationeers-persistent-data:/home/steam/stationeers
    stop_grace_period: 90s

volumes:
  stationeers-persistent-data:
Podman

To run the container in Podman, run the following command:

podman volume create stationeers-persistent-data
podman run \
  --detach \
  --name stationeers-server \
  --mount type=volume,source=stationeers-persistent-data,target=/home/steam/stationeers \
  --publish 27015:27015/udp \
  --publish 27016:27016/udp \
  --env=GAME_PORT=27016 \
  --env=UPDATE_PORT=27015 \
  docker.io/sknnr/stationeers-server:latest
Kubernetes

I've built a Helm chart and have included it in the helm directory within this repo. Modify the values.yaml file to your liking and install the chart into your cluster. Be sure to create and specify a namespace as I did not include a template for provisioning a namespace.

The chart in this repo is also hosted in my helm-charts repository here

To install this chart from my helm-charts repository:

helm repo add jsknnr https://jsknnr.github.io/helm-charts
helm repo update

To install the chart from the repo:

helm install stationeers jsknnr/stationeers-server --values myvalues.yaml
# Where myvalues.yaml is your copy of the Values.yaml file with the settings that you want

FAQ

Q: Can you change and or make the user and group IDs configurable?
A: Short answer, no I will not. Longer answer, for security reasons it is best that containers have UID/GIDs at or above 10000 to avoid collision with container host UID/GIDs. To make this configurable, the container would have to start as root and then later change to the desired user... this is also a security concern. If you really need to change this, just take my repo and build your own image with IDs you prefer. Just change the build args in the Containerfile.

Q: Can you release an ARM64 based image?
A: No. Until the devs release ARM compiled server binaries I won't do this (otherwise requires some sort of emulation, performance cost, what's the point).

Q: I can't connect to my server, what is wrong?
A: This is no fault of my image. You need to double check settings on your router and on your container host. Check and then double check firewall rules, dnat/port forwarding rules, etc. If you are still having issues, it is possible that your internet provider (ISP) is using CGNAT (carrier-grade NAT) which can make it really hard if not impossible to host internet facing services from your local network. Contact them (your ISP) and discuss.

Tag summary

Content type

Image

Digest

sha256:9df129539

Size

148.4 MB

Last updated

8 months ago

docker pull sknnr/stationeers-server