Factorio

Factorio

View Stats:
HuggernautNL Mar 25, 2016 @ 10:26am
Stop (headless) server command?
Maybe I'm stupid, but I can not find a command to stop the server.
Currently I "stop" it by killing the screen session on linux, but surely that is not the right way.

Anybody help me out?
< >
Showing 1-15 of 20 comments
Ozone Mar 25, 2016 @ 10:43am 
CTRL + C ?
HuggernautNL Mar 25, 2016 @ 2:45pm 
thats not a command is it?
AlexMBrennan Mar 25, 2016 @ 3:24pm 
ctrl c is equivalent to
killall -SIGINT
Last edited by AlexMBrennan; Mar 25, 2016 @ 3:25pm
HuggernautNL Mar 25, 2016 @ 4:23pm 
same as just closing the screen session then
HuggernautNL Mar 25, 2016 @ 4:23pm 
but is there really no stop command?
HuggernautNL Mar 28, 2016 @ 3:39am 
Anyone?
wcbarney Mar 28, 2016 @ 4:47am 
Ummmmm ..... Do you mean you want to go to the Main Menu [Esc], then Save Game, then Exit?
HuggernautNL Mar 28, 2016 @ 4:53am 
No, I am talking about a terminal command in Linux
HuggernautNL Apr 22, 2016 @ 7:45am 
Bump.

Dev team? Help needed here.
Berserker Apr 22, 2016 @ 8:30am 
You just press ctrl + c in your linux terminal, it then saves and exits.
daniel0674 Apr 22, 2016 @ 8:49am 
It is supposed to work with CTRL+C (I recommend to use a screen session), this does the same as sending SIGINT to it, which saves the game to the original filename and quits.

With 0.12.30 there is a bug making this not work (at least on linux), which will be fixed in 0.12.31.
[0.12.30][Linux x64] Does not save on graceful shutdown[forums.factorio.com]

You can also save manually if you have commands enabled, using
/c game.server_save()
from any connected peer.
Last edited by daniel0674; Apr 22, 2016 @ 8:49am
HuggernautNL Apr 22, 2016 @ 12:43pm 
I will try this later. (Not at home currently). And yes I use screen on linux.
Pi Jan 29, 2017 @ 3:31am 
I think you mean the linux command?

Systemctrl stop factorio
Waronone Apr 1, 2020 @ 4:38am 
For reference, /quit seems to work
akira Sep 17, 2022 @ 4:30pm 
Sorry to revive this old topic, but it's so funny to watch the ignorant replies. What he means is that the headless server have commands.
Example: /opt/factorio/bin/x64/factorio --start-server

Yes, it NORMALLY runs on the terminal you type it in, but if you transformed it into a service to run through systemctl or any other hidden shell, you might be locked out, unable to see or interact with the server.

Well:

1. check if it is a running service using: systemctl status factorio
2. if yes, use systemctl stop factorio (it may need a "sudo" prefix there)
3. if not a service, use ps aux | grep factorio
4. the first column of results is the user running it, the second is the PID number, and the last is the path to where it started from
5. use kill <PID number> in all the currencies listed (example: kill 3428)

Done.

Also, there is no way to stop the server from the inside, like using an admin player account.
Last edited by akira; Sep 17, 2022 @ 4:31pm
< >
Showing 1-15 of 20 comments
Per page: 1530 50

Date Posted: Mar 25, 2016 @ 10:26am
Posts: 20