Difference between revisions of "My 7 Days to Die notes"

From Got Opinion Wiki
Jump to navigation Jump to search
Line 155: Line 155:




== Character file locations ==
/home/<username>/.local/share/7DaysToDie/Saves/




<center>[[Linux|To Linux]]</center>
<center>[[Linux|To Linux]]</center>

Revision as of 20:19, 2 November 2018

My 7 Days to Die dedicated server notes

Base system used for these notes is Ubuntu 18.04.1 LTS (Bionic Beaver) Desktop with minimum installation.

Install SteamCMD on Linux for dedicated servers

Installation steps taken from Valve Software SteamCMD wiki notes

My steps using Valve's wiki as guide:

$ sudo -i  <--------------- switched to root
root@hammerhead:~# adduser steamy  <--------------- added user steamy

...follow the prompts...

root@hammerhead:~# cd /home/steamy/  <--------------- switched to steamy home directory
root@hammerhead:/home/steamy# sudo apt-get install steamcmd  <--------------- install SteamCMD

...Steam doing stuff...

root@hammerhead:/home/steamy# ln -s /usr/games/steamcmd steamcmd  <--------------- link to SteamCMD executable
root@hammerhead:/home/steamy# su - steamy  <--------------- switched to user steamy
steamy@hammerhead:~$ steamcmd  <--------------- launch SteamCMD

...Steam doing stuff...you want to see these next messages...

[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.  <--------------- Good message!

Steam>login anonymous  <--------------- Login as anonymous user

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK

Steam>force_install_dir /home/steamy/7d2d  <--------------- setup 7 Days to Die dedicated server directory

Steam>app_update 294420  <--------------- install 7 Days to Die dedicated server       
 
...Steam doing stuff...

Success! App '294420' fully installed.

Steam>quit  <--------------- exist SteamCMD

A note about setting up 7 Days to Die dedicated server installation directory. I used full path: Steam>force_install_dir /home/<username>/7days2die because using relative paths ~/7d2d or ./7d2d with SteamCMD force_install_dir did not put my app files in default directory (not /home/steamy/7d2d). When I used full path /home/steamy/7d2d the install files went to /home/steamy/7d2d.

Note: Using SteamCDM "app_updat" may overwrite configuration files so back them up before updating app.

Setup Byobu

See My Byobu notes for setting up Byobu for dedicated Steam user.

I configured Byobu to automatically launch at login since my dedicated server is headless and I want persistent terminals.


Create startup script

Create startup script for x86 64-bit installs:

echo "./7DaysToDieServer.x86_64 -configfile=serverconfig.xml -logfile 7DaysToDieServer_Data/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated" > startserver.sh

Modify serverconfig.xml file

Edit server configuration

steamy@hammerhead:~/7d2d$ vi serverconfig.xml

Install Valmod Overhaul

I use Valmod Overhaul mod.

To download and install Valmod Overhaul mod:

steamy@hammerhead:~/7d2d$ wget https://github.com/7days2mod/Valmod-Overhaul/archive/master.zip
--2018-08-25 15:18:19--  https://github.com/7days2mod/Valmod-Overhaul/archive/master.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/7days2mod/Valmod-Overhaul/zip/master [following]
--2018-08-25 15:18:20--  https://codeload.github.com/7days2mod/Valmod-Overhaul/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.121, 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12192045 (12M) [application/zip]
Saving to: ‘master.zip’

master.zip                                     100%[==================================================================================================>]  11.63M  28.0MB/s    in 0.4s    

2018-08-25 15:18:20 (28.0 MB/s) - ‘master.zip’ saved [12192045/12192045]
steamy@hammerhead:~/7d2d$ unzip master.zip

...stuff being unzipped...

Now you should have this directory structure:

steamy@hammerhead:~/7d2d$ ls -l Valmod-Overhaul-master/ 
total 128
drwxrwxr-x 5 steamy steamy   4096 Aug 19 19:38 'Bigger Backpack Mod'
drwxrwxr-x 4 steamy steamy   4096 Aug 19 19:38  Data
-rw-rw-r-- 1 steamy steamy    506 Aug 19 19:38 'Install Instructions.txt'
drwxrwxr-x 4 steamy steamy   4096 Aug 19 19:38  Mods
-rw-rw-r-- 1 steamy steamy 111241 Aug 19 19:38  ValmodInstallPhoto.png
steamy@hammerhead:~/7d2d$

Copy the Valmod-Overhaul-master/Data Valmod-Overhaul-master/Mods directories up one level into 7 Days to Die installation directory:

steamy@hammerhead:~/7d2d$ cp -r Valmod-Overhaul-master/Mods ./
steamy@hammerhead:~/7d2d$ cp -r Valmod-Overhaul-master/Data ./
steamy@hammerhead:~/7d2d$ ls -l
total 61428
drwxrwxr-x 6 steamy steamy     4096 Aug 25 15:00 7DaysToDieServer_Data
-rwxrwxr-x 1 steamy steamy 24731600 Aug 25 12:41 7DaysToDieServer.x86
-rwxrwxr-x 1 steamy steamy 25004592 Aug 25 12:41 7DaysToDieServer.x86_64
drwxrwxr-x 7 steamy steamy     4096 Aug 25 12:41 Data
-rwxrwxr-x 1 steamy steamy   922064 Aug 25 12:41 libstdc++.so.6
-rw-rw-r-- 1 steamy steamy 12192045 Aug 25 15:18 master.zip
drwxrwxr-x 4 steamy steamy     4096 Aug 25 15:23 Mods
-rwxrwxr-x 1 steamy steamy     7763 Aug 25 14:52 serverconfig.xml
-rwxrwxr-x 1 steamy steamy      163 Aug 25 14:59 startserver.sh
-rwxrwxr-x 1 steamy steamy      887 Aug 25 14:14 startserver.sh.bak
-rwxrwxr-x 1 steamy steamy        6 Aug 25 12:41 steam_appid.txt
drwxrwxr-x 5 steamy steamy     4096 Aug 25 12:41 steamapps
drwxrwxr-x 5 steamy steamy     4096 Aug 19 19:38 Valmod-Overhaul-master

Remove Valmod master zip and Valmod-Overhaul-master directory:

steamy@hammerhead:~/7d2d$ rm master.zip

steamy@hammerhead:~/7d2d$ rm -r Valmod-Overhaul-master/

Starting dedicated server

Start dedicated server

steamy@hammerhead:~/7d2d$ ./startserver.sh

Now detach session and then logout of SSH using Byobu by pressing F6. Your terminals sessions are persistent on dedicated server.

Connect to your server.

Default 7 Days to Die dedicated server save game directory

The default location is in ~/.local/share/7DaysToDie/

To view the contents:

steamy@hammerhead:~$ ls -l ~/.local/share/7DaysToDie/

Resources

7 Days to Die dedicated server Valve Software developer page

7 Days to Die dedicated server Linux community setup page


Character file locations

/home/<username>/.local/share/7DaysToDie/Saves/


To Linux