Topic: [MISC] How to set up your own working online server on Windows
If any of the images in this post don't load for you, refresh the page!
I know, that there are several tutorials on how to create a server, but I didn't find one here in the official forum, so I tried my best. It would be cool, if someone could write tutorials for the other operating systems, because I actually have no knowledge with them.
In this tutorial I will show you how to create an homeserver, what means the server will be down, when you shutdown your computer or have no internet connection!
After you have succesfully forwarded a port with this guide, you may now create an online server.
Setting up a server is as simple as logic.
First, you may want to create a new folder, so everything has an order. Call the folder 'Server stuff'.
In your teeworlds folder should be a file called teeworlds_srv.exe.
Copy and paste it in your new created folder.
Right-click on it and create a shortcut.Call this shortcut however you want, I called mine 'Start Server'.
Now it gets a little bit more complicated:
Right-click your shortcut and press 'Properties'.
In the textbox 'Target', there should be some text. Go to the end of it and add:
-f serverconfig.cfg
It should now look like this:
Apply the changes and close the 'Properties' - window.
Create a new text document and name it serverconfig.cfg (if you don't see the file extension, make sure you enable the option to see it:
Press 'Organize'
Press 'Folder and Search Options'
Change to the tab 'View', scroll down and disable 'Hide Extensions for known file types'.
You should now see the extensions.)
Open this serverconfig.cfg and edit it. Here you configure your server, for example the name, maximum of players, gametype, map and so on. To see the full list of what commands you can use with vanilla servers, see the documentation.
Some members wanted me to explain how to create a config file, I'm going to show it here:
These are only the most important commands, there are more, but they are not needed to create a working server.
The most important command in a config file is for sure: sv_name
This will declare the name of your server in the server browser and in most cases the players will decide whether they join your server or not because the name. You should not take a name like wApPs.WaRpAiNt'S uLtRa MeGa CoOl cTf aNd tDm sErVeR!!!!!!!!!!!!!
This is annoying to read and no player wants to join a server with an annoying name. You should take a name, that contains useful informations about the server: Is it a fun server or a clanwar(or something similar) server? What skill level should the players have? Is it a 1on1,2on2,3on3 (and so on) server?
For example this would be a good name: 2on2 - CTF - Fun Server - Pro's and Newbie's allowed
This is just an example, you may want to add some more individual informations.
Finally your first line in your config file could look like this:
sv_name 2on2 - CTF - Fun Server - Pro's and Newbie's allowedWith sv_port you declare which port the server should use to connect to the master server. You can only take ports above 8303, because the other ports won't connect to the master server.
When you want to take 8303 you can write sv_port 8303, or just delete the whole sv_port thing as 8303 is the default value.Another important command: sv_max_clients. This declares how much players can join your server. The default value is 12 and the highest is 16. Important: A teeworlds server needs a good upload speed, so when you know, that your internet connection is not the best, it'll be the best to lower sv_max_clients to 8, because with more players your server will definitely start to lag and players will leave.
sv_map is the command to define with which maps the server starts. (A mapping tutorial is located here.)
One important command is also sv_rcon_password. With this command you define the password used to login to the server. Press F2 ingame to enable the rcon console and then type in your password. After you logged in, you can use these commands.
With sv_scorelimit and sv_timelimit you defind how long a game can be or after how many points a game will end. sv_timelimit is declared in minutes.
You can define the gametype of your server with sv_gametype. Possible variables are dm, tdm and ctf.
Finally you can add the Motto of the Day with sv_motd. This motto will show up when a player joins the server and can contain some advanced information about the server: Who is the hoster? Where is it hosted? Home-or Rootserver?
Here is my example:
sv_name 2on2 - CTF - Fun Server - Pro's and Newbie's allowed
sv_port 8303
sv_max_clients 16
sv_map ctf2
sv_rcon_password yaup //yet another useless password ;)
sv_scorelimit 500
sv_timelimit 60
sv_gametype ctf
sv_motd Hosted by wapps.warpaint. in Germany. It's a homeserver, don't except a low ping.
password 123
You can also download it here.
=================================================================================
After editing, save your *.cfg file in the 'Server stuff' folder and doubleclick the shortcut you created. The server should start without showing errors.
You now have your own server. You can join it in the LAN-tab or just connect to 'localhost:port'!
It is normal, that you cannot see your server in the Internet tab of the server browser.
For mods it's the same procedure, just use the teeworlds_srv_mod.exe, create a shortcut and so on. But most mods have commands, that differ from the vanilla ones, so the official website cannot list these.
wapps.