Все параметры нужно отредактировать
Дополнительные пакеты и зависимости
apt-get install libpulse-dev libatomic1 libc6 lib32stdc++6 libsdl2-2.0-0 libsdl2-2.0-0:i386
Установка
./steamcmd.sh +@sSteamCmdForcePlatformType linux +force_install_dir /path/to/server/valheim +login anonymous +app_update 896660 validate +quit
Запуск сервера по умолчанию
cd /path/to/server/valheim ./start_server.sh
Можно скопировать скрипт запуска и изменить конфигурацию
Оригинал:
#!/bin/bash export templdpath=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH export SteamAppId=892970 echo "Starting server PRESS CTRL-C to exit" # Tip: Make a local copy of this script to avoid it being overwritten by steam. # NOTE: Minimum password length is 5 characters & Password cant be in the server name. # NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall. ./valheim_server.x86_64 -name "My server" -port 2456 -world "Dedicated" -password "secret" -crossplay export LD_LIBRARY_PATH=$templdpath
Пример:
export templdpath=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH export SteamAppId=892970 echo "Starting server PRESS CTRL-C to exit" # Tip: Make a local copy of this script to avoid it being overwritten by steam. # NOTE: Minimum password length is 5 characters & Password cant be in the server name. # NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall. /home/gameserver/steamcmd/steamcmd.sh +login anonymous +force_install_dir /home/gameserver/valheim +app_update 896660 +quit ./valheim_server.x86_64 -nographics -batchmode -name "[RU] MyArena" -port 2456 -world "Underworld" -password "qwerty" -public "1" -savedir "/home/gameserver/valheim/" export LD_LIBRARY_PATH=$templdpath
Для остановки нужно нажать [CTRL] + [C]
Команда | Описание |
---|---|
-name «My server» | Enter the name of your server that will be visible in the Server list. |
-port 2456 | Choose the Port which you want the server to communicate with. Please note that this has to correspond with the Port Forwarding settings on your Router. Valheim uses the specified Port AND specified Port+1. Default Ports are 2456-2457. If you’re using the Crossplay backend (enabled using the “-crossplay” argument), you do not need to do Port Forwarding on your Router. The Port number is still used to distinguish between multiple servers on the same public IP address. |
-world «Dedicated» | A World with the name entered will be created. You may also choose an already existing World by entering its name. |
-password «Secret» | Set the password. |
-savedir [PATH] | Overrides the default save path where Worlds and permission-files are stored. Default path WINDOWS: “../%USERPROFILE%/AppData/LocalLow/IronGate/Valheim” LINUX: “~/.config/unity3d/IronGate/Valheim” |
-public 1 | Set the visibility of your server. 1 is default and will make the server visible in the browser. Set it to 0 to make the server invisible and only joinable via the ‘Join IP’-button. Setting public to 0 is a good option if you wish to run a local LAN server, where players can join via the local IP of the server. |
-logFile «d:\log.txt» | Sets the location to save the log file. |
-saveinterval 1800 | Change how often the world will save in seconds. Default is 30 minutes (1800 seconds). |
-backups 4 | Sets how many automatic backups will be kept. The first is the ‘short’ backup length, and the rest are the ‘long’ backup length. By default that means one backup that is 2 hours old, and 3 backups that are 12 hours apart. |
-backupshort 7200 | Sets the interval between the first automatic backups. Default is 2 hours (7200 seconds). |
-backuplong 43200 | Sets the interval between the subsequent automatic backups. Default is 12 hours (43200 seconds). |
-crossplay | Runs the Server on the Crossplay backend (PlayFab), which lets users from any platform join. If you do not include this argument, the Steam backend is used, which means only Steam users can see and join the Server. |
-instanceid «1» | If you’re hosting multiple servers with the same port from the same MAC address, write something unique here for each server to ensure that they get unique PlayFab IDs. |
-preset hard | Sets world modifier preset. Setting a preset will overwrite any other previous modifiers. Valid values are: Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer. |
-modifier raids none | Sets chosen world modifier with value. If combined with a preset should be set after. Valid modifiers and values are: Combat: veryeasy, easy, hard, veryhard DeathPenalty: casual, veryeasy, easy, hard, hardcore Resources: muchless, less, more, muchmore, most Raids: none, muchless, less, more, muchmore Portals: casual, hard, veryhard |
-setkey nomap | Sets a world modifier checkbox key. Valid values are: nobuildcost, playerevents, passivemobs, nomap |
Файлы мира и настроек по умолчанию находятся в каталоге:
~/.config/unity3d/IronGate/Valheim
После внесения изменений необходимо перезапустить сервер
Файл: adminlist.txt
Вписать с новой строки ID игрока
Узнать можно в консоли или зайдя на сервер нажать F2