Page 2 of 3

Re: Dedicated Server Guide on Windows

Posted: Mon Apr 11, 2016 3:33 pm
by sasaa_86
found this (maybe helpfull to put on the wiki)

General options:
-h [ --help ] display help
--version show version information
-c [ --config ] PATH config file to use

Running options:
-s [ --map2scenario ] arg map to scenario conversion
--apply-update arg immediately apply update package
--create SAVE create a new map
--start-server SAVE start a multiplayer server

Server options:
--latency N multiplayer server latency, in ticks
--latency-ms N multiplayer server latency, in milliseconds
--autosave-interval N (=2) server autosave interval, in minutes
--autosave-slots N (=3) server autosave slots
--disallow-commands disallow use of the command console
--peer-to-peer use peer-to-peer communication
--no-auto-pause don't automatically pause when no players are
connected
--port N network port to use

I just taken it from the linux version of facorio headless server but i guess it would work on any server instance
checked its the same on windows.

I use (linux)

Code: Select all

sudo ./factorio --autosave-interval 5 --latency 12 --disallow-commands --start-server server.zip
for windows you should use a *.bat file or *.cmd and put this in

Code: Select all

@echo off
:start
START /WAIT /HIGH factorio.exe --autosave-interval 5 --latency 12 --disallow-commands --start-server server.zip
Echo.
Echo Crashed @ %time% - %date%
echo Restarting in 10 seconds...
timeout /t 10
goto start
I'm currently setting up a MP server will let you know when its done.
Just one question about shutting the server down and restarting it. what zip file should i use to startup?


I'm dutch btw greets

Re: Dedicated Server Guide on Windows

Posted: Tue Apr 12, 2016 4:40 pm
by Bisa
sasaa_86 wrote: Just one question about shutting the server down and restarting it. what zip file should i use to startup?[/b]

I'm dutch btw greets
There's a bug in 0.12.30 preventing the server from saving on clean exit - until then ensure you have autosaves enabled, as for starting a factorio server on linux: Try this ;)

Re: Dedicated Server Guide on Windows

Posted: Tue Apr 26, 2016 10:59 pm
by binbinhfr
Under Windows 7, with a steam install, is it possible to run a server AND a client on the same machine ? I cannot manage how to do it, there is always an error "the process can not access..." .
Even if I try to duplicate and rename factorio.exe, to have 2 separate programs running (factorio2.exe for the server)

Re: Dedicated Server Guide on Windows

Posted: Wed Apr 27, 2016 4:08 pm
by Cr4zy
Yes it's possible I run both my client and server from the steam install. Could be you haven't set configs up for the server? Servers require different write data paths which can only be provided though another config.

script in my sig might help you out if you can't solve it.

Re: Dedicated Server Guide on Windows

Posted: Wed Apr 27, 2016 8:37 pm
by binbinhfr
Wow that's a BATCH file !!! ;)
I'll have a look at it to understand this config file and path thing.
For the moment, I have a headless server on a contiguous machine.

Re: Dedicated Server Guide on Windows

Posted: Mon May 02, 2016 10:11 pm
by cassie112
Hi,

i've tried to use this server.bat file, but everytime i execute it, it opens the commandprompt but not factorio itself, but when i try to open factorio it says "it is already in use by something else".
i wont upload what is on the commandprompt, because i dont know if there is any private info on it.
thanks,

C.

Re: Dedicated Server Guide on Windows

Posted: Tue May 03, 2016 3:48 pm
by Bisa
cassie112 wrote:Hi,

i've tried to use this server.bat file, but everytime i execute it, it opens the commandprompt but not factorio itself, but when i try to open factorio it says "it is already in use by something else".
i wont upload what is on the commandprompt, because i dont know if there is any private info on it.
thanks,

C.
I'm afraid without the command prompt output its a bit tricky to guess what is happening - perhaps try this: viewtopic.php?f=133&t=23838

Null

Posted: Fri Dec 29, 2017 6:42 pm
by Brewcmas
Deleted Post

Re: Dedicated Server Guide on Windows

Posted: Mon Aug 20, 2018 1:34 pm
by Null8fuenf10
Brewcmas wrote:I have the server up and running with no issue, but it seems to crash every time the server is inactive for a period of time (no one logged on, just running in paused state).

Any ideas how to fix this?

You can set it to false in the server-settings.json file under "auto_pause".
If You don't have the file, You can unpack and copy the file from an Linux headless build to You Factorio installation folder (where the folders 'bin', 'data', etc are).
You'll need to fill in all Your server data tho (server name, player count, Your login data, etc.)

Re: Dedicated Server Guide on Windows

Posted: Wed Jan 30, 2019 12:23 am
by NMSquirrel
ok WTH?
it starts then hangs here...
the program stops running at that line every time..

any idea what is going on?
i have checked task manager and there is no factorio running.
northbrook cement.jpg
northbrook cement.jpg (193.75 KiB) Viewed 9614 times

Re: Dedicated Server Guide on Windows

Posted: Tue Apr 16, 2019 11:30 am
by ImTheRealSlayer
NMSquirrel wrote:
Wed Jan 30, 2019 12:23 am
ok WTH?
it starts then hangs here...
the program stops running at that line every time..

any idea what is going on?
i have checked task manager and there is no factorio running.

northbrook cement.jpg
If you can type in that line there, then congratualtions! your server is running! if not, then you might want to restart your PC. Might help, might not.

Re: Dedicated Server Guide on Windows

Posted: Thu Jun 27, 2019 8:04 pm
by JePeSWE
Hi

New at this, i follow the first post, looks like it started. But how do i connec to it, and is it possible to connect to the server from factorio on steam if the server is on the same pc.?


/Jerry

Re: Dedicated Server Guide on Windows

Posted: Thu Jun 27, 2019 8:09 pm
by JePeSWE
daniel34 wrote:
Fri Dec 11, 2015 10:29 am
maisel16 wrote:Can i run more headless Windows Servers?
Yes you can, if you set a different port in the config.ini for each instance. The players then have to connect on that port aswell.
Where can i find the config.ini?

/Jerry