Steam Dedicated Server

Arrange meetings with other people to play MP, announce your servers.
MADMEYN
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Mar 09, 2016 9:47 pm
Contact:

Re: Steam Dedicated Server

Post by MADMEYN »

posila wrote:
MADMEYN wrote:I made another config.ini file and named it config-server.ini. Do I keep both of .ini files in the config folder? Or do I need to move one?
They can stay in the same folder. Don't forget to change port number in one of the configs otherwise you won't be able to connect to multiplayer while server is running.

So I can arbitrarily change either of the ports? Could you give an example?
posila
Factorio Staff
Factorio Staff
Posts: 5358
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Steam Dedicated Server

Post by posila »

MADMEYN wrote:So I can arbitrarily change either of the ports? Could you give an example?
My recommendation is to change port number in client's config.ini and leave port in config-server.ini to default value (34197). That way people won't have to type port number when they try to connect to your server.
I usually change ports by incrementing default value (34198), or to something that is easy to remember, just in case I would want to host a game from client (ie. 34444, 34567)
MADMEYN
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Mar 09, 2016 9:47 pm
Contact:

Re: Steam Dedicated Server

Post by MADMEYN »

Okay, I've made progress. I currently can run both the server and game. To test the port problem, I kept both ports as 34197, and tried to connect. I got the error that the port was already in use, as expected.

So then I went into the original config file and changed the port to 34198. When I try to connect now, it says "Couldnt establish network communication with server"

Also, I am trying to connect to the local IP that google gives me. Does the server now have it's own unique IP or do I in fact connect to my own IP?

Thank you for the help by the way! Didn't expect such a fast response!

UPDATE: I tried connecting by leaving the IP field blank, and now I'm in. Looking at the server's cmd window, I can see that the server has recognized me joining. So, I now assume that my friends will not leave the IP blank, but will enter my IP in order to connect.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

Connecting to your router's external IP address might not work so well from within your LAN, try localhost instead.

Edit: Oh, you already did. Nevermind.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Hello,

I am interested in running a headless server and playing on the same PC, I have Steam and I have followed all of the steps that posila has outlined. I am STILL getting the error message "The process cannot access the file because it is being used by another process".

I don't understand what I'm doing wrong here. I can launch the server just fine and my server.bat file looks like this:

Code: Select all

start /wait Factorio.exe --start-server World.zip -c "%appdata%"\Factorio\config\config-server.ini
My config files look like this:

Code: Select all

## config.ini
write-data=__PATH__system-write-data__

Code: Select all

## config-server.ini
write-data=__PATH__system-write-data__/server
I even have an empty folder marked "server" in my \AppData\Roaming\Factorio folder.

Help?
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

Does the "Write data path" in the output when you start the server contain what you expect? (The server doesn't get restarted through Steam and still produces output, right? Otherwise look at the log file)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

My server's command window looks like this:

Code: Select all

0.002 Write data path: C:/Users/Ryan/AppData/Roaming/Factorio
Does the "Write data path" in the output when you start the server contain what you expect?
That's just the issue, I really don't know what to expect.
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

That seems to be missing the /server at the end. Does the config file exist in the place you specify? Try 'type "%appdata%"\Factorio\config\config-server.ini' and see if that returns the contents of the file or an error message.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

prg wrote:That seems to be missing the /server at the end. Does the config file exist in the place you specify? Try 'type "%appdata%"\Factorio\config\config-server.ini' and see if that returns the contents of the file or an error message.
I'm not sure I understand. Where do I type this?
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

Oh, a cmd window. Thought you were using that already. Also if you get some output, make sure it's the values you expect, not some default ones. (maybe the config was missing and got automatically generated while the file you actually want to use is in some different directory)
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Ok, I did that and it returned the entire config file. However, as you suggested might be the case, I didn't see /server at the end of the write data path.
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

So it might be an automatically generated one. Either find the file with your own values and specify that, or edit the file you're currently specifying to contain the values you want.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Alright. The issue was that I had the files that I was editing open while I was trying to run the server. All of the values are in order now, but when I open the server it appears to minimize or close immediately and I cannot connect to it with my client using my local IP OR my internet IP.
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

Anything interesting in the log file/output when running in a terminal?
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Here, have a look at it. Says something about "shutting down" in there but I don't know much about Factorio log files.
Attachments
factorio-current.log
Factorio Server Log File
(1.48 KiB) Downloaded 143 times
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: Steam Dedicated Server

Post by prg »

Can't find the save game.

Code: Select all

Error MultiplayerManager.cpp:110: MultiplayerManager failed: "Opening zip C:/Users/Ryan/AppData/Roaming/Factorio/server/saves/World failed"
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Is there a way I can synchronize the two saves folders so that I don't have to drag and drop all the time?
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
User avatar
Tesse11ation
Fast Inserter
Fast Inserter
Posts: 186
Joined: Sat Mar 05, 2016 12:59 am
Contact:

Re: Steam Dedicated Server

Post by Tesse11ation »

Awesome, I can connect with my local IP. Now I just need my friend to get on so they can test it too.

EDIT: Nope. "Following peers are not responding: Unknown username"
ImageImage
System Specs
OS: Windows 10 Professional 64 Bit
CPU: AMD Ryzen 5 3600X (@~3.8 gHz)
GPU: Nvidia RTX 2080
RAM: 32GB DDR4 (2400)
DRIVES: 2x 1TB NVMe SSD, 1x 6TB HDD
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Steam Dedicated Server

Post by Bisa »

KoblerMan wrote:EDIT: Nope. "Following peers are not responding: Unknown username"
If you want your friend to connect from outside (the internet) you need to setup port-forward/NAT correctly to the server in your router.
(+ for simplicity sake I suggest you start the server without the --peer-to-peer option if you happened to add that)
Hosting a factorio server? Take a look at this || init script ||.
Bisa
Filter Inserter
Filter Inserter
Posts: 450
Joined: Fri Jul 17, 2015 3:22 pm
Contact:

Re: Steam Dedicated Server

Post by Bisa »

also, hop on irc, lotsa helpful people around that can help you real-time =)
Hosting a factorio server? Take a look at this || init script ||.
Post Reply

Return to “Multiplayer”