This will show you how to setup a Longvinter dedicated server on Almalinux 8. In this guide we will be using one of our 4GB RAM VPS running Almalinux 8 to set it up.
View the terminal recording below to watch the fill setup process in this guide, you can pause the recording and copy/paste from the recording. Otherwise, scroll down for the full guide and all commands.
Text guide starts here.
If you have a new OS install, it’s always recommended to update your currently installed packages.
root@server $dnf update -y
The Longvinter dedicated server requires a few packages to be installed for it to run, lets install them and some others that we need.
root@server $dnf -y install tar git git-lfs glibc.i686 libstdc++.i686 wget nano
Now create a new user called "steamcmd" with the home directory "/home/steam".
root@server $sudo useradd -m -d /home/steam steamcmd
Set a password for this new user.
root@server $passwd steamcmd
Add the new user to the wheel group for sudo privileges.
root@server $usermod -aG wheel steamcmd
Add user to /etc/sudoers manually, we will use the nano text editor.
root@server $nano /etc/sudoers
Look for the line about half way down the file with "root ALL=(ALL) ALL
" and add the following directly below it:
steamcmd ALL=(ALL) ALL
Now save changes. (CTRL + X, then Y)
If you have a firewall active (iptables or firewalld) and blocks traffic by default you will need to open the required ports.
iptables:sudo iptables -I INPUT -p udp --dport 7777 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 27016 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 27016 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 27015 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 27015 -j ACCEPT
firewalld:firewall-cmd --permanent --zone=public --add-port=7777/udp
firewall-cmd --permanent --zone=public --add-port=27015/udp
firewall-cmd --permanent --zone=public --add-port=27015/tcp
firewall-cmd --permanent --zone=public --add-port=27016/udp
firewall-cmd --permanent --zone=public --add-port=27016/tcp
firewall-cmd --reload
Now login as the steamcmd user.
root@server $su steamcmd
Download steamcmd and extract it.
steamcmd@server $wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
steamcmd@server $tar -xvzf steamcmd_linux.tar.gz && rm -rf steamcmd_linux.tar.gz
Run steamcmd once to install an app update and exit.
steamcmd@server $./steamcmd.sh +force_install_dir . +login anonymous +app_update 1007 +quit
Copy the Steam SDK to the right place.
steamcmd@server $cd ~/.steam && mkdir sdk64 && cp ~/linux64/steamclient.so ~/.steam/sdk64/
Go back to the steamcmd user home folder and install the Longvinter server.
steamcmd@server $cd ~/ && git clone https://github.com/Uuvana-Studios/longvinter-linux-server.git
This will clone (download) the Longvinter linux server github repo which holds the server files.
Now give permission for this folder to execute commands with.
steamcmd@server $chmod -R ugo+rwx longvinter-linux-server/
Now we can customize the server settings by editing/creating the Game.ini.
steamcmd@server $nano ~/longvinter-linux-server/Longvinter/Saved/Config/LinuxServer/Game.ini
If it’s empty add the following:
[/Game/Blueprints/Server/GI_AdvancedSessions.GI_AdvancedSessions_C]
ServerName=Unnamed Island
MaxPlayers=32
ServerMOTD=Welcome to Longvinter Island!
Password=
CommunityWebsite=www.longvinter.com
[/Game/Blueprints/Server/GM_Longvinter.GM_Longvinter_C]
AdminSteamID=76561198965966997
PVP=true
TentDecay=true
MaxTents=2
Make any changes you want then save.
Start the server after editing the settings you want to change.
steamcmd@server $sh /home/steam/longvinter-linux-server/LongvinterServer.sh
You can start the server automatically with systemd (recommended)
steamcmd@server $sudo cp /home/steam/longvinter-linux-server/longvinter.service /etc/systemd/system/longvinter.service
steamcmd@server $sudo cp /home/steam/longvinter-linux-server/longvinter.socket /etc/systemd/system/longvinter.socket
steamcmd@server $sudo systemctl daemon-reload
If you use the systemd start scripts copied from the previous two commands, you can use the following systemd commands to manage the server.
Start server:sudo systemctl start longvinter.service
Stop server:sudo systemctl stop longvinter.service
Restart server:sudo systemctl restart longvinter.service
Enable server to start at boot:sudo systemctl enable longvinter.service
Check status of server:sudo systemctl status longvinter.service
See real-time server log:sudo journalctl -u longvinter -f
Get ID of server, needed to connect from the client (requires initialization first, run this from the longvinter-linux-server directory):
steamcmd@server $./LongvinterGetId.sh
You can update your server with the following, make sure it is stopped first.
steamcmd@server $bash /home/steam/longvinter-linux-server/LongvinterUpdate.sh
You can use their included script to create backups of your save.
steamcmd@server $bash /home/steam/longvinter-linux-server/LongvinterBackup.sh
Reference: https://docs-server.longvinter.com/linux/setup-vanilla/