This article describes some aspects of setting up a server that often crop up. You should have read Server guide first
- 1 Technical Setup
- 2 Basic settings
- 3 Tweaks
- 4 See also
Setting an internal static IP
Your IP address is a set of four numbers assigned to your computer to identify it. Essentially, it is your address, or location, of your computer, just like your home address is the location of your house. Internal/local IP - meaning your IP address inside your network - helps your router know where to direct incoming traffic. Typically, internal IP addresses begin with 192.168.x.x, 10.0.x.x, or 172.16.x.x.
A static internal IP address is needed so that your computer’s “location” won’t change. That way, your router will always know where to forward your server’s incoming data to and your server won’t have any errors. The following guides will show you how to set a static IP according to your operating system:
When you set a static IP, you need to select an address that has not already been taken or is within your router's distributable range.
Forwarding your ports
Ports are basically the doors that data goes through to get to your computer. Each "door" will take the data to a certain computer, depending on its IP address. Also, each "door" can only lead to one address, or computer. Forwarding ports means assigning where the data should go once it reaches and enters the "door." By default, AC servers use UDP ports 28763-28764 although they can be changed (see servercmdline.txt). To forward these ports, you must have access to your router. Each brand of router will forward ports differently, but they are all almost the same.
Tutorials for forwarding ports on different brands of routers are available here.
Configuring your firewall
Very important and often underestimated! You need to have your firewall so that requests to the UDP ports 28763 and 28764 go to your local machine running the server. Of course, if you use other ports in your launcher-scripts your network setup must use those.
Remember that if you do not run with default ports and use 5555 for example, you will need to open the port the number above. In this case, 5556.
Configuring via servercmdline.txt
There's the option to pass a text-file for using as configuration basis. This is very much encouraged. In that file you'll be able to effortlessly configure all the basic options of a specific "type" of server - then just run an instance of the server and tell it to use your prepared setup. Voila. Here's the basic setup:
// example servercmdline.txt file (1.1) // to use this file, save as config/mySERVERabc123.txt and then add -Cconfig/mySERVERabc123.txt to your servers commandline // see docs/commandline.html for full parameter descriptions // the available colors are: 0: green, 1: blue, 2: yellow, 3: red, 4: gray, 5: white, 6: dark brown, 7: dark red // MOTD: -o \f3server example \fs\f4ABC123\fr\n\f2feel free to \f0change\f2 this :) // server description: full and PREfix and SUFfix - for PRE + temp + SUFF. // n1/n2 only used when someone has voted to change the server-description, see -P below. // E.g. with D only admins, with d any user could (temporarily) change the description following the above schematic. -n My ABC-1-2-3 -n1 MyABC -n2 1-2-3 // player slots -c 8 // server maprot file, default config/maprot.cfg -r config/myABC123.maprot.cfg // voting permission string (read docs/commandline.html) // general gaming & player control over the match -P fkbmasCDEw // gaming, server knows best: fkbMasCDEw // editing allowed: fkbmasCDew // then also set: sendmap permission string (read docs/commandline.html): -M cruD // the D or d option controls whether or not a user can temporarily change the server-description (seen in the browser, for instance), or only admins. // in such cases the -n1/-n2 switches may be used to keep the name "inside some constraints"! // .. more option to look at: // -W // demopath, path & file prefix to store recorded demos at // -V // verbose logging (enable this via commandline, until you're sure, there are no errors in your config left) // -C // import commandline options from file (can be used recursively) // -T // Add timestamps to every line of the console and file logs. // -LF // Sets the logging level for file logs (0..5), default 2 (Win & Mac) or 5 (Linux) // -LS // Sets the logging level for syslog logging (0..5), default 2 (Linux) or 5 (Win & Mac) // -m // masterserver URL (use "-mlocalhost", if you don't want AC to register at a masterserver at all)
Some more settings are possible, see your game-install directory for the defaults, then copy & edit them in your game-home. A good naming scheme for a server-type DOG is to have DOG.scmdline.txt, DOG.maprot.cfg, DOG.motd.txt ... etc.pp. - then for a different server-type CAT follow the schematic approach from DOG. Tweak the settings until you are happy everything works as you like it from your end; don't worry about any possible registration errors yet - but other errors should be read with concentration, that helps finding solutions that much more likely, we find. :-)
Registering on Masterserver
The Masterserver is currently registering servers automatically. If your server is connecting to the Masterserver, you'll receive this message:
masterserver reply: Registration successful.
If your server isn't connecting to the Masterserver, you'll see this message:
Server not registered, could not ping you. Make sure your server is accessible from the internet.
If you want to avoid registering on the Masterserver use the -m parameter in your launcher-script.-mlocalhost is the traditional way to keep your address of the public listing - if you're running a webserver on localhost you should pick something from your hosts file where no response will come.
Note: The maximum server size for a server registered on the Masterserver is 20 slots.
Using dynamic DNS
- see Color
example server start script (linux)
#!/bin/sh # # example AssaultCube-Server launch script # by MeatROme - see http://assault.cubers.net/wiki/Server_setup # naturally also check your local documentation (docs) folder in the game-installation directory # how many clients can connect? CLIENTS=6 # password for admin access: ADMINPASS=MyPassW0rd # disconnect when frag-count is .. KILLLIMIT=-1 # server description DESC="\f3AC \f2SRV" # MOTD definition - WYSIWYG :) MOTD='\f5http://\f3assault\f5.\f1cubers\f5.\f2net\n\f2 --- -- - -- ---\n Enjoy Your Stay' TS=$(date +%Y%m%d_%H%M%S) TSH=$(date +%H:%M:%S\ %d.%m.%y) # # run the server: # bin_unix/linux_server -x$ADMINPASS -k$KILLLIMIT -c$CLIENTS -n"$DESC" -o"$MOTD" > ServerLog_$TS 2>&1
For example, one could start servers in an appropriately setup screen session which saves logs, but for usability and easy it pipes out the output into a timestamped file called something like ServerLog_20081106_075757.
You might be interested in Coloured_logs for viewing the generated logs colourized on your terminal :)
|Gameplay guides||Newbie guide • Special movement • Weapon tactics and tips • Gamemodes|
|Server guides||Server guide • Server setup • Server administration • Port forwarding|
|Other guides||IRC • Game speak • Phrases|