7 Days to Die

7 Days to Die

View Stats:
Dedicated Linux server start at boot with systemd
Hi, me and my friend have started a linux dedicated server when we had problem with the windows one (not related to 7d2d). Everything worked flawlessly but the server didn't start automatically at boot time.

So we searched how to make a service for systemd and it works but when starting it, the server generate another map and instead of putting it in /home/server/.local/share/7DaysToDie/Saves/ it creates another folder /home/server/.local/share/7DaysToDie/GeneratedWorlds and it uses this one instead of the one in the saves folder.

Here's my systemd script:
[Unit] Description=7 Days to Die After=network.target nss-lookup.target [Service] Type=simple PIDFile=/run/7dtd.pid ExecStart=/home/server/7d2d-server/startserver.sh -configfile=serverconfig.xml ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID Restart=always [Install] WantedBy=multi-user.target

Am I doing something wrong?
< >
Showing 1-6 of 6 comments
SylenThunder Sep 11, 2019 @ 5:34pm 
Here's what I have for one of my servers using LGSM
[Unit] Description=Starts Nostalgia a16 server After=network-online.target Wants=network-online.target [Service] Type=simple User=sdtdserver WorkingDirectory=/home/nostalgia ExecStart=/home/nostalgia/sdtdserver start ExecStop=/home/nostalgia/sdtdserver stop Restart=no RemainAfterExit=yes #Assume that the service is running after main process exits with code 0 [Install] WantedBy=multi-user.target
SebSenseGreen Sep 11, 2019 @ 5:52pm 
Originally posted by SylenThunder:
Here's what I have for one of my servers using LGSM

Okay, I've added the user= parameter with my username which helped, now the server uses the right one in the saves folder but, the server still generates a GeneratedWorlds folder/map which take a long time to generate when started for the first time.

I've also added the WorkingDirectory parameter but it doesn't seem to change anything.

Is your script sdtdserver, for starting and stopping, a custom script? Could you post it so I can have a look at it?
Last edited by SebSenseGreen; Sep 11, 2019 @ 5:54pm
SebSenseGreen Sep 11, 2019 @ 6:28pm 
Originally posted by SylenThunder:
It's part of LGSM
https://linuxgsm.com/lgsm/sdtdserver/

Ha, I see. Well, thanks for the help, at least it works for now.

If anyone else have any idea why it generates that folder/map, I'm all ears.
SylenThunder Sep 11, 2019 @ 11:09pm 
a17 pre-generates the map on first start. It's for performance. This is listed in the patch notes.
SebSenseGreen Sep 12, 2019 @ 5:33pm 
Originally posted by SylenThunder:
a17 pre-generates the map on first start. It's for performance. This is listed in the patch notes.
Oh so this is normal then, it's not "another" map. Pretty good to know. Thank you very much for your help SylenThunder.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Sep 11, 2019 @ 5:24pm
Posts: 6