Jump to content

Setting up dedicated server on its own machine - tell me like I’m three


Prydonian

Recommended Posts

Hi, all.  I’ve got a gaming PC I’m going to turn into a dedicated server, and I’m researching how to do it.  I’ve read the Support FAQ, various threads here, the page on the Valve Developer Community, and threads at the Steam forums, and I’ve ended up with a lot of information.  Some is perfectly straightforward, some is outside my range of expertise, and some is contradictory.  So, I’m starting over and pleading for assistance from a patient person who can talk me through the process like I’ve never seen a computer before.

 

This is where I’m starting, from the Support FAQ: 

 

“Here is a simple guide to installing the dedicated server on Windows using SteamCMD. (Easy to do on a dedicated box without Steam installed.)
https://developer.valvesoftware.com/wiki/7_Days_to_Die.


For local install, you can just install the server via your Steam client from the Library > Tools menu. Then you'll follow a similar configuration as is laid out in the above link for SteamCMD.  

 

Don't forget to open/forward your ports in your modem/router if you are hosting a local dedi.”


 

From that, I’ve already got two questions. 
 

1.) I’ve already got Steam installed, so am I just installing locally?  Or should I install SteamCMD?

2.) What does it mean to open/forward my ports?

 

Thanks in advance to anyone willing to help out!

 

Edited by Prydonian (see edit history)
Link to comment
Share on other sites

  • Prydonian changed the title to Setting up dedicated server on its own machine - tell me like I’m three

It's not a great idea to run Steam on a machine that is solely a dedicated server. Hence the suggestions to use SteamCMD.

 

And personally, if you understand basic high-school level English, you're going to have a lot better experience using a headless Linux build. Especially if you have older hardware. I wrote a guide here.

 

Opening ports is done in your local PC firewall to allow the server to communicate with the world. Forwarding ports is done in your modem/router so make sure that the incoming request on those ports is sent to the correct PC in your network.

Link to comment
Share on other sites

2 hours ago, SylenThunder said:

It's not a great idea to run Steam on a machine that is solely a dedicated server. Hence the suggestions to use SteamCMD.

 

And personally, if you understand basic high-school level English, you're going to have a lot better experience using a headless Linux build. Especially if you have older hardware. I wrote a guide here.

 

Opening ports is done in your local PC firewall to allow the server to communicate with the world. Forwarding ports is done in your modem/router so make sure that the incoming request on those ports is sent to the correct PC in your network.

Thanks for the reply.  Okay, SteamCMD it is.  Out of curiosity, why is using Steam a bad idea?

 

Sadly, Linux is out of the question for me right now, though I might be able to revisit the idea later.

 

Ah, I see… So, how does one open and/or forward the ports in question?

Link to comment
Share on other sites

1 hour ago, Prydonian said:

Out of curiosity, why is using Steam a bad idea?

It's just system overhead you don't need sharing resources. Also, some people will mistakenly start the dedicated client from steam, and that can have very negative results.

 

1 hour ago, Prydonian said:

So, how does one open and/or forward the ports in question?

This will vary based on your hardware and the image it has. portforward.com is a good resource.

Link to comment
Share on other sites

13 hours ago, SylenThunder said:

It's just system overhead you don't need sharing resources. Also, some people will mistakenly start the dedicated client from steam, and that can have very negative results.

 

This will vary based on your hardware and the image it has. portforward.com is a good resource.

Gotcha.  Okay, well, I’ve been reading the guide at https://developer.valvesoftware.com/wiki/7_Days_to_Die_Dedicated_Server and the steps seem pretty followable.  I’ll give it a go.  If I run into trouble, could I perhaps message you for aid?

 

EDIT: Right, so far, so good.  I’ve got SteamCMD up and running with a Steam account created specifically for this purpose.  I’ve updated to the latest 7D2D Dedicated Server Alpha build (294420).  
 

The next step appears to be editing the serverconfig.xml file, but *not* startdedicated.bat.  I need to update the various values according to those at the link, is that right?  
 

I’ve been going over the sections one by one, though, and there are many that are a complete mystery to me.  I mean, I can name the sever and set a password, etc, but that’s about the limit of my understanding.  For instance, it mentions adding a website URL for the server… how and why would I do this?  And this:

UserDataFolder absolute path Use this to override where the server stores all generated data, including RWG generated worlds. Do not forget to uncomment the entry!

Total mystery.  Might as well be Klingon.

So I’m a little lost as to what to do next.

 

If it helps to know the intended use of the server, I’m going to import an existing world that a friend and I have been playing on, and it’ll be just the two of us using the server.

 

Edited by Prydonian (see edit history)
Link to comment
Share on other sites

If you’ve ever highlighted a server in the server browser, some servers advertise their own website but it isn’t something you need in your situation. The userdata folder is where you want your saves and logs saved to so that you can customize where that info goes or leave it as default which is %appdata%/roaming/7daystodie. Open your serverconfig.xml and read it. Every item that you need to set has an explanation. Also, each item has a default so you don’t have to put any values in as they all have default settings. Before importing your world, I’d suggest creating a new world with no mods and see how it runs. Be sure you have your friend joins to make sure there are no connection issues. Once it plays well, add in your mods and check playability again. Then import your old world. Lastly since it’s only you and your friend disable EAC, the anticheat system, which will help server performance.

Link to comment
Share on other sites

9 hours ago, Star69 said:

If you’ve ever highlighted a server in the server browser, some servers advertise their own website but it isn’t something you need in your situation. The userdata folder is where you want your saves and logs saved to so that you can customize where that info goes or leave it as default which is %appdata%/roaming/7daystodie. Open your serverconfig.xml and read it. Every item that you need to set has an explanation. Also, each item has a default so you don’t have to put any values in as they all have default settings. Before importing your world, I’d suggest creating a new world with no mods and see how it runs. Be sure you have your friend joins to make sure there are no connection issues. Once it plays well, add in your mods and check playability again. Then import your old world. Lastly since it’s only you and your friend disable EAC, the anticheat system, which will help server performance.

Thanks!  I’m glad to know there are defaults, that was one of my concerns.  So, what does “uncomment the entry” mean?
 

Okay, will do.  Before I start editing, is there anything in the .xml file that needs to be adjusted to accommodate the impending imported world?

Link to comment
Share on other sites

11 minutes ago, Prydonian said:

Thanks!  I’m glad to know there are defaults, that was one of my concerns.  So, what does “uncomment the entry” mean?

 

you will see entries like this (example from a different xml file)

 

        <!--<passive_effect name="HealthLossMaxMult" operation="base_set" value="0.15"/>-->

 

The game treats it like a comment and not a line of code.  Uncomment the entry means to remove the <!-- and --> that comes after it, like this

 

        <passive_effect name="HealthLossMaxMult" operation="base_set" value="0.15"/>

 

Link to comment
Share on other sites

1 hour ago, Prydonian said:


 

Okay, will do.  Before I start editing, is there anything in the .xml file that needs to be adjusted to accommodate the impending imported world?

Ideally, you would compare the serverconfig.xml from the old world and make changes to the new version so they are the same especially world size.

Link to comment
Share on other sites

On 8/29/2022 at 5:15 AM, Star69 said:

If you’ve ever highlighted a server in the server browser, some servers advertise their own website but it isn’t something you need in your situation. The userdata folder is where you want your saves and logs saved to so that you can customize where that info goes or leave it as default which is %appdata%/roaming/7daystodie. Open your serverconfig.xml and read it. Every item that you need to set has an explanation. Also, each item has a default so you don’t have to put any values in as they all have default settings. Before importing your world, I’d suggest creating a new world with no mods and see how it runs. Be sure you have your friend joins to make sure there are no connection issues. Once it plays well, add in your mods and check playability again. Then import your old world. Lastly since it’s only you and your friend disable EAC, the anticheat system, which will help server performance.

Quick question.  I’m editing the .xml now, and I see you mentioned disabling EAC.  Does that mean setting the value to “false?”  

Link to comment
Share on other sites

9 minutes ago, Prydonian said:

Quick question.  I’m editing the .xml now, and I see you mentioned disabling EAC.  Does that mean setting the value to “false?”  

Yes, if you set it to false, it won't run. All that program does is anticheat so it's usually not needed with friends....unless you  don't trust your friends ;)

Link to comment
Share on other sites

2 hours ago, Star69 said:

Yes, if you set it to false, it won't run. All that program does is anticheat so it's usually not needed with friends....unless you  don't trust your friends ;)

LOL.

 

Questions:

 

Should I change ServerMaxWorldTransferSpeedKiBs from 512?

 

Can you talk me through AdminFileName, UserDataFolder, and SaveGameFolder?  

 

Finally, when I get finished editing, might you be willing to give the .xml file a once-over?

 

Edited by Prydonian (see edit history)
Link to comment
Share on other sites

On 8/29/2022 at 4:22 PM, Star69 said:

Ideally, you would compare the serverconfig.xml from the old world and make changes to the new version so they are the same especially world size.

I just realized I edited my last comment, so you might not have seen it, lol.

Link to comment
Share on other sites

For a small server like yours (maybe 2 players) I would set the transfer speed to the max which I think is 1300. This setting affects how fast a new map is downloaded, basically how much bandwidth a joining player can use of your internet connection. My server is at 1300 and a 10k map takes about 1 minute 20 seconds to download but if you leave at default 512, it takes 2 1/2 times longer.

 

As far as the folders you asked about, I never changed them from what was in the original xml so I’m not a good one to ask. So, in other words, you don’t need to change those unless you want a different location.

Link to comment
Share on other sites

1 hour ago, Star69 said:

For a small server like yours (maybe 2 players) I would set the transfer speed to the max which I think is 1300. This setting affects how fast a new map is downloaded, basically how much bandwidth a joining player can use of your internet connection. My server is at 1300 and a 10k map takes about 1 minute 20 seconds to download but if you leave at default 512, it takes 2 1/2 times longer.

 

As far as the folders you asked about, I never changed them from what was in the original xml so I’m not a good one to ask. So, in other words, you don’t need to change those unless you want a different location.

Got it!   So, for the folders, if I want to leave them as-is, there's no need to uncomment them at all, then.  Final question before the first test, then, I guess... how do I launch the darn thing?  Thanks once again!

Link to comment
Share on other sites

I rent mine so it has a Start button lol. However, is there a .bat file amongst the server files? If it’s there, open it to edit the command lines in it, then once that’s done you double-click the .bat file to run it. If I’m wrong, someone else will chime in and give you the right answer.

Link to comment
Share on other sites

49 minutes ago, Star69 said:

I rent mine so it has a Start button lol. However, is there a .bat file amongst the server files? If it’s there, open it to edit the command lines in it, then once that’s done you double-click the .bat file to run it. If I’m wrong, someone else will chime in and give you the right answer.

Ah, I see!  Well, I did find a .bat file and clicking on it did the trick.  No editing required, luckily, because I had no idea what to change, lol.

 

Progress has been made!  The server is running and discoverable, but not joinable.  I think it’s because my port forwarding didn’t work… I bought the software recommended above, but there are a number of steps where it could be hanging up.  It’s detecting port 26900 as not open, unless the server is running, then it says it’s in use by an application.  Port monitoring shows the server on 26900, 26902, and somewhere in the 5000s.  I chose “7 Days to Die Server” as the program to allow, but “7 Days to Die - PC” and “7 Days to Die - Steam” were also options.  I’ll need to get in touch with support.  

Link to comment
Share on other sites

On 9/1/2022 at 9:01 AM, Prydonian said:

 The server is running and discoverable, but not joinable.  I think it’s because my port forwarding didn’t work…

 

If the server is discoverable then some of the port forwarding worked (as Steam can see the server).

But starting from the begining...

 

Did you set a static IP in the dedicated server?

[In LAN networks (starting in 10.1 or 192.168.) the router tells the connected devices what IP to use from a list (google DHCP).

Without a static IP the dedicated server may not always get the IP address, so the port forwarding you created may not work after a re-boot.

A 'static IP' means the server asks the router for its IP address.]

 

Did you port forward a range of UDP ports for the 7D2D server? (usually  UDP 26900:26902 or UDP 26900,26901,26902 )

 

What error are you getting? (check the 'output_log_dedi_ 2022-' log files in the server folder \7DaysToDieServer_Data folder

Look for logins. (mine has "[Steam.NET] GameServer.Login Successful SteamID = <user details>" )

 

BTW:

The admin file contains a list of players who can get admin.

You need the players Steam ID, which is a number.

It is not required, but helpful if you need to use creative for some reason (ie your bag falls thru the world and you need to replace stuff).

 

My advice is;

Back up your server config and saves!

Copy the server config each time you change it (if you use the free app Notepad++ it can auto backup)

Backup the save files each time you shut down the server.

 

Create batch files for updating the server

[open a new text file (ie Notepad++)

type "steamcmd +login anonymous +force_install_dir <7D2D dedicated server folder> +app_update 294420" (no quotation marks, replace <7D2D dedicated server folder> with the full path to the server folder ie C:\7D2DDedicatedServer

save as 'Update7D2D.bat" in your SteamCMD folder (the .bat extension tells Windows it is a program)

 

Edited by FinkPloyd
typo (see edit history)
Link to comment
Share on other sites

On 9/3/2022 at 2:30 AM, FinkPloyd said:

 

If the server is discoverable then some of the port forwarding worked (as Steam can see the server).

But starting from the begining...

 

Did you set a static IP in the dedicated server?

[In LAN networks (starting in 10.1 or 192.168.) the router tells the connected devices what IP to use from a list (google DHCP).

Without a static IP the dedicated server may not always get the IP address, so the port forwarding you created may not work after a re-boot.

A 'static IP' means the server asks the router for its IP address.]

 

Did you port forward a range of UDP ports for the 7D2D server? (usually  UDP 26900:26902 or UDP 26900,26901,26902 )

 

What error are you getting? (check the 'output_log_dedi_ 2022-' log files in the server folder \7DaysToDieServer_Data folder

Look for logins. (mine has "[Steam.NET] GameServer.Login Successful SteamID = <user details>" )

 

BTW:

The admin file contains a list of players who can get admin.

You need the players Steam ID, which is a number.

It is not required, but helpful if you need to use creative for some reason (ie your bag falls thru the world and you need to replace stuff).

 

My advice is;

Back up your server config and saves!

Copy the server config each time you change it (if you use the free app Notepad++ it can auto backup)

Backup the save files each time you shut down the server.

 

Create batch files for updating the server

[open a new text file (ie Notepad++)

type "steamcmd +login anonymous +force_install_dir <7D2D dedicated server folder> +app_update 294420" (no quotation marks, replace <7D2D dedicated server folder> with the full path to the server folder ie C:\7D2DDedicatedServer

save as 'Update7D2D.bat" in your SteamCMD folder (the .bat extension tells Windows it is a program)

 

I did set up a static IP, and when I selected 7D2Dserver in the PF software, it set the range to 26900 through 26902, yeah.  I’ve been chatting with their support, and he’s pointed to me to something I need to tweak, so we’ll see if that does it.


I’ll check the log!


Questions:

-What is an admin file and where will I find it? Do I need to edit it to include the names of myself and the other player?

-I already back up my saves, but I had no idea I needed to back up my config file.  Once the server is up and running, though, will there be further need for me to edit it?  
-That may be related to advice I got from someone a while back… I was going to investigate it.  He said I should change the name of the serverconfig.xml file so it never gets overwritten.  I assumed he meant as a backup, because surely the server won’t function without a file of that name.  Or not?

-The batch file you mentioned.  I can follow the process for creating it, but what does it, er, do?  

 

Many thanks!

 

 

Edited by Prydonian (see edit history)
Link to comment
Share on other sites

On 9/3/2022 at 2:30 AM, FinkPloyd said:

 

If the server is discoverable then some of the port forwarding worked (as Steam can see the server).

But starting from the begining...

 

Update: I tweaked the settings as suggested by PortFoward support, and no joy.  It occurs to me that my network has an extender, to which my machine has a wired connection.  Is that a factor?
 

The specific error I’m getting when I try to join is “Connection to server failed: Could not retrieve server information.”  

 

I checked the server log file, and there aren’t any logins.  If it’s any help at all, I’ve attached a screenshot of the last part of the server console/log file.  

6B6D75B3-0E93-4FF1-B73F-290E978DF227.jpeg

Link to comment
Share on other sites

4 hours ago, Prydonian said:

-What is an admin file and where will I find it?

In your saves folder. serveradmin.xml

 

4 hours ago, Prydonian said:

Once the server is up and running, though, will there be further need for me to edit it?

No

 

4 hours ago, Prydonian said:

I should change the name of the serverconfig.xml file so it never gets overwritten.  I assumed he meant as a backup, because surely the server won’t function without a file of that name.  Or not?

Not. You tell the server which config file to use in the "startdedicated.bat" file, which you could also rename to prevent it from being overwritten by an update. Or back it up, or both.

5 minutes ago, Prydonian said:

I’ve attached a screenshot of the last part of the server

Looks like the server is up and running, so your issue is network.

 

6 minutes ago, Prydonian said:

my network has an extender, to which my machine has a wired connection.  Is that a factor?

If the extender isn't changing the subnet, then, no, it should not be a problem.

Link to comment
Share on other sites

22 minutes ago, Beelzybub said:

In your saves folder. serveradmin.xml

 

No

 

Not. You tell the server which config file to use in the "startdedicated.bat" file, which you could also rename to prevent it from being overwritten by an update. Or back it up, or both.

Looks like the server is up and running, so your issue is network.

 

If the extender isn't changing the subnet, then, no, it should not be a problem.

Hmm, I see.  Sounds like the extender is the only lead I have now.  How would I discover if it’s changing the subnet, bearing in mind I don’t know what a subnet is?

 

As for the serverconfig and startdedicated files… I want to make sure I’m following.  Am I renaming them because when an update comes it’ll look for those filenames and, not finding them, be unable to overwrite the files?  And if so, wouldn’t just making backups and sticking them in a folder somewhere also be effective?

Link to comment
Share on other sites

5 minutes ago, Beelzybub said:

You rename them because, if an update or validate overwrites them, your server goes down. Yes you can replace them from your backups, but to save the downtime and confusion, it's better to rename them.

I see.  Okay, excellent, thanks.  Now if I can just figure out why it’s not joinable…

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...