How to make a Windows Dedicated Server (0.16.51)

Find multiplayer games.
Tools/scripts to run a dedicated server.
Post Reply
ImTheRealSlayer
Inserter
Inserter
Posts: 21
Joined: Fri Dec 14, 2018 4:56 am
Contact:

How to make a Windows Dedicated Server (0.16.51)

Post by ImTheRealSlayer »

I have noticed a severe lack of dedicated server guides for Windows users, so i thought I'd make one.
Alternatively, I have created a Dedicated Server Program (a batch file) which does all the work listed in the post (and more!)
You can download that here! I am not sure if it works on x86 machines, anyone is welcome to try!

Oh yeah, here are some fully fledged server launchers that you can try and see if you like, if you're feeling lazy or just dont know what you're doing, these are a good option!
limmek's Windows Server Tool is an excellent program with a GUI instead of being completely text base (a console is included)
You can download it here: viewtopic.php?f=133&t=54095

NOTE: If you want to host your own online dedicated server, you will need to port forward through your router. This is not a part of this tutorial. You will find plenty of port forwarding guides (including ones for factorio) that you can use.
Let's make a freakin' server!
--Step 1--
Find where your Factorio EXE is located. Have that open in a Windows Explorer window.

--Step 2--
Open your text/code editing program of choice. I reccomend Notepad++, but regular Notepad will do.

--Step 3--
Save the file IN THE FACTORIO EXE DIRECTORY. Remeber to save it as a .bat file (remeber to switch it from *.txt to All Files). It doesn't need to be named anything specific. You should see factorio.exe and the server batch file in the same folder together. THIS IS VERY IMPORTANT.

--Step 4--
Choose a save that you want to play with. To do this, either launch the game and create a save quickly OR copy and paste a save from the internet or another computer. Place this where your Factorio saves live (this is usally C:\Users\[Your Username]\AppData\Roaming\Factorio\Saves)

--Step 5--
Time to make the batch file work! this is the code you will need!

Code: Select all

factorio.exe --save-file [save file path here]
pause
The save file path looks like this: C:\Users\[Your Username]\AppData\Roaming\Factorio\Saves\[your save file].zip
or where ever you saved your file. Just make sure it includes the save file ZIP at the end or else it wont work!
The pause command allows you to see where the program failed if it does.

--Step 6--
Run the batch file. If everything is correct, then it should run correctly. The window should remain open and you will be able to type.

--Step 7--
Connect to the server using a different computer. Go Play>Multiplayer>Connect to Server and use the dedicated server's IPv4 address, followed by the port (usually 34197) and you should be able to connect.
The IP should look like this [Your IPv4 Address]:34197
To get the IPv4, open up Command Prompt and type:

Code: Select all

ipconfig
And run it. The IPv4 should be there.

If it all worked, then Congratulations, you did it! You now have your very own LAN dedicated server!
Image

JePeSWE
Inserter
Inserter
Posts: 26
Joined: Mon Feb 19, 2018 3:34 pm
Contact:

Re: How to make a Windows Dedicated Server (0.16.51)

Post by JePeSWE »

Hi

I cant get this to work, the batfile is halting

press any key to continue......

/JePe

ImTheRealSlayer
Inserter
Inserter
Posts: 21
Joined: Fri Dec 14, 2018 4:56 am
Contact:

Re: How to make a Windows Dedicated Server (0.16.51)

Post by ImTheRealSlayer »

JePeSWE wrote:
Fri Jun 28, 2019 4:07 pm
Hi

I cant get this to work, the batfile is halting

press any key to continue......

/JePe
Greetings,
Did you make your own batch file, or did you download the one that I made?
Image

Post Reply

Return to “Multiplayer / Dedicated Server”