Dedicated Server

From Colony Survival Wiki
Jump to: navigation, search

This article is a stub. You can help Colony Survival Wiki by expanding it.

Local Server[edit | edit source]

A local server is run on the same computer you are using to play the game. To start a local server through Steam, go to Library > Tools and install the Colony Survival Dedicated Server. You can choose to run this tool in two ways:

  1. "Play Colony Survival Dedicated Server" will open the server console, a command-line interface to start and manage the server.
  2. "Play with GUI" will open a window with easy to use buttons to get your server started. This is the easier option if you are not familiar with command line interfaces.

In order to make your server available to people on the internet, you just set the network type to SteamOnline and you must forward your ports.

Dedicated Server[edit | edit source]

A dedicated server is a separate machine from your own, responsible only for running the server. The easiest option is to find an established game server host which supports Colony Survival, and you simply pay for the server and use their tools to configure it.

The most affordable and best performing servers are created using dedicated servers or Virtual Private Servers that you configure yourself. This style of hosting is typically beneficial as most server hosts run in a shared environment where your server performance can be impacted by other servers hosted on the same machine. You can rent a dedicated server or Virtual Private Server (VPS) from a service like Digital Ocean.

Installation (Linux)[edit | edit source]

These instructions are written for an Ubuntu 16.04+ Virtual Private Server but may apply to other Linux installations. Some SSH/command-line experience is necessary.

  1. Create an Ubuntu VPS and follow the VPS provider's instructions until you get an SSH login (root/password or ssh key).
  2. Log in to SSH, I use an SSH client called PuTTY
  3. If you installed 64bit, install 32bit support for steamcmd:
    dpkg --add-architecture i386
    add-apt-repository multiverse
    apt-get update
    apt-get dist-upgrade
  4. Install SteamCMD in a new "steam" user directory:
    useradd -m steam
    cd /home/steam/
    apt-get install steamcmd
  5. Install Colony Survival Dedicated server via steamcmd
    cd /home/steam/
    steamcmd +login anonymous +force_install_dir /home/steam/colony_survival_dedicated/ +app_update 748090 +quit
  6. Install mono, required to run the dedicated server on linux
    apt install mono-runtime
  7. Run the server software, replace the tags "YOUR_SOMETHING" with your own info.
    mono "/home/steam/colony_survival_dedicated/colonyserverdedicated.exe" start_server +server.world YOUR_WORLD_NAME +server.name "YOUR_SERVER_NAME" +server.networktype SteamOnline +server.ip YOUR_SERVER_IP_ADDRESS

Port Forwarding[edit | edit source]

These are the primary ports that are configurable within the server:

27016 UDP (Default Client Port)
27017 TCP (Default Steam Port This port may not actually be utilized by the game)

These are ports used by the Steam API which may be required to host the game (not confirmed):

3478 UDP (Steam API)
4379 UDP (Steam API)
4380 UDP (Steam API)

Additionally, steam will use a random port between 27017 and 65535 to establish connections to players.

Port Forwarding through a router[edit | edit source]

Especially if you are running a local server and want to play online, you will need to forwarding the ports in your router to the local computer hosting the game. The instructions for this vary widely by router manufacturer and your own networking setup. I suggest you use [portforward.com] and refer to the port numbers above.

Port Forwarding on Linux[edit | edit source]

If you are using iptables as a firewall you can allow these ports with the following commands:

iptables -I INPUT -p udp -m udp --dport 3478 -j ACCEPT
iptables -I INPUT -p udp -m udp --dport 4379 -j ACCEPT
iptables -I INPUT -p udp -m udp --dport 4380 -j ACCEPT
iptables -I INPUT -p udp -m tcp --dport 27016 -j ACCEPT
iptables -I INPUT -p tcp -m tcp --dport 27017 -j ACCEPT
iptables -A INPUT -p tcp --match multiport --dport 27017:65535 -j ACCEPT
iptables -A INPUT -p udp --match multiport --dport 27017:65535 -j ACCEPT

Server Administration[edit | edit source]

Most administration for a server is done through the server console by running commands, or through editing configuration files.

Console Commands[edit | edit source]

These commands are available after running colonyserverdedicated.exe:

quit                      - Exits this program
list,help,?               - Lists available commands
start_server              - Starts a server. Arguments possible:
- Example: start_server +server.world "test world" +server.networktype LAN
| All options and things below are case sensitive
| +server.world           - followed by worldname to load/create
| +server.name            - server name to display in the server browser
| +server.networktype     - Network type to host. Possible options below:
-| Singleplayer  - connects to a localhost client, not really usable manually
 | LAN           - allows connecting from localhost through the ingame button
 | SteamLAN      - steam networking, does not port forward or check authentication
 | SteamOnline   - steam networking, port forwards and checks authentication
| +server.password        - default none; password required to join the server
| +server.maxplayers      - default 10; max players to be active at the same time
| +server.gameport        - default 27016; port queried for info to display in the server browser
| +server.ip              - default 0.0.0.0 (auto); IP to use when selecting local adapter
| +server.steamport       - default 27017; port passed for 'steam use', seems unused
| +server.usevac          - default false; whether to filter for VAC status, true or false
| +server.seed            - if new world, seed used to generate terrain. type integer
| +server.monsterson      - if new world, whether to spawn monsters. default true
| +server.initialsettings - if new world, initialsettings file to use, default normal
| +server.monstersday     - if new world, whether to spawn monsters during the day, default false
| +server.monstersdouble  - if new world, whether to spawn double the amount of monsters, default false
stop_server             - Stops a server
send                    - Send text to the server

Add user role[edit | edit source]

You can add a user to a role using the following command:

/setgroup god USER_NAME

Or by using steam id (Easily find a user's Steam ID at steamidfinder.com):

/setgroup god STEAM_ID

Or by editing the file gamedata/savegames/(worldname)/permissionusers.json. Below is an example (from version 0.6.2.2) with one user added to the "god" role. Replace "YOUR_STEAM_ID" with your Steam ID.

{
	"Localhost" : {
		"includes" : ["peasant"],
		"permissions" : [""]
	},
	"Server" : {
		"permissions" : [""]
	},
	"Steam: YOUR_STEAM_ID" : {
		"includes" : ["god"],
		"permissions" : ["printbiome","getlimit","setlimit","resetlimit"]
	}
}

User Permissions[edit | edit source]

You can find a current list of permissions in your game installation: `Colony Survival/gamedata/settings/permissiongroups.json`. Below are permissions from game version 0.6.3.0.

List of all permissions[edit | edit source]

printbiome
getlimit
setlimit
resetlimit
loot
reloadvariablesserver
teleport
teleport.position
teleport.banner
time
time.add
permissions
permissions.setgroup
permissions.addgroup
permissions.addpermission
permissions.removegroup
permissions.removepermission
permissions.reload
health.set
setflight
deusvult.self
deusvult.other
cheats.enable
whitelist.add
blacklist.add
whitelist.remove
blacklist.remove

Permissions by role[edit | edit source]

peasant[edit | edit source]
printbiome
getlimit
setlimit
resetlimit
king[edit | edit source]
(includes: peasant)
loot
time.add
teleport.position
teleport.banner
health.set
setflight
emperor[edit | edit source]
(includes: king)
permissions.addgroup.peasant
permissions.addgroup.king
permissions.removegroup.peasant
permissions.removegroup.king
whitelist.add
whitelist.remove
blacklist.add
blacklist.remove
godemperor[edit | edit source]
(includes: emperor)
permissions
god[edit | edit source]
(all permissions)