8 changed files with 1 additions and 285 deletions
@ -1,55 +0,0 @@ |
|||
A Saga of how a Viking <strike>wrote</strike> *bash*ed some <strike>scripts</strike> runes together that led him on a journey to the tenth (or so) missing realm of Valheim! |
|||
|
|||
... *pausing for effect* ... |
|||
|
|||
Upon the whims of Odin, I was chosen to undergo the trial of Valheim, where, by chance, I met my liege, Sir Gloor, an outstanding burly Viking Warrior and Shaman (long beard, pointy hat), who had long discovered the secrets of Valheim, due to his divine connections. Blah blah blah ...etc. etc. etc., (skip the prologue)....booorrrriiinnngggg. Anyways, in order to be able to set out on adventures on dedicated servers, I'll point out some viking-ways to get you set up. First, you'll need 5 wood and 2 stones... |
|||
|
|||
I won't go into to much detail, as lot of the knowledge to run on a server is similar to other server in Linuxgsm. So I will point to links to their site as I go along. You can either copy the whole repository, or just wget <path_to_Linuxgsm.sh>. |
|||
First the game has it's own parameters for starting that should be set. Like other games managed with Linuxgsm, these can be found in the corresponding game folder, in Valheim's case: lgsm/config-default/config-lgsm/vhserver/_default.cfg. You shouldn't edit this file, as a copy will be made elsewhere upon installing the server, at lgsm/conifg-lgsm/vhserver/_default.cfg. Note: this file is always checked by the code if it has been changed, and will always be reset to match the version of github. |
|||
|
|||
I will suggest setting the following in the common.cfg, which will apply to all game instances created: |
|||
`- steamuser=` |
|||
|
|||
(In the _default.cfg, I mention at the steam section, that you should login prior to install, as the default is to log on anonymously, which is, at the time of this writting, not allowed, as the server requires username and password. You should only need to set your username within the configuration file (common.cfg or '*instance*.cfg), and after logging on manually into steamcmd and entering your password once, it should remember the server as trustworthy. You may need to enter it manually again later, depending, otherwise you can add steampass="" in the file as well. It's just a matter of security, depending if you are willing to risk your steam account, should the server be compromised.) |
|||
|
|||
And then for specific game instances (i.e. vhserver, vhserver-2, etc.), you should |
|||
- `name` (server name as it appears in steam server list) |
|||
- `world` (the save name of the game world found under .config/unity3d/IronGate/Valheim/worlds/ ) |
|||
- `password` |
|||
- `public` (if you wish to change the default value: public) |
|||
|
|||
Technically, you can choose which settings are global for all servers (common.cfg) or localised for just a specific instance (*instance*.cfg). It is up to you to sharpen your axe and make the best choice for your situation. For example, I've chosen to make notification "global", turning them on in the common.cfg, so all games will be reported. |
|||
|
|||
Depending if you have a beta branch: |
|||
- `branch` |
|||
- `branchpassword` (this is presently lacking in the parent branch of Linuxgsm, but works for Valheim! Viking Power!) |
|||
|
|||
There are suggestions and steps to backing up the the entire server setup of Linuxgsm: https://docs.linuxgsm.com/commands/backup |
|||
I have done that, but I have also included, similarly, the automating backups of the actual world file (.config/unity3d/IronGate/Valheim/worlds/). Here is an example: |
|||
```bash |
|||
#!/bin/bash |
|||
cd /home/<user>/.config/unity3d/IronGate/Valheim/worlds/ |
|||
|
|||
files=`ls ./*.fwl` |
|||
for i in $files |
|||
do |
|||
file=`basename -s .fwl $i` |
|||
tar -czf "$1_$file.tar.gz" $file.fwl $file.db |
|||
done; |
|||
``` |
|||
This script combines to the files need for the world into one tar file, and does so for every unique world file. It takes a name as a parameter and places it in front of the world's name. So I have a monthly back up called Monthly_<world_name>.tar.gz, that automatically overwrites itself every month. And similarly, the daily backup overwrites itself everyday. You can customize it as needed. This is an excerpt from cronjob: |
|||
``` |
|||
#Valheim World Backups |
|||
0 0 * * * /home/<user>/<script_name>.sh Daily >/dev/null 2>&1 |
|||
0 1 1 * * /home/<user>/<script_name>.sh Monthly >/dev/null 2>&1 |
|||
``` |
|||
#$@&%*! *swearing after smashing a finger with the hammer while chiseling the words out* |
|||
|
|||
Presently, gamedig does not support Valheim, so I've set the default to check the session value, which is adequet. |
|||
|
|||
At this time in writing, I've added alert notification for rocketchat, which on the main repository is presently lacking. |
|||
|
|||
|
|||
All is as Odin wishes, |
|||
|
|||
A Saga, by the IT Viking |
@ -1,190 +0,0 @@ |
|||
################################## |
|||
######## Default Settings ######## |
|||
################################## |
|||
# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! |
|||
# Copy settings from here and use them in either: |
|||
# common.cfg - applies settings to every instance. |
|||
# [instance].cfg - applies settings to a specific instance. |
|||
|
|||
#### Game Server Settings #### |
|||
|
|||
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters |
|||
|
|||
# Name of the server, as shown in steam server list |
|||
name="Valheim Server" |
|||
# Minimum password length is 5 characters & Password cant be in the server name. |
|||
password="secret" |
|||
# Valheim's default port |
|||
port="2456" |
|||
# The name of the world's save file |
|||
world="World" |
|||
# 1 is true, 0 is false, whether server is public |
|||
public="1" |
|||
|
|||
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters |
|||
fn_parms(){ |
|||
parms="-name ${name} -password ${password} -port ${port} -world ${world} -public ${public} > /dev/null" |
|||
} |
|||
|
|||
#### LinuxGSM Settings #### |
|||
|
|||
## LinuxGSM Stats |
|||
# Send useful stats to LinuxGSM developers. |
|||
# https://docs.linuxgsm.com/configuration/linuxgsm-stats |
|||
# (on|off) |
|||
stats="off" |
|||
|
|||
## Notification Alerts |
|||
# (on|off) |
|||
|
|||
# Display IP | https://docs.linuxgsm.com/alerts#display-ip |
|||
displayip="" |
|||
|
|||
# More info | https://docs.linuxgsm.com/alerts#more-info |
|||
postalert="off" |
|||
postdays="7" |
|||
posttarget="https://termbin.com" |
|||
|
|||
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord |
|||
discordalert="off" |
|||
discordwebhook="webhook" |
|||
|
|||
# Email Alerts | https://docs.linuxgsm.com/alerts/email |
|||
emailalert="off" |
|||
email="[email protected]" |
|||
emailfrom="" |
|||
|
|||
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt |
|||
iftttalert="off" |
|||
ifttttoken="accesstoken" |
|||
iftttevent="linuxgsm_alert" |
|||
|
|||
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun |
|||
mailgunalert="off" |
|||
mailguntoken="accesstoken" |
|||
mailgundomain="example.com" |
|||
mailgunemailfrom="[email protected]" |
|||
mailgunemail="[email protected]" |
|||
|
|||
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet |
|||
pushbulletalert="off" |
|||
pushbullettoken="accesstoken" |
|||
channeltag="" |
|||
|
|||
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover |
|||
pushoveralert="off" |
|||
pushovertoken="accesstoken" |
|||
|
|||
# Rocketchat Alerts |
|||
rocketchatalert="off" |
|||
rocketchatwebhook="webhook" |
|||
rocketchattoken="" |
|||
|
|||
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack |
|||
slackalert="off" |
|||
slackwebhook="webhook" |
|||
|
|||
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram |
|||
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring". |
|||
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need |
|||
# any custom string in curl - simple ignore this parameter. |
|||
telegramalert="off" |
|||
telegramtoken="accesstoken" |
|||
telegramchatid="" |
|||
curlcustomstring="" |
|||
|
|||
## Updating | https://docs.linuxgsm.com/commands/update |
|||
updateonstart="off" |
|||
|
|||
## Backup | https://docs.linuxgsm.com/commands/backup |
|||
maxbackups="4" |
|||
maxbackupdays="30" |
|||
stoponbackup="off" |
|||
|
|||
## Logging | https://docs.linuxgsm.com/features/logging |
|||
consolelogging="on" |
|||
logdays="7" |
|||
|
|||
## Monitor | https://docs.linuxgsm.com/commands/monitor |
|||
# Query delay time |
|||
querydelay="5" |
|||
|
|||
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors |
|||
ansi="on" |
|||
|
|||
#### Advanced Settings #### |
|||
|
|||
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time |
|||
sleeptime="0.5" |
|||
|
|||
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd |
|||
# Server appid |
|||
appid="896660" |
|||
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch |
|||
branch="" |
|||
branchpassword="" |
|||
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server |
|||
steammaster="false" |
|||
|
|||
## Important! Valheim is a game that requires ownership of the game, which will require |
|||
## the logging in with steamcmd. I suggest logging in ahead of time, and then add in the |
|||
## common.cfg file add: steamuser="<username>" , along with using email verification with |
|||
## steamguard, you'll authorise the server for logging in. The first time logging in to steamcmd |
|||
## will require a verification code that you recieve per email. This is why it should be done |
|||
## before installing the server. Otherwise, it will try installing the server anonymously, |
|||
## which will not be possible. |
|||
|
|||
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode |
|||
# 1: tmux kill |
|||
# 2: CTRL+c |
|||
# 3: quit |
|||
# 4: quit 120s |
|||
# 5: stop |
|||
# 6: q |
|||
# 7: exit |
|||
# 8: 7 Days to Die |
|||
# 9: GoldSrc |
|||
# 10: Avorion |
|||
# 11: Valheim |
|||
stopmode="11" |
|||
|
|||
## Query mode |
|||
# 1: session only |
|||
# 2: gamedig + gsquery |
|||
# 3: gamedig |
|||
# 4: gsquery |
|||
# 5: tcp |
|||
querymode="1" |
|||
#querytype="protocol-valve" |
|||
|
|||
## Game Server Details |
|||
# Do not edit |
|||
gamename="Valheim" |
|||
engine="unity3d" |
|||
glibc="2.15" |
|||
|
|||
#### Directories #### |
|||
# Edit with care |
|||
|
|||
## Game Server Directories |
|||
systemdir="${serverfiles}" |
|||
executabledir="${serverfiles}" |
|||
executable="./valheim_server.x86_64" |
|||
serverfiles="${rootdir}/serverfiles" |
|||
|
|||
## Backup Directory |
|||
backupdir="${lgsmdir}/backup" |
|||
|
|||
## Logging Directories |
|||
logdir="${rootdir}/log" |
|||
gamelogdir="${systemdir}/Saved/Logs" |
|||
lgsmlogdir="${logdir}/script" |
|||
consolelogdir="${logdir}/console" |
|||
lgsmlog="${lgsmlogdir}/${selfname}-script.log" |
|||
consolelog="${consolelogdir}/${selfname}-console.log" |
|||
alertlog="${lgsmlogdir}/${selfname}-alert.log" |
|||
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" |
|||
|
|||
## Logs Naming |
|||
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" |
|||
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" |
Can't render this file because it has a wrong number of fields in line 66.
|
@ -1,9 +0,0 @@ |
|||
#!/bin/bash |
|||
# LinuxGSM fix_rust.sh function |
|||
# Author: Alasdair Haig |
|||
# Website: https://linuxgsm.com |
|||
# Description: Resolves startup issue with Valheim |
|||
|
|||
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" |
|||
|
|||
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH |
Loading…
Reference in new issue