Setting up a headless server

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Rhom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Feb 15, 2017 9:43 pm
Contact:

Setting up a headless server

Post 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.
Rhom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Feb 15, 2017 9:43 pm
Contact:

Re: Setting up a headless server

Post 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?!
Loewchen
Global Moderator
Global Moderator
Posts: 9269
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Setting up a headless server

Post by Loewchen »

Just to make sure, you are trying to launch two instances of factorio on the same machine, the server and on steam?
Hurric4ne
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Feb 17, 2017 4:58 pm
Contact:

Re: Setting up a headless server

Post 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.
Rhom
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Feb 15, 2017 9:43 pm
Contact:

Re: Setting up a headless server

Post 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.
noliVe
Filter Inserter
Filter Inserter
Posts: 327
Joined: Tue May 24, 2016 7:46 am
Contact:

Re: Setting up a headless server

Post 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
Post Reply

Return to “Technical Help”