Rokh
Not enough ratings
ROKH - Dedicated Server Setup
By Darewise Entertainment
You want to host your own server? All instructions are here.
   
Award
Favorite
Favorited
Unfavorite
Machine Setup
Machine should have Ubuntu 16.04 installed and satisfy minimal requirements.

Minimum:
Single core CPU at least 2.3 GHz
6G Ram
50G SSD space

Recommended:
Dual core CPU at least 2.8 GHz
12G Ram
100G SSD
User
The server must be installed for a user with no root privilages
We will use the username rokh for easier understanding on non linux user parts:

This creates a user with home directory and sets the standard cli to /bin/bash:

useradd rokh -m -s /bin/bash
Install Steamcmd
Execute the commands below to get steamcmd installed.

apt-get update
apt-get install lib32gcc1 libjemalloc-dev libaio-dev screen

Create that folder in the user directory which is /home/rokh
mkdir steamcmd
cd /home/rokh/steamcmd
tar xvzf steamcmd_linux.tar.gz
cd /home/rokh

Activate steam on the machine:
steamcmd/steamcmd.sh +login <steam_user> <steam_pass>
<steam guard code if 2 step auth used>

Install or Update Game
Use this command to get server installed or updated:

Type "quit" and enter,

Now you are ready to switch to the user you just added

su rokh

Now use:

steamcmd/steamcmd.sh +login <steam_user> <steam_pass> +force_install_dir ~/rokh +app_update 462440 ­beta default +quit

IMPORTANT: You need to have the game in your Steam Library to install the server
Create your server
Create Server

Run interactive command to setup the server:
rokh/LinuxServer/create_server.sh

When creating multiple servers on the same hardware, for each new server CHANGE:
Game Port
Query Port


The script will create a database instance and start the server instance.

1 - Enter server Name
2 - Internet Game Y/N
3 - Enter admin password
4 - Define Max Players
5 - Define Max accounts
6 - Define password to join server
7 - Game server port
8 - Database port
9 - Server query port
10 - Lobby Port
11 - Create All Ressources on Load Y/N

After these steps, your database and your server will automaticly start
Scripts
Here are the scripts provided for server instance management:

<server id> is the database port, default is 14002

!!! Before using the following scripts, be sure to be logged in the correct folder !!!
Ctrl+C
cd rokh/LinuxServer/

list_servers.sh: list all the created servers and the running servers
­start_server.sh: start a server instance
­stop_server.sh: stop a server instance
­stop_database.sh: stop a database instance
­start_database.sh: start a database instance
­reset_server.sh: stop the server and database instance, re­install the database for that server

List Servers

Run following command to list all servers (installed and running).
Use the server ID to start/stop a server instance:
./list_servers.sh

Start Server

Run following command to start the server. (see list_server.sh to get a server ID)
./start_server.sh <server id>

Stop Server

Run following command to stop the server. (see list_server.sh to get a server ID)
./stop_server.sh <server id>

Stop Database

Run following command to stop the database instance. (see list_server.sh to get a server ID)
./stop_database.sh <server id>

Start Database

Run following command to start the database instance. (see list_server.sh to get a server ID)
./start_database.sh <server id>

Reset Server

Run following command to reset the server.
It will: stop the server and database instance, re­install the database for that server.
./reset_server.sh <server id>

Open Ports
If the user has or wants a firewall:
Open the following ports to allow access to the server:

sudo apt-get install ufw
sudo ufw allow 7777
Choose one port between 7777 and 8000, 7777 is the default Game server port
sudo ufw allow 7778
Default Game server port +1, 7778 is the default steam server port
sudo ufw allow 27015
Choose one port between 27015 and 27078, 27015 is the default port
sudo ufw allow 2233
sudo ufw allow 41765

7777
UDP
Game Server Port
7778(included above)
UDP
Steam Server Port
27015
UDP
Server Query Port
2233
UDP
Lobby beacon
41765
TCP
Remote console

TIP: Forward ports if required. For more information follow the link:https://portforward.com/

Advanced Knowledge: servers.info file
When you create a server, the configuration information is stored in a file located here:
.rokhservers/servers.info

You can edit with this command line:
nano /home/streize/rokh/LinuxServer/.rokhservers/servers.info

The servers.info file contains the configuration information for each game server installed on a machine.

  • ­Each line represent a server
  • ­Configuration values are separated by the pipe character '|'
  • ­Format of each line is SERVER NAME | SERVER ID | MAP AND GAME PORT | LAUNCH ARGUMENTS
  • ­The SERVER ID is (and must be) the same value as the Database Port

Guillaume's Server|14002|/Game/Maps/Landscape_Rokh_Tiled/Landscape_Rokh_Persistent?listen?
Port=7777?QueryPort=27015|­ServerName="Guillaume's Server" ­ServerAdminPassword=test ­
MaxPlayers=8 ­MaxAccounts=8 ­ServerPassword=test ­DBPort=14002 ­CreateResourcesOnStartup




Advanced Knowledge: Copy a Game Server
To mirror a game server to another server, here's what you need to do.
First, you need the following information:
­
  • Server ID you want to copy
  • ­Database port you want to use on the target server

Steps:
  1. Copy the database data directory
    <sourceserver>/rokh/LinuxServer/Database/mariadb­10.1.11­linux­x86_64/data/<server id> --­­> <targetserver>/rokh/LinuxServer/Database/mariadb­10.1.11­linux­x86_64/data/<server id>

  2. Optional: If you want to change the port used by the database, rename the data directory you just copied using the port number as a name
    mv <targetserver>/rokh/LinuxServer/Database/mariadb­10.1.11­linux­ x86_64/data/<server id> --> <targetserver>/rokh/LinuxServer/Database/mariadb­10.1.11­linux­x86_64/data/<new db port>
  3. On target server, create a directory <targetserver>/rokh/LinuxServer/.rokhservers
  4. From the source server, in the file <sourceserver>/rokh/LinuxServer/.rokhservers/servers.info, copy the line containing the server information to the target server's server.info file you just created.
  5. Optional: if you changed the database port on step 2, you need to change the associated values in the servers.info file:
    SERVER NAME | SERVER ID | MAP AND GAME PORT | LAUNCH ARGUMENTS SERVER ID: Change to new Server Id (same as new database port) LAUNCH ARGUMENT: ­DBPort=<new database port>

You can also change different value of the server in the MAP and LAUNCH ARGUMENTS section.

Note that the server id is always the same as the database port.

You are now ready to start the database and the server using the following scripts:
./start_database <server id> ./start_server.sh <server id>

Minimal Install Guide (Short Version)
As root do this:

First of all, update the current repos:

apt-get update

We need the 32bit translation library, the ability to start something in a screen which means in the background and some mysql libs:

apt-get install lib32gcc1 libjemalloc-dev libaio-dev screen

This creates a user with home directory and sets the standard cli to /bin/bash:

useradd rokh -m -s /bin/bash
mkdir /home/rokh/steamcmd
cd /home/rokh/steamcmd
tar xfvz steamcmd_linux.tar.gz
ls -al
cd ..

We need to install steamcmd and the other stuff that it needs to run:

steamcmd/steamcmd.sh +login <user> <pass> +quit

Now you are ready to switch to the user you just added

su rokh

As user rokh now install the dedicated server:

cd ~
steamcmd/steamcmd.sh +login <user> <pass> +force_install_dir ~/rokh +app_update 462440 eta default +quit

Now create your first server, via the shell wizard:

rokh/LinuxServer/create_server.sh

Now the wizard will ask you some things, if you are uncertain, just hit enter :)

Enter server name:
ServerName

Internet game (Y/N) [Default:Y]
Y

Admin password
pswd

Max players(Default:64)
16

Max accounts(Default:Unlimited)

Password:

Game server port(Default:7777): (Game port not specified, using 7777)

Database port (proposing 14002): (Database port not specified, using 14002)

Steam server port is 7778

Game server query port(Default:27015): (Game query port not specified, using 27015)

Lobby port(Default:2233):

Create All Resources On Load(Default:Y)
Y

Now you see some text:
Setting up mysqld instance '14002' on port 14002.
Database directory: ./Database/mariadb-10.1.11-linux-x86_64
Data directory: ./Database/mariadb-10.1.11-linux-x86_64/data/14002
Port: 14002
Socket file: /tmp/rokh_mysql-14002.sock
Installing MySQL ...

There is a lot more text and on the end it says done, started instance, which means you are done, now lets check this with:

ps fax

This will show you something similar than this output, where you can see, a process with the server is started
SCREEN -dmS rokh_server-14002 .....

You are done, have fun :)
Thanks to Jammsen
44 Comments
TheSweeTiger Chun Apr 8, 2018 @ 11:28am 
For installing steamcmd on a dedicate server under ubuntu , just type
sudo apt-get install steamcmd

Yes steamcmd is in the package
jammsen Aug 7, 2017 @ 12:27pm 
zzhat, look at the "Minimal Install Guide" of mine here in the post:

This part is important:
.... steamcmd/steamcmd.sh +login <user> <pass> .....
ZZHAT Aug 7, 2017 @ 11:30am 
Ok, i have a license. With other Games logs you actually only with "anonymous" one. I'll try it. Thx
jammsen Aug 7, 2017 @ 10:30am 
Hey zzhat,
you need to have the game bought and an active license in your steam account which you use to login in.
ZZHAT Aug 7, 2017 @ 12:13am 
I can't install a server. Massage is: ERROR! Failed to install app '462440' (No subscription)
Is this guide still relevant?
Dainara Jul 16, 2017 @ 4:35am 
if i go into server screen mask after start i get the following:

....
[2017.07.16-13.29.06:765][]LogRokhResources: Generation Seed randomly generated: -1160048955
[2017.07.16-13.29.06:768][]LogRokhDatabase:Warning: Sync requested when queue length is 1512. Expect a stall.
[2017.07.16-13.29.32:209][]LogRokhDatabase: UDatabaseInterface::Sync completed.
[2017.07.16-13.29.32:209][]LogRokhResources:Display: Generation Seed: -1160048955. Generation box: 9997x9997m. Zone requests: 1511. Nodes estimated: 7576.
[2017.07.16-13.29.34:927][]Log Http:Warning : Timeout processing Http request. 0x7fc350316380
[2017.07.16-13.29.35:074][]LogRokhAnalytics: AnalyticsManager::RecordScreen() ServerRegistrationSuccess
[2017.07.16-13.29.40:037][104]LogRokhDatabase:Display: Queue length: 135 (running)
[2017.07.16-13.29.45:077][254]LogRokhDatabase:Display: Queue length: 5 (running)
Dainara Jul 16, 2017 @ 2:14am 
can i use my existing mysql DB? how do i comparew the rokh server with my debian mysql DB? does it will work? i think there is the problem
Dainara Jul 15, 2017 @ 11:35pm 
Hi, the Server Guide is great, but i have some problems with the server,
i use Debian Jessie 64 bit all up to date, i hav steamcmd always running, couse i have an conen exiles server with wine running

so the steamcmd is the linux version only conan exiles is windows server
ok to Rokh
i installed and running it like the guide
the server is alive and Ingame i found it "Mars der Todesbringer" but the server is grey and i can't connect
if i add the server in Steam Serverlist, i found it and connect but ingame i get the Mesage
Server not Ready
today after 6 Hours
i try to connect again, Hey the server is there but when i connecting i see the Planet where i have to chose but only with load screen and after 20seconds i am in the Menu without message
when i connecting again the same 20 sec loading and quit to the main menu

so i don't where is the problem
with screen -ls i see the 2 servers server and database
and my other servers

can someone help me please?
The Chase Lemon Jul 11, 2017 @ 10:14pm 
So I did this step by step and everything went off without a hitch, until I used the script line to check the server list, it shows a single server, but then states no servers are currently running, even if I run the start script, and check again. Can't find the server in steam. Simple and stress free until now :(
Wartai May 24, 2017 @ 3:07am 
Im not sure why you want to put a configuration in a hidden folder, even using sudo wouldnt allow me access to it as it says directory not found, but can unhide it using CTRL + H then edit it with gedit ...