Repository: mmmaxwwwell/space-engineers-dedicated-docker-linux
Branch: main
Commit: 174d1a877200
Files: 13
Total size: 12.7 KB
Directory structure:
gitextract_gjwrf51d/
├── .dockerignore
├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── docker-compose.yml
├── entrypoint-space_engineers.bash
├── entrypoint.bash
├── install-winetricks
├── restart
├── start
├── stop
└── test
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
appdata/
================================================
FILE: .gitignore
================================================
appdata/
================================================
FILE: Dockerfile
================================================
FROM mmmaxwwwell/wine6:latest
COPY install-winetricks /scripts/
RUN \
mkdir /wineprefix &&\
chown -R wine:wine /wineprefix &&\
chmod +x /scripts/install-winetricks
WORKDIR /scripts
RUN runuser wine bash -c ./install-winetricks
RUN \
mkdir -p /appdata/space-engineers/bin &&\
mkdir -p /appdata/space-engineers/config
COPY entrypoint.bash /entrypoint.bash
COPY entrypoint-space_engineers.bash /entrypoint-space_engineers.bash
RUN chmod +x /entrypoint.bash && chmod +x /entrypoint-space_engineers.bash
CMD /entrypoint.bash
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2020 mmmaxwwwell
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# [mmmaxwwwell/space-engineers-dedicated-docker-linux](https://github.com/mmmaxwwwell/space-engineers-dedicated-docker-linux)
All of the space engineers dedicated server on wine containers I found wouldn't build, and I embarked on a journey to create my own.
## Features:
* Wine 6
* Debian Buster
* Installs default star system world on first run
* Automatically updates ```<LoadWorld>``` element in ```SpaceEngineers-Dedicated.cfg```
* Supports plugins.
* Image built and [available on dockerhub](https://hub.docker.com/r/mmmaxwwwell/space-engineers-dedicated-docker-linux)
* Easy to implement offsite backups, just copy everything in ```./appdata/space-engineers/config``` with your favorite backup tool.
* Reduced container size (~4gb decompressed).
Thank you to:
* [7thCore](https://github.com/7thCore) for [7thCore/sesrv-script](https://github.com/7thCore/sesrv-script)
* [Devidian](https://github.com/Devidian) for advancing the docker implementation to a working state!
* @Inflex for
* @Tsu, @Aedis, @ebbit, @data, @ReAn, @BloodyIron, @spawnAjak for all around helping when testing and getting this started
* [@UseAfterFreee](https://github.com/UseAfterFreee), [@woeisme](https:/github.com/woeisme), [@kennethx](https://github.com/kennethx), [@MarkL4YG](https://github.com/MarkL4YG), [@BaIthamel](https://github.com/BaIthamel), [@Tetrino](https://github.com/Tetrino), [@Teacay1](https://github.com/Teacay1), [@Fischchen](https://github.com/Fischchen), [@whodat](https://github.com/whodat), [@msansen](https://github.com/msansen), [@IndexOutOfMJ](https://github.com/IndexOutOfMJ) for opening issues or contributing to an issue conversation that improved the repo.
## Prerequisites:
* docker
* docker-compose (recommended, not required to run container)
* unzip
## Tips:
* You can copy the entire contents of ./appdata/space-engineers/config to make a backup, including the SpaceEngineers-Dedicated.cfg file.
* The ```./start``` script will start the server using docker-compose in detached mode, and then attaches to the log output. You can press <kbd>ctrl</kbd>+<kbd>c</kbd> to detach from the logs and keep the server running.
* If you are running plugins, the first time your run this, check your SpaceEngineers-Dedicated.cfg file for the Plugins element. If it spans multiple lines, you must replace it with ```<Plugins />```, exactly like that. The server will query ./appdata/space-engineers/config/Plugins and update the config file as needed from then on.
* If you start the docker container without placing SpaceEngineers-Dedicated.cfg in the correct location, docker will create an empty folder where it should be. The container won't run until you stop the container, delete the empty SpaceEngineers-Dedicated.cfg folder, and replace it with the actual file.
## Usage:
### -RECOMENDED- Pull from dockerhub and run with docker-compose
* Clone this repo with ```git clone https://github.com/mmmaxwwwell/space-engineers-dedicated-docker-linux.git```.
* Change directory into the cloned repo with ```cd space-engineers-dedicated-docker-linux```.
* Run the start script with ```./start```. This will initialize the ./appdata folder, unzip an empty star system from star-system.zip and start the server.
### Pull and run from dockerhub without docker-compose:
From this directory run :
```
docker run --restart always -p "27016:27016/udp" \
-v $(pwd)/appdata/space-engineers/config/World:/appdata/space-engineers/World\
-v $(pwd)/appdata/space-engineers/bins/SpaceEngineersDedicated:/appdata/space-engineers/SpaceEngineersDedicated\
-v $(pwd)/appdata/space-engineers/bins/steamcmd:/home/se/.steam\
-v $(pwd)/appdata/space-engineers/config/SpaceEngineers-Dedicated.cfg:/appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg\
mmmaxwwwell/space-engineers-dedicated-docker-linux:latest
```
## Exit Codes:
| Exit Code | Reason |
| - | - |
| 129 | Container is missing /appdata/space-engineers/World folder, volume mounts are mounted incorrectly. |
| 130 | Container is missing /appdata/space-engineers/World/Sandbox.sbc, World is not placed in the right folder, or the volume mounts are mounted incorrectly. Ensure your world is in ```./appdata/space-engineers/config/World/```.|
| 131 | Container is missing the dedicated server config file SpaceEngineers-Dedicated.cfg. Ensure that you have placed SpaceEngineers-Dedicated.cfg at ```./appdata/space-engineers/config/SpaceEngineers-Dedicated.cfg```. |
## Directory Structure:
```
SpaceEngineersDedicated contains the dedicated server files
steamcmd contains steamcmd
config contains all the user configurable files for the game instance
World contains the world files
appdata
└── space-engineers
├── bins
│ ├── SpaceEngineersDedicated
│ └── steamcmd
└── config
├── SpaceEngineers-Dedicated.cfg
└── World
├── Alien-291759539d120000.vx2
├── EarthLike-1779144428d120000.vx2
├── Europa-595048092d19000.vx2
├── Mars-2044023682d120000.vx2
├── Moon-1353915701d19000.vx2
├── SANDBOX_0_0_0_.sbs
├── Sandbox.sbc
├── Sandbox_config.sbc
├── Titan-2124704365d19000.vx2
├── Triton-12345d80253.vx2
└── thumb.jpg
```
================================================
FILE: docker-compose.yml
================================================
version: '3'
services:
se-server:
image: mmmaxwwwell/space-engineers-dedicated-docker-linux:latest
container_name: space-engineers-dedicated-docker-linux
restart: unless-stopped
volumes:
- ./appdata/space-engineers/config/World:/appdata/space-engineers/World
- ./appdata/space-engineers/config/Plugins:/appdata/space-engineers/Plugins
- ./appdata/space-engineers/config/SpaceEngineers-Dedicated.cfg:/appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg
- ./appdata/space-engineers/bins/SpaceEngineersDedicated:/appdata/space-engineers/SpaceEngineersDedicated
- ./appdata/space-engineers/bins/steamcmd:/home/wine/.steam
ports:
- "27016:27016/udp"
================================================
FILE: entrypoint-space_engineers.bash
================================================
#!/bin/bash
source ~/.profile
source ~/.bash_profile
cd /appdata/space-engineers/SpaceEngineersDedicated/DedicatedServer64/
env WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix wine /appdata/space-engineers/SpaceEngineersDedicated/DedicatedServer64/SpaceEngineersDedicated.exe -noconsole -path Z:\\appdata\\space-engineers\\SpaceEngineersDedicated -ignorelastsession
================================================
FILE: entrypoint.bash
================================================
#!/bin/bash
# #check if /appdata/space-engineers/config/World is a folder
if [ ! -d "/appdata/space-engineers/World" ]; then
echo "World folder does not exist, exiting"
exit 129
fi
# #check if /appdata/space-engineers/config/World/Sandbox.sbc exists and is a file
if [ ! -f "/appdata/space-engineers/World/Sandbox.sbc" ]; then
echo "Sandbox.sbc file does not exist, exiting."
exit 130
fi
# #check if /appdata/space-engineers/config/SpaceEngineers-Dedicated.cfg is a file
if [ ! -f "/appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg" ]; then
echo "SpaceEngineers-Dedicated.cfg file does not exist, exiting."
exit 131
fi
#set <LoadWorld> to the correct value
cat /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg | sed -E '/.*LoadWorld.*/c\ <LoadWorld>Z:\\appdata\\space-engineers\\World</LoadWorld>' > /tmp/SpaceEngineers-Dedicated.cfg && cat /tmp/SpaceEngineers-Dedicated.cfg > /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg
#set game port to the correct value
#cat /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg | sed -E '/.*ServerPort.*/c\ <ServerPort>27016</ServerPort>' > /tmp/SpaceEngineers-Dedicated.cfg && cat /tmp/SpaceEngineers-Dedicated.cfg > /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg
#configure plugins section in SpaceEngineers-Dedicated.cfg
#get new plugins string
if [ "$(ls -1 /appdata/space-engineers/Plugins/*.dll | wc -l)" -gt "0" ]; then
PLUGINS_STRING=$(ls -1 /appdata/space-engineers/Plugins/*.dll |\
awk '{ print "<string>" $0 "</string>" }' |\
tr -d '\n' |\
awk '{ print "<Plugins>" $0 "</Plugins>" }' )
else
PLUGINS_STRING="<Plugins />"
fi
SED_EXPRESSION_EMPTY="s/<Plugins \/>/${PLUGINS_STRING////\\/} /g"
SED_EXPRESSION_FULL="s/<Plugins>.*<\/Plugins>/${PLUGINS_STRING////\\/} /g"
#find and replace in SpaceEngineers-Dedicated.cfg for empty "<Plugins />" element
cat /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg | sed -E "$SED_EXPRESSION_EMPTY" > /tmp/SpaceEngineers-Dedicated.cfg && cat /tmp/SpaceEngineers-Dedicated.cfg > /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg
#find and replace in SpaceEngineers-Dedicated.cfg for filled out "<Plugins>...</Plugins>" element
# sed can't handle multiple lines easily, so everything needs to be on a single line.
cat /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg | sed -E "$SED_EXPRESSION_FULL" > /tmp/SpaceEngineers-Dedicated.cfg && cat /tmp/SpaceEngineers-Dedicated.cfg > /appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg
runuser -l wine bash -c 'steamcmd +login anonymous +@sSteamCmdForcePlatformType windows +force_install_dir /appdata/space-engineers/SpaceEngineersDedicated +app_update 298740 +quit'
runuser -l wine bash -c '/entrypoint-space_engineers.bash'
================================================
FILE: install-winetricks
================================================
#!/bin/bash
Xvfb :5 -screen 0 1024x768x16 &
env WINEARCH=win64 WINEDEBUG=-all WINEDLLOVERRIDES="mscoree=d" WINEPREFIX=/wineprefix wineboot --init /nogui
env WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix ./winetricks corefonts
env DISPLAY=:5.0 WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix ./winetricks -q vcrun2017
env DISPLAY=:5.0 WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix ./winetricks -q --force dotnet48
env WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix ./winetricks sound=disabled
env DISPLAY=:5.0 WINEARCH=win64 WINEDEBUG=-all WINEPREFIX=/wineprefix ./winetricks -q vcrun2013
rm -rf ~/.cache
================================================
FILE: restart
================================================
#!/bin/bash
./stop
./start
================================================
FILE: start
================================================
#!/bin/bash
sudo mkdir -p appdata/space-engineers/bins/SpaceEngineersDedicated
sudo mkdir -p appdata/space-engineers/bins/steamcmd
sudo mkdir -p appdata/space-engineers/config/World
sudo mkdir -p appdata/space-engineers/config/Plugins
if [ ! -f ./appdata/space-engineers/config/World/Sandbox.sbc ]; then
echo "World not found, initalizing empty star system..."
sudo unzip -n star-system.zip -d ./appdata/space-engineers/config
fi
#container executes server as 1000:1000
if [ "$(stat -c '%u' appdata)" != "1000" ]; then
echo "Setting owner of appdata to UID 1000"
sudo chown -R 1000:1000 appdata
fi
sudo docker-compose up -d
sudo docker-compose logs -f
================================================
FILE: stop
================================================
#/bin/bash
sudo docker-compose stop
================================================
FILE: test
================================================
#!/bin/bash
#docker run -it --rm --entrypoint /bin/bash -p "27016:27016/udp" \
docker run -p "27016:27016/udp" \
-v $(pwd)/appdata/space-engineers/config/World:/appdata/space-engineers/World\
-v $(pwd)/appdata/space-engineers/config/Plugins:/appdata/space-engineers/Plugins\
-v $(pwd)/appdata/space-engineers/bins/SpaceEngineersDedicated:/appdata/space-engineers/SpaceEngineersDedicated\
-v $(pwd)/appdata/space-engineers/bins/steamcmd:/home/se/.steam\
-v $(pwd)/appdata/space-engineers/config/SpaceEngineers-Dedicated.cfg:/appdata/space-engineers/SpaceEngineersDedicated/SpaceEngineers-Dedicated.cfg\
mmmaxwwwell/space-engineers-dedicated-docker-linux:wine6-plugins
gitextract_gjwrf51d/ ├── .dockerignore ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── docker-compose.yml ├── entrypoint-space_engineers.bash ├── entrypoint.bash ├── install-winetricks ├── restart ├── start ├── stop └── test
Condensed preview — 13 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (14K chars).
[
{
"path": ".dockerignore",
"chars": 8,
"preview": "appdata/"
},
{
"path": ".gitignore",
"chars": 8,
"preview": "appdata/"
},
{
"path": "Dockerfile",
"chars": 537,
"preview": "FROM mmmaxwwwell/wine6:latest\n\nCOPY install-winetricks /scripts/\nRUN \\\n mkdir /wineprefix &&\\\n chown -R wine:wine /win"
},
{
"path": "LICENSE",
"chars": 1068,
"preview": "MIT License\n\nCopyright (c) 2020 mmmaxwwwell\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
},
{
"path": "README.md",
"chars": 5278,
"preview": "# [mmmaxwwwell/space-engineers-dedicated-docker-linux](https://github.com/mmmaxwwwell/space-engineers-dedicated-docker-l"
},
{
"path": "docker-compose.yml",
"chars": 728,
"preview": "version: '3'\n\nservices:\n se-server:\n image: mmmaxwwwell/space-engineers-dedicated-docker-linux:latest\n container_"
},
{
"path": "entrypoint-space_engineers.bash",
"chars": 370,
"preview": "#!/bin/bash\nsource ~/.profile\nsource ~/.bash_profile\ncd /appdata/space-engineers/SpaceEngineersDedicated/DedicatedServer"
},
{
"path": "entrypoint.bash",
"chars": 2944,
"preview": "#!/bin/bash\n\n# #check if /appdata/space-engineers/config/World is a folder\nif [ ! -d \"/appdata/space-engineers/World\" ];"
},
{
"path": "install-winetricks",
"chars": 634,
"preview": "#!/bin/bash\nXvfb :5 -screen 0 1024x768x16 &\nenv WINEARCH=win64 WINEDEBUG=-all WINEDLLOVERRIDES=\"mscoree=d\" WINEPREFIX=/w"
},
{
"path": "restart",
"chars": 26,
"preview": "#!/bin/bash\n./stop\n./start"
},
{
"path": "start",
"chars": 670,
"preview": "#!/bin/bash\nsudo mkdir -p appdata/space-engineers/bins/SpaceEngineersDedicated\nsudo mkdir -p appdata/space-engineers/bin"
},
{
"path": "stop",
"chars": 35,
"preview": "#/bin/bash\nsudo docker-compose stop"
},
{
"path": "test",
"chars": 678,
"preview": "#!/bin/bash\n#docker run -it --rm --entrypoint /bin/bash -p \"27016:27016/udp\" \\\ndocker run -p \"27016:27016/udp\" \\\n -v $("
}
]
About this extraction
This page contains the full source code of the mmmaxwwwell/space-engineers-dedicated-docker-linux GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 13 files (12.7 KB), approximately 3.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.