Page 1 of 1

Setting up a headless server

Posted: Wed Feb 15, 2017 9:54 pm
by Rhom
Hi, the server seems to launch correctly via my batch file. When I try and launch Factorio via steam (so I can connect and test my server) I get the message:

Could not move file "factorio-current.log". Another instance of Factorio is probably running.

I have tried copying the entire .exe directory to another drive and launching the server from this new copy.

Batch file is basically this:
"C:\Games\Factorio\exe\Factorio\bin\x64\Factorio.exe" --start-server C:\Games\Factorio\saves\multi-3.zip -c C:\Games\Factorio\server-config.ini --server-settings "C:\Games\Factorio\server-settings.json"

The top of server-config.ini is this:
[path]
read-data=__PATH__system-read-data__
write-data=__PATH__system-write-data__

The top of my config-path.cfg file is this:
config-path=__PATH__system-write-data__/config
use-system-read-write-data-directories=false


Thanks in advance.

Re: Setting up a headless server

Posted: Thu Feb 16, 2017 11:21 pm
by Rhom
Anyone!?

I have downloaded the zip file from the website, am trying to run the server from that directory. By default this is set in the .cfg file:
use-system-read-write-data-directories=false

Does this even work? If so, how can it be clashing when I launch the client from Steam? If the entire server is running from that directory how can it still be clashing?!

Re: Setting up a headless server

Posted: Thu Feb 16, 2017 11:36 pm
by Loewchen
Just to make sure, you are trying to launch two instances of factorio on the same machine, the server and on steam?

Re: Setting up a headless server

Posted: Fri Feb 17, 2017 5:03 pm
by Hurric4ne
I also had this problem. This mainly results in the fact that the headless server installation also uses your local factorio folder in C:/users/(yourname)/AppData/Roaming/Factorio.

I just downloaded the zip-package instead. Hope this works for you also.

Re: Setting up a headless server

Posted: Mon Feb 20, 2017 5:45 am
by Rhom
Just FYI for others who might encounter this issue.

I ended up having to download the zip file to run the server from AND I had to move my batch file and my config-path.cfg into the root directory created by the zip. My batch file is now just:
"C:\Games\Factorio\Factorio_0.14.22\bin\x64\Factorio.exe" --start-server C:\Games\Factorio\saves\Warehouse4.zip

It all works now, thanks and good luck to others who come across this issue.

Re: Setting up a headless server

Posted: Thu Mar 16, 2017 11:56 am
by noliVe
next time just change the write data folder to a new folder
[CONFIG.INI]
...
write-data= your/path/to/factorio-server
....

Remember to create this folder