[0.16.36] Headless Server Ubuntu, start as service issue
Posted: Sat Apr 28, 2018 10:01 pm
Hello all,
I've followed this guide to set up Factorio as a headless server on an Ubuntu VPS.
The following systemctl service runs with no issues:
But I'd like to start the server with screen command so that I can SSH in and attach to the current server terminal session. I've tried adding "screen -S Factorio" to the start of the ExecStart line like so:
but this ends up giving me an error "Executable path is not absolute" in the systemctl log and fails to start Factorio on boot. Though I can open a terminal session and run the same command "screen -S Factorio /home/gamemaster/factorio/bin/x64/factorio --server-settings /home/gamemaster/factorio/data/server-settings.json --start-server-load-latest --console-log /home/gamemaster/Factorio.log" and it starts up the server and everything is fine.
Does anyone know what the issue is with adding the screen command to ExecStart? Is my syntax messed up?
I've followed this guide to set up Factorio as a headless server on an Ubuntu VPS.
The following systemctl service runs with no issues:
Code: Select all
[Unit]
Description=Factorio Server service
After=network.target
[Service]
User=gamemaster
ExecStart=/home/gamemaster/factorio/bin/x64/factorio --server-settings /home/gamemaster/factorio/data/server-settings.json --start-server-load-latest --console-log /home/gamemaster/Factorio.log
Restart=always
[Install]
WantedBy=multi-user.target
Code: Select all
ExecStart=screen -S Factorio /home/gamemaster/factorio/bin/x64/factorio --server-settings /home/gamemaster/factorio/data/server-settings.json --start-server-load-latest --console-log /home/gamemaster/Factorio.log
Does anyone know what the issue is with adding the screen command to ExecStart? Is my syntax messed up?