We are currently updating the articles for 1.09.0. Translated articles will need to be updated by their respective authors.

Difference between revisions of "Dedicated Server Setup"

From No More Room in Hell
Jump to: navigation, search
(Spelling mistakes, but it should be a lot easier to understand!)
(Clean up, fixed spelling mistakes and layed out future structure.)
Line 6: Line 6:
 
To get things started, we should talk about what these "external" and "internal" IP addresses are, and how they affect you.
 
To get things started, we should talk about what these "external" and "internal" IP addresses are, and how they affect you.
  
While working in your house/apartment, you will probably have a DHCP server. Most of the time this will be your router. DHCP is a system that allows the router to pass out internal IP addresses to other devices (such as your computer, laptop or tablet) that connect to it. Inside your network, all the devices talk to each other by using these '''internal''' addresses. Only devices inside can talk to others with these addresses as they are reserved for use in LAN networks.
+
You will probably have a DHCP server in your house/apartment. Most of the time this will be your router, but in some cases it could be something else. DHCP is a system that allows the router (or other device) to pass out internal IP addresses to other devices (such as your computer, laptop or tablet) that connect to it. Inside your network, all the devices talk to each other by using these '''internal''' addresses. Only devices inside your network can talk to others with these addresses - as they are reserved for use in LAN networks.
  
{{Note|You can tell a LAN network ip from a public one as LAN IP's tend to start with 192.168.}}
+
{{Note|You can tell a LAN network ip from a public one as LAN IPs tend to start with 192.168}}
  
If your friend wanted to connect to your NMRiH server, they may see it having the ip 192.168.1.2. This is what you see too, but your friend will screem and kick at why they can't connect. Just like you, your friend will be using these "lan ip address", which corispond to computers/devices on their network. When they try to connect, their router will '''only''' search on their network for a device that has the 192.168.1.2 address. In order to solve this problem, this is where external ip addresses come in.  
+
If your friend wanted to connect to your NMRiH server, they may see it having the ip 192.168.1.2. This is what you see too, but your friend will scream and kick at not being able to connect. Just like you, your friend will be using these internal addresses as well. The problem here is that they correspond to computers/devices on ''their'' network, so when they try to connect, their router will '''only''' search on ''their'' network for a device that has the 192.168.1.2 address. In order to solve this problem, this is where external ip addresses come in.  
  
Your router is assigned a public (external) IP address by your ISP's modem so it can comunicate to computers around the word. This public address is also used when someone wants to give you data (websites, game servers, etc.). You can tell your router to pass on information it gets on a port to a computer inside the network. This is done by spesifying the IP of the machine on the network, and what port to send it to. The common term for this is called "Port Forwarding", as it forwards the port to another computer/device. This article won't go into detail about how to do that, but a great place to start is http://www.portforward.com, which will show you how to port forward.
+
Your router is assigned a public (external) IP address by your ISP's modem so it can communicate to computers around the word. This public address is also used when someone wants to give you data (websites, game servers, etc.). You can tell your router to pass on information it gets on a "port" to a computer inside the network. This is done by specifying the IP of the machine on the network, and what port to send it to. The common term for this is called "Port Forwarding", as it forwards the port(s) to another computer/device. This article won't go into detail about how to do that, but a great place to start is http://www.portforward.com, which will show you how to port forward.
  
To play on the server '''you only need to have 27015 (UDP) open/forwarded'''. The server doesn't use TCP trafic on this port for gameplay and thus is reccomended that you do not forward it.
+
To play on the server '''you only need to have 27015 (UDP) open/forwarded'''. The server doesn't use TCP traffic on this port for gameplay and thus is recommended that you do not forward it.
  
{{Note|While port forwarding is a quick way to do this, it can be easily "messed up".}}
+
{{Note|While port forwarding is a quick and easy way to do this, it can be easily "messed up".}}
  
Now remember reading before about DHCP? It will come back to haunt you sadly. Since there is a limited amount of internal IP addresses, the router will try free up internal IP address for use, by removing un used ones. "Unused" ones include computers/deivces that are not on. So if you turn the computer off that hosts the server and another device connects and takes that address, your computer will lose that IP thus breaking the port forwarding you did. In order to prevent this from happening, you will have to set a static IP for the machine (technicaly the machine's ethernet interface).
+
Now remember reading before about DHCP? It will come back to haunt you sadly. Since there is a limited amount of internal IP addresses, the router will try free up internal IP address for use. It will do this by removing unused addresses. These include computers/devices that are not on. So if you happen to turn the computer off that hosts the server and another device connects, it is likely to take that address your computer had and thus breaking the port forwarding you did. In order to prevent this from happening, you will have to set a static IP for the machine (technically the machine's ethernet interface).
  
Since that should now all be clear, you maybe wondering where to get your external/public IP from. There are many sites that show you it - even Google "What is my IP address". After obtaining it, send it to your friends.
+
That should now all be clear, you may be wondering where to get your external/public IP from. There are many sites that show you it - even Google "What is my IP address". After obtaining it, send it to your friends.
  
  
Now you maybe wondering why you only need 27015 (UDP) open. Why not 27015 (TCP) with all those other ports as well? The remote console (RCON) for the server runs on 27015 (TCP) and can lead to security issues and Denial of Service attacks (DoS). ''You should only allow the TCP traffic in if you know what your doing.'' Other ports shown in other guides are not needed, and thus don't need to be opened.
+
Now, many will argue at why you only need 27015 (UDP) open. Why not 27015 (TCP) with all those other ports as well? The remote console (RCON) for the server runs on 27015 (TCP) and can lead to security issues and Denial of Service attacks (DoS). ''You should only allow the TCP traffic in if you know what you're doing.'' Other ports shown in other guides are not needed, and thus don't need to be opened.
 +
 
 +
==Setting up a Dedicated Server==
 +
Dedicated servers are preferred if you want to ensure you get the best performance and flexibility. Most of the time, it's installed on a separate machine/computer which both it and the server are made available 24/7 (hence the term dedicated).
 +
 
 +
===Windows===
 +
''This section will outline setup and administration for the latest generation of Windows. Versions Server 2003, XP and lesser will not directly follow these steps.''
 +
 
 +
===Linux===
 +
''This section will outline setup and administration for common distos of Linux. Additional dependencies maybe required on your system. Consult your disto's documentation/support if you are unsure.''
 +
 
 +
===ReactOS===
 +
''While this operating system is in alpha stage, some steps maybe affected as the OS goes through gradual builds.''
  
 
==Setting up a Listen Server==
 
==Setting up a Listen Server==
The most common server to use if you just want to play with your friends. Doesn't require a seperate computer and is little to no fuss to setup.
+
Listen servers are the best option if you just want to play with your friends. This does not require a separate computer and is the easiest to use.
 +
 
  
 +
First we must enable the developer console. This developer feature will assist you in customizing the server. You can find this in the options menu for No More Room in Hell. While in the keyboard tab, click the advanced button. Now check the box marked as "Enable developer console".
  
In the options menu for No More Room in Hell go in the Keyboard tab click the Advanced button. Now check the box marked as "Enable developer console". From the main menu, click create server and choose your desired options, then start the server.
+
Back at the main menu, click create server and choose your desired options, then start the server.
  
After it has finished starting to load (if may "freeze", just be patient) you will have to set sv_lan to 0 in order for your friends to connect. This is done by opening the console with the ~ key. Type in ''sv_lan 0'' and press enter. You can now close the developer console.
+
Many players report "freezing" or NMRiH not responding after starting the server - this is perfectly normal. Let is take it's cource, in some cases you could wait upto 10 minutes for it to finish. After it has finished loading, you will have to set sv_lan to 0 in order for your friends to connect. You can do this by opening the console with the ~ key, then typing in ''sv_lan 0'' and pressing enter. You can now close the developer console.
  
  
 
If you server is not listed in the server browser, your friend will have to do some work with the developer console.
 
If you server is not listed in the server browser, your friend will have to do some work with the developer console.
Use this command in the console to connect: "connect XXX.XXX.XX.XXX" without quotes. ''Where XXX.XXX.XX.XXX is your public IP address.''
+
They can use this command in the console to connect: ''connect XXX.XXX.XX.XXX''. ''Where XXX.XXX.XX.XXX is '''your''' public IP address.''
  
You should now be done and playing with your friends on your very own listen server!
+
You should be done now, so go ahead and enjoy your very own listen server!
  
 
==Server Commands==
 
==Server Commands==

Revision as of 18:29, 4 October 2012

Overview

This article covers the bare minimum for server setup. Additional guides are recommmended!

Connectivity

Note:This article details port forwarding in a basic mannor. If your familior, you can skip it.


To get things started, we should talk about what these "external" and "internal" IP addresses are, and how they affect you.

You will probably have a DHCP server in your house/apartment. Most of the time this will be your router, but in some cases it could be something else. DHCP is a system that allows the router (or other device) to pass out internal IP addresses to other devices (such as your computer, laptop or tablet) that connect to it. Inside your network, all the devices talk to each other by using these internal addresses. Only devices inside your network can talk to others with these addresses - as they are reserved for use in LAN networks.


Note:You can tell a LAN network ip from a public one as LAN IPs tend to start with 192.168


If your friend wanted to connect to your NMRiH server, they may see it having the ip 192.168.1.2. This is what you see too, but your friend will scream and kick at not being able to connect. Just like you, your friend will be using these internal addresses as well. The problem here is that they correspond to computers/devices on their network, so when they try to connect, their router will only search on their network for a device that has the 192.168.1.2 address. In order to solve this problem, this is where external ip addresses come in.

Your router is assigned a public (external) IP address by your ISP's modem so it can communicate to computers around the word. This public address is also used when someone wants to give you data (websites, game servers, etc.). You can tell your router to pass on information it gets on a "port" to a computer inside the network. This is done by specifying the IP of the machine on the network, and what port to send it to. The common term for this is called "Port Forwarding", as it forwards the port(s) to another computer/device. This article won't go into detail about how to do that, but a great place to start is http://www.portforward.com, which will show you how to port forward.

To play on the server you only need to have 27015 (UDP) open/forwarded. The server doesn't use TCP traffic on this port for gameplay and thus is recommended that you do not forward it.


Note:While port forwarding is a quick and easy way to do this, it can be easily "messed up".


Now remember reading before about DHCP? It will come back to haunt you sadly. Since there is a limited amount of internal IP addresses, the router will try free up internal IP address for use. It will do this by removing unused addresses. These include computers/devices that are not on. So if you happen to turn the computer off that hosts the server and another device connects, it is likely to take that address your computer had and thus breaking the port forwarding you did. In order to prevent this from happening, you will have to set a static IP for the machine (technically the machine's ethernet interface).

That should now all be clear, you may be wondering where to get your external/public IP from. There are many sites that show you it - even Google "What is my IP address". After obtaining it, send it to your friends.


Now, many will argue at why you only need 27015 (UDP) open. Why not 27015 (TCP) with all those other ports as well? The remote console (RCON) for the server runs on 27015 (TCP) and can lead to security issues and Denial of Service attacks (DoS). You should only allow the TCP traffic in if you know what you're doing. Other ports shown in other guides are not needed, and thus don't need to be opened.

Setting up a Dedicated Server

Dedicated servers are preferred if you want to ensure you get the best performance and flexibility. Most of the time, it's installed on a separate machine/computer which both it and the server are made available 24/7 (hence the term dedicated).

Windows

This section will outline setup and administration for the latest generation of Windows. Versions Server 2003, XP and lesser will not directly follow these steps.

Linux

This section will outline setup and administration for common distos of Linux. Additional dependencies maybe required on your system. Consult your disto's documentation/support if you are unsure.

ReactOS

While this operating system is in alpha stage, some steps maybe affected as the OS goes through gradual builds.

Setting up a Listen Server

Listen servers are the best option if you just want to play with your friends. This does not require a separate computer and is the easiest to use.


First we must enable the developer console. This developer feature will assist you in customizing the server. You can find this in the options menu for No More Room in Hell. While in the keyboard tab, click the advanced button. Now check the box marked as "Enable developer console".

Back at the main menu, click create server and choose your desired options, then start the server.

Many players report "freezing" or NMRiH not responding after starting the server - this is perfectly normal. Let is take it's cource, in some cases you could wait upto 10 minutes for it to finish. After it has finished loading, you will have to set sv_lan to 0 in order for your friends to connect. You can do this by opening the console with the ~ key, then typing in sv_lan 0 and pressing enter. You can now close the developer console.


If you server is not listed in the server browser, your friend will have to do some work with the developer console. They can use this command in the console to connect: connect XXX.XXX.XX.XXX. Where XXX.XXX.XX.XXX is your public IP address.

You should be done now, so go ahead and enjoy your very own listen server!

Server Commands

You can use these commands on listen servers as well as dedicated servers. Enter the command/cvar you want to use, and the value (if it requires one).


sv_votekick_timer 10


While on a listen server, open the developer console with the ~ key.

Command/Cvar Description Example
changelevel Peacefuly change the map to another, and tell clients it's changing. changelevel nms_northway
map Force the server to change the map to another. Used to reload configuaration as it kicks all clients (Server Shutting Down). map nms_northway
kick Kick a player right away. kick dark_st3alth