Closed IARI closed 1 year ago
Good morning, can you post your compose file or startup parameter too?
Hello,
I have actually managed to find a solution by now. I am still not sure about what happened exactly but i have a suspicion.
So after I set up the Dedicated Server locally on my machine and started it for the first time, it had created the folder
\Saves\Earth Planet 02-22-2022 20-17-28
within its instance folder.
Then, whenever the docker container started, for some reason it always kept writing the following value in SpaceEngineers-Dedicated.cfg:
<LoadWorld>Z:\appdata\space-engineers\instances\Spaceblabla\Saves\Earth Planet</LoadWorld>
At first I thought the path form the save that I had uploaded must somehow have been crippled along the way, and had its end-part cut off - but that doesn't seem to make so much sense, why would it particularly cut off at that point. So now my assumption is, that this Path is actually somehow generated from 1. the instance directory and 2. the World name
<WorldName>Earth Planet</WorldName>
If this assumption is correct, that would mean that renaming the save is an important step (which I have not yet found in any forum, documentation or tutorial for setting up a dedicated SE server) Can you clarify on this?
For the sake of completeness and finding out what happened here's the docker file:
version: "3.8"
services:
spaceengineers:
container_name: "spaceengineers"
image: "devidian/spaceengineers"
restart: unless-stopped
volumes:
# left side: your docker-host machine
# right side: the paths in the image (!!do not change!!)
- instances:/appdata/space-engineers/instances
- dedicated:/appdata/space-engineers/SpaceEngineersDedicated
- steamcmd:/root/.steam
ports:
- target: 8080
published: 18080
protocol: tcp
mode: host
- target: 27016
published: 27016
protocol: udp
mode: host
networks:
proxy:
ipv4_address: 172.70.0.75
environment:
- WINEDEBUG=-all
# change TestInstance to your instance name
- INSTANCE_NAME=Spaceblabla
#- INSTANCE_IP=194.13.83.121
#- CURRENT_IP=194.13.83.121
labels:
- "traefik.enable=false"
- "traefik.http.routers.spaceengineers.entrypoints=https"
- "traefik.http.routers.spaceengineers.rule=Host(`<REDACTED>`)"
- "traefik.http.routers.spaceengineers.service=spaceengineers"
- "traefik.http.services.spaceengineers.loadbalancer.server.port=8080"
volumes:
instances:
dedicated:
steamcmd:
networks:
proxy:
external: true
Okay, if we take a look at the example in this repository, we first have a directory called DockerQuickStart
which is the INSTANCE_NAME
of the quick start example world. If you then take a look at the SpaceEngineers-Dedicated.cfg
inside this directory and search for WorldName
, you will find that the world is called Docker Star System
, so the result is, that the save is found in /INSTANCE_NAME/Saves/WorldName
=> /DockerQuickStart/Saves/Docker\ Star\ System/
.
The entrypoint.sh
script takes the WorldName
and the INSTANCE_NAME
and replaces the string in LoadWorld
with that format because if you generate your instance on Windows, the path is something like <LoadWorld>C:\ProgramData\SpaceEngineersDedicated\DockerQuickStart\Saves\Docker Star System</LoadWorld>
which will not find the world you created and therefore create a new one.
So if you create an instance on windows, it should look like the example in this repository, including Save directory.
Just as a side note, unless I am generating it incorrectly on Windows. The Save folder gets saved as "WorldName
For example, I created a server on my Windows machine, World Name of Star System. It automatically creates "Saves\Star System 07-06-2022 12-15-12" in the instance path. So, I had to chop off the date time and copy it to the server. Might be worth mentioning in the documentation.
I also had an issue, I am using Unraid to host my containers, and INSTANCE_NAME was not configurable, so I had to manually add a variable called INSTANCE_NAME and set the name of my instance as it wasn't loading the correct instance. But that may be some weirdness related to how Unraid does stuff.
I haven't managed to successfully run the container. The log game server always crashes with a log like this:
What I have done:
C:\ProgramData\SpaceEngineersDedicated\Spaceblabla
and uploaded it to the docker volume that is mounted inside the container at/appdata/space-engineers/instances
Now after it failed, as suggested here I found that inside the instance
/Saves/LastSession.sbl
would have an absolute local path and corrected it. it didn't help.For some reason, the world just isn't loaded.