Go to file
Martin Røed Jacobsen 124ea93bfe Clarified working directory 2015-10-27 12:56:17 +01:00
Dockerfile Corrected uid 2015-10-26 12:22:01 +01:00
README.md Clarified working directory 2015-10-27 12:56:17 +01:00
SpaceEngineers-Dedicated.cfg Added default config 2015-10-26 11:57:03 +01:00
build.sh Initial commit 2015-10-26 10:52:10 +01:00
install.sh Initial commit 2015-10-26 10:52:10 +01:00
space-engineers.service Fixed paths in service file 2015-10-26 11:55:42 +01:00

README.md

Space Engineers on Linux

Docker container for running a Space Engineers server on a Linux machine.

Requirements

  • Debian 8 (to use these files as-is)
  • docker (this one is obvious)
  • systemd (you can use System V init, but you will have to write your own startup script).

Setup

Perform the following steps in the written order.

  • Create a new system user account which will own the container. The files in this repository assumes that the new user is named saiban. You can of course change this to whatever you prefer. Please note that the user ID must correspond to the ID specified in the Dockerfile. If you change it here, you should change it there.
adduser --system --home /home/saiban --uid 256 --group --gecos "Space Engineers" saiban
  • Change to the new user and move into its home directory by issuing the following commands.
sudo -u saiban /bin/bash
cd
  • Create the required directory structure.
mkdir -p games/space-engineers/{docker,data}
mkdir -p games/space-engineers/data/Space\ Engineers/{Mods,Saves}
  • Clone this repository into the home directory of the new user account.
git clone git@github.com:marjacob/se-server.git games/space-engineers/docker
  • Obtain a copy of the most current DedicatedServer.zip and place it in ~/games/space-engineers/data. You will usually find it in [...]\SteamApps\SpaceEngineers\Tools\DedicatedServer.zip (do not extract its contents).

  • Upload your SpaceEngineers-Dedicated.cfg and place it in the same folder as DedicatedServer.zip. Use the one in this repository and edit it to your liking if you do not already have one.

  • Copy space-engineers.service from this repository to /etc/systemd/system. Do not forget to change the User and Group setting in this file if you did not go with the defaults.

sudo cp games/space-engineers/docker/space-engineers.service /etc/systemd/system
  • Build the image!

This will take a while.

games/space-engineers/docker/build.sh

Updating

Update Space Engineers by replacing the DedicatedServer.zip with an updated version and restarting the server.

Managing the server

Starting the server

sudo systemctl start space-engineers

Stopping the server

sudo systemctl stop space-engineers

Monitoring the server

This will give you live output from the server, as if it was running locally in your terminal.

sudo journalctl --no-tail -f -u space-engineeers

Additional notes

Running Space Engineers this way requires a helper program called sigmap which I developed for this use specifically. It is cloned and built by the Dockerfile and should not add any additional overhead. Because Space Engineers ignores SIGTERM which is sent by Docker to shut down the service, sigmap catches that signal and forwards SIGINT to Space Engineers.

See here for more information.