![]() ![]() This lets you use a world copied from elsewhere. ![]() In the systemd unit above, we specify the world named “Midgard”, so there must exist a file named “/home/steam/.config/unit圓d/IronGate/Valheim/worlds/Midgard.fwl”. Otherwise, it specifies the name of a world to use, which must exist in the directory “/home/steam/.config/unit圓d/IronGate/Valheim/worlds/”. The “-world” argument is optional if you leave it out, the server will generate a world for you from a random seed on the first run. Įnvironment="LD_LIBRARY_PATH=/home/steam/valheim/linu圆4" "SteamAppId=892970"ĮxecStart=/home/steam/valheim/valheim_server.x86_64 -name "I forgot to name my server" -world "Midgard" -port 2456 -password "secret"Ī full explanation of the systemd directives used in this unit is beyond the scope of this guide, but for those interested, the relevant man pages are as follows. Write the following code to the file “/usr/local/lib/systemd/system/rvice”. The Valheim Dedicated Server comes with a wrapper script to run the server, but we are going to run the server executable directly for our systemd service unit. Now that you have the Valheim Dedicated Server installed, it’s time to set up the service to run it. If the “quit” command just leaves the program hanging with no prompt, type Ctrl+C to completely quit. # The Valheim server has a different appID from the client. Run the commands as follows (command output is omitted.) $ sudo -iu steam # Opens a login shell as the "steam" user. Sadly, SteamCMD does not have a very good interface, so this next part will be a bit awkward for those of you already familiar with the Linux command line. $ sudo adduser -disabled-login steam Run SteamCMD ![]() (See the man page adduser(8) for details on how a system user is different from a normal user.)Ĭreate the steam user with the “adduser” command, disabling logins as we are only going to use this account via “sudo”. (We will further harden the Valheim system service later.) Normally you would create a “system” user for system services, but Steam, even the headless SteamCMD, does not seem to behave properly unless it is run in a normal user environment. It is always best to run services as a dedicated user and group from everything else on your system, so that if a service is compromised, an attacker can only access that service’s files. $ sudo apt-get install steamcmd Set up a Separate User and Group for Steam (For more information see MultiArch/HOWTO on the Debian wiki.) To do this, run the following commands. SteamCMD is provided by Debian, but as an i386 (32-bit x86) package, so you will need to add the i386 architecture to dpkg on your system to install i386 packages. We need it to download the Valheim Dedicated Server. SteamCMD is basically headless Steam for headless servers. Credit has to go to the Hosting Servers guide on the Valheim Fandom wiki for basic information on how to invoke the server executable, which ports need to be exposed to the outside world, and configuration options. This guide is written for Debian 11 (bullseye), but much if not all of it will also apply to Ubuntu, as it is based on Debian. ![]() If you simply want to run this on an always-on desktop with a graphical login, this guide may not be as useful to you. This guide is aimed at users wanting to set up the Valheim Dedicated Server on a headless Linux server. All the guides I have found on setting up a dedicated Valheim server on Linux had gaps in one place or another, so I decided to document my own setup for the benefit of others. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |