Jump to content

Linux Server settings.ini & server_token.txt issues


Recommended Posts

Hello there! I love this game soooooo much and I am really excited to run the Linux server but I have a few questions that I believe the wiki did not answer. 

 

First of all I'm running Ubuntu Server 12.04.5 LTS and I was able to get to everything installed properly, but the only issue is, is that I'm running a headless server with SSH access only, and it almost seems like I have to have the game installed on the same box to generate the settings.ini and the server_token.txt file. Am I missing something? 

 

As far as I can tell you cannot play DST on a Linux machine at this time, so I keep getting the token expired error each time I try to start the server... The only way I could figure out how to generate the token was to start the game in Windows and copy the token file over to the "~/.klei/DoNotStarveTogether" directory. So as of right now I have settings.ini and server_token.txt in there, again is there something I'm missing? 

 

I really appreciate any help with this, thanks again for a great game!

 

-Cactusjaq

Link to comment
Share on other sites

No, you're not missing anything.  The server will generate a settings.ini file automatically, although you'll definitely want to edit it to customize it for things like your server name and such.

 

Try putting settings.ini and server_token.txt directly in your ~/.klei directory.  Or try running the server with the -conf_dir DoNotStarveTogether option.

Link to comment
Share on other sites

Hi all,

 

I'm glad to see I'm not the only one with this problem :)

 

So i have server debian 64bits with only access SSH

and same problem for me with server_token.txt

 

i have put TheNet:GenerateServerToken() on my game

and he say "variable "TheNet" is not declared

 

I made a mistake by someone?

 

thx for your help

 

Link to comment
Share on other sites

Hey I had the same problem OP and the way I eventually got it working was

1: I took the server token from the server_token.txt and put it in my settings.ini file under [account] as  "server_token  = " 

2: renamed my server_token.txt to something else so it wouldn't read it from there

 

can you try this?

also if you can find the log file near the top it will say if it's finding the server token

Link to comment
Share on other sites

Hey I had the same problem OP and the way I eventually got it working was

1: I took the server token from the server_token.txt and put it in my settings.ini file under [account] as  "server_token  = " 

2: renamed my server_token.txt to something else so it wouldn't read it from there

 

can you try this?

also if you can find the log file near the top it will say if it's finding the server token

 

Can you paste your entire settings.ini file here? Also, what directory are you putting it in specifically? "~/.klei" or "~/.klei/DoNotStarveTogether"?

 

Thanks for you help!

Link to comment
Share on other sites

No, you're not missing anything.  The server will generate a settings.ini file automatically, although you'll definitely want to edit it to customize it for things like your server name and such.

 

Try putting settings.ini and server_token.txt directly in your ~/.klei directory.  Or try running the server with the -conf_dir DoNotStarveTogether option.

 

That's really strange, because I never saw the server generate a settings.ini file in Linux... I've always had to create mine manually, and the only way I've seen a settings.ini file created automatically is if I run a server from my game client on my Windows box.

Link to comment
Share on other sites

Can you paste your entire settings.ini file here? Also, what directory are you putting it in specifically? "~/.klei" or "~/.klei/DoNotStarveTogether"?

 

Thanks for you help!

 

I'm at work right now, I can post it in about 2.5 hours.

I put the settings.ini file in the ~/.klei/DoNotStarveTogether folder

 

off the top of my head i think it looked something like

 

[account]

token = numbers+anotherKey (I just got this from my actual game's mydocuments folder version of settings.ini don't know if even needed)

server_token = (your actual server token from the server_token.txt)

 

[network]

all your game config settings here if any

 

and try changing the server_token.txt file's name to something else so it stops trying to read it from that and just uses the one in your settings.ini.

after this can you check your log file, there will be something along the lines of "fetched server token successfully" near the top

Link to comment
Share on other sites

That's really strange, because I never saw the server generate a settings.ini file in Linux... I've always had to create mine manually, and the only way I've seen a settings.ini file created automatically is if I run a server from my game client on my Windows box.

 

I had to make mine manually as well

Link to comment
Share on other sites

I'm at work right now, I can post it in about 2.5 hours.

I put the settings.ini file in the ~/.klei/DoNotStarveTogether folder

 

off the top of my head i think it looked something like

 

[account]

token = numbers+anotherKey (I just got this from my actual game's mydocuments folder version of settings.ini don't know if even needed)

server_token = (your actual server token from the server_token.txt)

 

[network]

all your game config settings here if any

 

and try changing the server_token.txt file's name to something else so it stops trying to read it from that and just uses the one in your settings.ini.

after this can you check your log file, there will be something along the lines of "fetched server token successfully" near the top

 

Thanks for responding and being willing to post it here! I really appreciate it.. So, as far as the server_token.txt file, I got this at at the top of the log: "Server token retrieved from: server_token.txt" but then at the bottom I get:

 

"[200] Account Failed (6): "E_EXPIRED_TOKEN"

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!! Your Server Will Not Start !!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If you wish to run your server without authentication
Or if you wish to use your server for a LAN game
You must run it in 'lan mode'. In settings.ini add:
[account]
server_lan_mode = true
Or add the command line argument -lan
 
To generate a server_token from a game client, open console
open consle with the tilda key (~)
Type: TheNet:GenerateServerToken()"
 
I tried everything I could think of last night to get it working... I must have spent a few hours on it. LOL
Link to comment
Share on other sites

Have you tried putting settings.ini and server_token.txt directly in your ~/.klei directory?

 

Or better yet, because you will probably want to run different configurations at some point, manually specify a configuration directory like so:

bin $ ./dontstarve_dedicated_server_nullrenderer -conf_dir configs/MyServer01

And put settings.ini and server_token.ini in ~/.klei/configs/MyServer01

 

This is my exact setup on Debian, and it works like a champ.

Link to comment
Share on other sites

Have you tried putting settings.ini and server_token.txt directly in your ~/.klei directory?

 

Or better yet, because you will probably want to run different configurations at some point, manually specify a configuration directory like so:

bin $ ./dontstarve_dedicated_server_nullrenderer -conf_dir configs/MyServer01

And put settings.ini and server_token.ini in ~/.klei/configs/MyServer01

 

This is my exact setup on Debian, and it works like a champ.

 

 

I did try to put the settings.ini and server_token.txt file in a different directory even, and I got the same results... Even if I delete the server_token.txt file I still get the "[200] Account Failed (6): "E_EXPIRED_TOKEN"" It's really quite strange. So I'm assuming you made a folder called "configs" under "~/.klei", correct? I've tried that as well... Tried a directory called "cfg" and "configs"

 

dont@gibs0n:~/.klei/DoNotStarveTogether$ ls
log.txt  save  server_token.txt  settings.ini
 
dont@gibs0n:~/.klei$ ls
cfg  configs  DoNotStarveTogether
dont@gibs0n:~/.klei$
 
 

.

Link to comment
Share on other sites

Thanks for responding and being willing to post it here! I really appreciate it.. So, as far as the server_token.txt file, I got this at at the top of the log: "Server token retrieved from: server_token.txt" but then at the bottom I get:
 

 

Okay, I'm home now!

 

 

In my ~/.klei/DoNotStarveTogether/ path I only have log.txt, save, settings.ini (I deleted server_token.txt)

 

My settings.ini file contains

[account]server_token = hidden (that I got from my server_token.txt)dedicated_lan_server = falsetoken = hidden (got this from my actual settings.ini on windows myDocuments folder)[network]default_server_name = hiddenserver_password = hiddenmax_players = 6game_mode = endlessenable_snapshots = falseenable_autosaver = true tick_rate = 30connection_timeout = 8000pause_when_empty = true (set this to false first time starting sever or it will pause and never make the map lol)

another note is instead of deleting your server_token.txt just rename it to something like server_token1.txt so that the game stops reading from that

 

 

Link to comment
Share on other sites

I do not think you need to remove the server_token.txt

 

example on my 6 servers dont starve i use same server_token.txt but with different folder

 

i just show you example with my one server i hope it's that help you cactusjaq

 

 

/home/user/.klei/configs/serveur1 (log.txt  save  server_token.txt  settings.ini)

 

(commande line) ./dontstarve_dedicated_server_nullrenderer -port xxxxx -players xx -conf_dir configs/serveur1

 

so you have still problem with token?

Link to comment
Share on other sites

 

 

Okay, I'm home now!

 

 

In my ~/.klei/DoNotStarveTogether/ path I only have log.txt, save, settings.ini (I deleted server_token.txt)

 

My settings.ini file contains

[account]server_token = hidden (that I got from my server_token.txt)dedicated_lan_server = falsetoken = hidden (got this from my actual settings.ini on windows myDocuments folder)[network]default_server_name = hiddenserver_password = hiddenmax_players = 6game_mode = endlessenable_snapshots = falseenable_autosaver = true tick_rate = 30connection_timeout = 8000pause_when_empty = true (set this to false first time starting sever or it will pause and never make the map lol)

another note is instead of deleting your server_token.txt just rename it to something like server_token1.txt so that the game stops reading from that

 

 

YOU ARE MY HERO!! IT WORKED! If you're ever in Portland, OR I will buy you a beer man!! Woohooo!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...