Page 1 of 1
Cannot run a headless server and play on the same computer
Posted: Mon Mar 07, 2016 3:57 am
by Tesse11ation
Hello everyone, I have Factorio on Steam and much to my disappointment I've found that it is impossible to play the game and run the server.bat file at the same time. I would like to be able to play on my own headless server with the same computer running it.
I think this issue was talked about before but I have not seen it show up on the bug reports section of the forums.
Re: Cannot run a headless server and play on the same computer
Posted: Mon Mar 07, 2016 7:06 am
by Koub
If you want to do that, you have to change the portfor the client side of Factorio.
Maybe this can help :
viewtopic.php?f=11&t=13634&start=10#p93014
[Edit] : this one is even better :
viewtopic.php?f=53&t=20811#p130869
Re: Cannot run a headless server and play on the same computer
Posted: Mon Mar 07, 2016 1:55 pm
by Tesse11ation
The second link is a great resource, but how do I start a server with parameters? Thanks for your help by the way.
Re: Cannot run a headless server and play on the same computer
Posted: Mon Mar 07, 2016 10:53 pm
by Koub
Hi,
You may find the help you need :
here :
https://wiki.factorio.com/index.php?title=GameClient
and here :
https://wiki.factorio.com/index.php?title=Multiplayer
I'm sorry I can't be much more helpful, I have never set up a server, I'm the kind of solo guy (I always shoot first ^^).
Re: Cannot run a headless server and play on the same computer
Posted: Sat Nov 05, 2016 1:09 pm
by frankmig
Start Factorio normally and create a new game. Save the game, such as servermap
Copy C:\Users\<username>\AppData\Roaming\Factorio\config
to
C:\Users\<%username%>\AppData\Roaming\Factorio with a different name of course such as config-server
So there will be in side Factorio folder a folder with config and config-server
Inside config-server folder edit config.ini
write-data=__PATH__system-write-data__
to
write-data=__PATH__system-write-data__/server
Navigate to where base game is installed
For steam:
C:\Program Files (x86)\Steam\steamapps\common\Factorio
Create a new folder where the server files will reside such as on the Desktop called Factorio Server
Inside the folder copy contents of C:\Program Files (x86)\Steam\steamapps\common\Factorio
In Factorio Server folder edit config-path.cfg
config-path=__PATH__system-write-data__/config
to
config-path=__PATH__system-write-data__/server
Navigate to \Factorio Server\bin\x64
Create new text document, add the following:
cd "\\Factorio Server\bin\x64"
start /wait factorio.exe --start-server "servermap.zip"
save file as filename.bat
*remember to save file type as all files
copy servermap.zip file to this location,
this should be located at C:\Users\<username>\AppData\Roaming\Factorio\saves
run .bat file
this will open command prompt with server running
you should be able to run Factorio normally
Re: Cannot run a headless server and play on the same computer
Posted: Tue Jun 15, 2021 5:19 pm
by trampek
latest guide kinda works but for me its few bits were diffrent like - there was no config file in appdata/roaming but it was in game folder, then it kinda worked but created own save somehow and loaded no mods so i just copy saves and mods folders to game server folder and all good