Code: Select all
screen -dmSU "screen.window.factorio.instance_1"; \
screen -S "screen.window.factorio.instance_1" -p 0 -X stuff "
/opt/factorio/bin/x64/factorio
--start-server /opt/factorio/saves/load.zip
--bind 0.0.0.0:34197 + 1 per INSTANCE
--server-settings /opt/factorio/config/server-settings.instance_1.json
--server-adminlist /opt/factorio/config/server-adminlist.json
--mod-directory /opt/factorio/mods
--rcon-port 27015 + 1 per INSTANCE
--rcon-password YOUR_PASSWORD
^M"; \
screen -r "screen.window.factorio.instance_1";
[CTRL] + [D] = minimize the screen and keep it running in the background