255

Dedicated Server Quick Setup Guide - Linux

Recommended Posts

ale2582    2

Hello! I have a question, a problem, and I can not solve it. I reinstalled everything from scratch following the guide, now the game works, but I can not let you download and run the mod. I plugged in the mods folder and dedicated_server_mods_setup in modsetting folder, but when I launch the script, delete everything as if I had entered, and loading the server shows zero mod. I also tried plugging in setting.ini master mods_enabled = true under the MISC voice but does not solve. able to help me?

log server.PNG

Share this post


Link to post
Share on other sites
On 2/22/2016 at 8:21 AM, ale2582 said:

Hello! I have a question, a problem, and I can not solve it. I reinstalled everything from scratch following the guide, now the game works, but I can not let you download and run the mod. I plugged in the mods folder and dedicated_server_mods_setup in modsetting folder, but when I launch the script, delete everything as if I had entered, and loading the server shows zero mod. I also tried plugging in setting.ini master mods_enabled = true under the MISC voice but does not solve. able to help me?

log server.PNG

run_dedicated_servers.sh will overwrite your dedicated_server_mods_setup.lua every time it's called.

To fix it:  remove the command validate from this line:

./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

Klei should remove this file from the steam checker since it's optional.

  • Like 2

Share this post


Link to post
Share on other sites
ale2582    2

thanks to the intervention, it I realized after posting, I actually removed the whole string. if I leave everything and take off running I just validated the steam update of the mod or keep using the steamcmd_guardian_1.2_linux script?

Share this post


Link to post
Share on other sites
bigc    0

I'm getting the following error, although I do see a steamclient.so at /home/steam/steamcmd/linux32/

 

dlopen failed trying to load:
steamclient.so
with error:
/home/steam/dontstarvetogether_dedicated_server/bin/lib32/steamclient.so: cannot make segment writable for relocation: Cannot allocate memory
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
Master: [Warning] SteamGameServer_Init failed
Master: Your server will still start, but some Steam functionality may be missing.
Master: Steam ports can be configured through command line by adding:
Master: -steam_authentication_port 12345 -steam_master_server_port 12346
Master: or through settings.ini, under the [network] heading
Master: steam_authentication_port = 12345
Master: steam_master_server_port  = 12346
Master: Auth port: 8768 Master server port: 27018
Master: Validating portal[1] <-> <nil>[1] (inactive)
Master: Validating portal[2] <-> <nil>[2] (inactive)
Master: Validating portal[3] <-> <nil>[3] (inactive)
Master: Validating portal[4] <-> <nil>[4] (inactive)
Master: Validating portal[5] <-> <nil>[5] (inactive)
Master: Validating portal[6] <-> <nil>[6] (inactive)
Master: Validating portal[7] <-> <nil>[7] (inactive)
Master: Validating portal[8] <-> <nil>[8] (inactive)
Master: Validating portal[9] <-> <nil>[9] (inactive)
Master: Validating portal[10] <-> <nil>[10] (inactive)
Master: Sim paused

 

Share this post


Link to post
Share on other sites
bigc    0

How can we alter the script to run the servers in the background? I want to logout of my server and have the instances stay running. I tried prepending the starts with `screen` to no avail.

Share this post


Link to post
Share on other sites
Ruskimo    1

Hey Guys, 

After the App '343050' fully was installed I get the error:

./dontstarve_dedicated_server_nullrenderer: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

Does somebody know how to fix this error?

 

I'm running Debian 8 - 64 bit. 

and used  apt-get install libcurl4-gnutls-dev to install library. 

Edited by Ruskimo

Share this post


Link to post
Share on other sites
KuroTsuto    0
16 hours ago, bigc said:

How can we alter the script to run the servers in the background? I want to logout of my server and have the instances stay running. I tried prepending the starts with `screen` to no avail.

Use the following:

screen -d -m ~/run_dedicated_servers.sh

This will run the shell script in a "detached session". You can additionally give the session a name such that you can easily re-attach it to your terminal later:

screen -S DSTServer -d -m ~/run_dedicated_servers.sh

to re-attach:

screen -d -r DSTServer

The default key-binding to detach from a session without terminating the active server process is Ctrl-a Ctrl-d

Edited by KuroTsuto

Share this post


Link to post
Share on other sites
Maco02    4
On 1/3/2016 at 11:36 AM, Ruskimo said:

Hey Guys, 

After the App '343050' fully was installed I get the error:


./dontstarve_dedicated_server_nullrenderer: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

Does somebody know how to fix this error?

 

I'm running Debian 8 - 64 bit. 

and used  apt-get install libcurl4-gnutls-dev to install library. 

Try with:

apt-get install libcurl4-gnutls-dev:i386

It works for the Docker's Debian version.

Share this post


Link to post
Share on other sites
Ruskimo    1
Just now, Maco02 said:

Try with:


apt-get install libcurl4-gnutls-dev:i386

It works for the Docker's Debian version.

Hey Maco02,

 

Thnx for the response! 

After houres I found the solution: I needed to add this line

dpkg --add-architecture i386

 

  • Thanks 1

Share this post


Link to post
Share on other sites
CAIYAZHUPO    0


E: Package 'ia32-libs' has no installation candidate
➜  ~ ~/run_dedicated_servers.sh
/root/run_dedicated_servers.sh: line 21: cd: /root/steamcmd: No such file or directory
Error: Missing /root/steamcmd directory!
 

 

IDK WHY!! HELP!!

Share this post


Link to post
Share on other sites
CAIYAZHUPO    0
Quote

➜  ~ ~/run_dedicated_servers.sh
/root/run_dedicated_servers.sh: line 21: cd: /root/steamcmd: No such file or directory
Error: Missing /root/steamcmd directory!
 

Does anyone can help whith this. This is my last step before run the servce.

 

Acutally I can run the servece by these command below:

Quote

su - root  
cd /home/steam/steamapps/DST/bin/  
screen -S "DST Server" ./dontstarve_dedicated_server_nullrenderer

But ONLY can run the Master without the Caves.

 

Really need help! 

Share this post


Link to post
Share on other sites
Ruskimo    1
36 minutes ago, CAIYAZHUPO said:

Does anyone can help whith this. This is my last step before run the servce.

 

Acutally I can run the servece by these command below:

But ONLY can run the Master without the Caves.

 

Really need help! 

Are you sure that ~/steamcmd exist? 

Could you show your ~/run_dedicated_servers.sh file? 

Edited by Ruskimo

Share this post


Link to post
Share on other sites
CAIYAZHUPO    0

Thanks repy sir,

~/steamcmd is not exist, I dont know why.

my run_dedicted_servers.sh is below:

#!/bin/bash

steamcmd_dir="$HOME/steamcmd"
install_dir="$HOME/dontstarvetogether_dedicated_server"
cluster_name="MyDediServer"
dontstarve_dir="$HOME/.klei/DoNotStarveTogether"

function fail()
{
        echo Error: "$@" >&2
        exit 1
}

function check_for_file()
{
    if [ ! -e "$1" ]; then
            fail "Missing file: $1"
    fi
}

cd "$steamcmd_dir" || fail "Missing $steamcmd_dir directory!"

check_for_file "steamcmd.sh"
check_for_file "$dontstarve_dir/$cluster_name/cluster.ini"
check_for_file "$dontstarve_dir/$cluster_name/cluster_token.txt"
check_for_file "$dontstarve_dir/$cluster_name/Master/server.ini"
check_for_file "$dontstarve_dir/$cluster_name/Caves/server.ini"

./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

check_for_file "$install_dir/bin"

cd "$install_dir/bin" || fail 

run_shared=(./dontstarve_dedicated_server_nullrenderer)
run_shared+=(-console)
run_shared+=(-cluster "$cluster_name")
run_shared+=(-monitor_parent_process $$)

"${run_shared[@]}" -shard Caves  | sed 's/^/Caves:  /' &
"${run_shared[@]}" -shard Master | sed 's/^/Master: /'

 

Share this post


Link to post
Share on other sites
Maco02    4

The problem is that you installed steam in a user (probably your normal user) and you are running the script with the root user. They have different HOME directory and that's the problem. I recommend you to use the absolute path. Something like /home/your_user/steamcmd

Share this post


Link to post
Share on other sites
CAIYAZHUPO    0
13 hours ago, Maco02 said:

The problem is that you installed steam in a user (probably your normal user) and you are running the script with the root user. They have different HOME directory and that's the problem. I recommend you to use the absolute path. Something like /home/your_user/steamcmd

Hey Sir,

I've sloved these problem and run it succuful! but it only work for a while because use this sprit to start the serverce

run_dedicated_servers.sh

The vesion of the servece always be 167979 no matter whether I updated the game.

Any ideas about it?

Hope you can help me!

 

Cheers

Edited by CAIYAZHUPO

Share this post


Link to post
Share on other sites
cezarica    387

I used this guide with a few changes here and there, but now my server shows up with ping "???" what port should I forward cos I don't see the standard 10999 anywhere?

Edit: K, it's weird. After like 10-20 minutes since started the server now it shows up nicely it's ping.

Edited by cezarica

Share this post


Link to post
Share on other sites
cezarica    387

The "Master" is working fine but the "Caves" doesn't for some reason, I mean I want to travel in i see the connecting screen and get sent back to the up world, not caves. What port should I open for it?

Server is behind a router and have 10999 forwarded in router and in server firewall. :|

Quote

 

Master: [Shard] Received migration #5 data for (KU_xxxxx)
Caves:  CloseConnectionWithReason: ID_DST_SHARD_SILENT_DISCONNECT
Caves:  [Steam] SendUserDisconnect for 'xxx'
Master: [Shard] (KU_xxxxx) disconnected from Caves(xxx)

 

Error about the caves.. What's this about?

Edit: Oh, and another thing. Upon attempting entering the Caves I get transferred to another cave entrance on the top and when I enter the cave I get back to the original location. Also i get this error:

Master: [Shard] Slave Caves(xxx) ready!
Master: World xxx is now connected
Master: Validating portal[7] <-> xxx[7] (disabled)
Master: Validating portal[3] <-> xxx[3] (disabled)
Master: Validating portal[10] <-> xxx[10] (disabled)
Master: Validating portal[5] <-> xxx[5] (disabled)
Master: Validating portal[6] <-> xxx[6] (disabled)
Master: Validating portal[4] <-> xxx[4] (active)
Master: Validating portal[1] <-> xxx[1] (disabled)
Master: Validating portal[8] <-> xxx[8] (disabled)
Master: Validating portal[2] <-> xxx[2] (disabled)
Master: Validating portal[9] <-> xxx[9] (disabled)
Caves:  World 1 is now connected
Caves:  Validating portal[3] <-> 1[3] (disabled)
Caves:  Validating portal[6] <-> 1[6] (disabled)
Caves:  Validating portal[5] <-> 1[5] (disabled)
Caves:  Validating portal[9] <-> 1[9] (disabled)
Caves:  Validating portal[10] <-> 1[10] (disabled)
Caves:  Validating portal[7] <-> 1[7] (disabled)
Caves:  Validating portal[8] <-> 1[8] (disabled)
Caves:  Validating portal[1] <-> 1[1] (disabled)
Caves:  Validating portal[4] <-> 1[4] (active)
Caves:  Validating portal[2] <-> 1[2] (disabled)
Caves:  [Shard] Slave LUA is now ready!

Why only two are active and rest are disabled? :|

Edited by cezarica

Share this post


Link to post
Share on other sites
simplex    2,601

I wrote a script that extends upon the features in the one provided here.

 

I wrote it for personal use, but if anyone would like to use it, you can find it here. The README provides detailed information on what it does, but in short it adds automatic detection of clusters and shards, adds colored identification for each running shard (via ANSI terminal escape codes) and improves the editing capabilities of the Lua terminal via the GNU readline library (including history support, autocompletion, etc.).

  • Like 1

Share this post


Link to post
Share on other sites
qsq    0
Quote

Error! App '343050' state is 0x402 after update job.
Error: Missing file: /home/ubuntu/dontstarvetogether_dedicated_server/bin

I follow guide to setup,but it show this error twist.HELP ME!

Share this post


Link to post
Share on other sites
kappu    15

i follow this guide, but my dedicated server still not moded server 

Master: [00:00:06]: FMOD Error: An invalid object handle was used.
Caves:  [00:00:06]: FMOD Error: An invalid object handle was used.

how to fix this? help needed

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now