コンテンツにスキップ
ライオットビット

ライオットビット

  • 家
  • ニュース
  • ガイド
  • ビデオガイド
  • パッチノート
  • 不正行為を報告する
  • 検索フォームを切り替え
ヴァルヘイム

ヴァルヘイム – 専用サーバーのセットアップ方法 (Linux)

ポストする 10/15/202110/15/2021 に aidalgol コメントはありません の上 ヴァルヘイム – 専用サーバーのセットアップ方法 (Linux)
  • タイトル: ヴァルヘイム
  • 発売日: 2月 2, 2021
  • 開発者: アイアンゲートAB
  • 出版社: コーヒー染色出版

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. This guide is aimed at users wanting to set up the Valheim Dedicated Server on a headless Linux server. 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 written for Debian 11 (bullseye), but much if not all of it will also apply to Ubuntu, as it is based on Debian. 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.

Install the game via SteamCMD

SteamCMD is basically headless Steam for headless servers. We need it to download the Valheim Dedicated Server.

Set Up Multiarch

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. (For more information see MultiArch/HOWTO on the Debian wiki.) これをする, 次のコマンドを実行します.

$ sudo dpkg --add-architecture
$ sudo apt-get update

Install SteamCMD

Now install SteamCMD itself.

$ sudo apt-get install steamcmd

Set up a Separate User and Group for Steam

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. (We will further harden the Valheim system service later.) Normally you would create a “システム” 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. (See the man page adduser(8) for details on how a system user is different from a normal user.)

Create the steam user with the “adduser” 指示, disabling logins as we are only going to use this account via “sudo”.

$ sudo adduser --disabled-login steam

Run SteamCMD

悲しいことに, 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. Run the commands as follows (command output is omitted.)

$ sudo -iu steam  # Opens a login shell as the "スチーム" ユーザー.  See the man page sudo(8).
$ steamcmd
Steam>login anonymous
Steam>force_install_dir ./valheim/
# The Valheim server has a different appID from the client. これをチェックしてください リンク.
蒸気>アプリ_アップデート 896660
蒸気>quit
^C

もし “やめる” command just leaves the program hanging with no prompt, type Ctrl+C to completely quit. This appears to be a bug in SteamCMD.

Now that you have the Valheim Dedicated Server installed, it’s time to set up the service to run it.

Run the Valheim Server via Systemd

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.

The Systemd Unit

Write the following code to the file “/usr/local/lib/systemd/system/valheim.service”.

[ユニット]
Description=Valheim Dedicated Server
After=network-online.target

[サービス]
Type=exec
User=steam
Group=steam
Environment="LD_LIBRARY_PATH=/home/steam/valheim/linux64" "SteamAppId=892970"
ExecStart=/home/steam/valheim/valheim_server.x86_64 -name "I forgot to name my server" -世界 "Midgard" -ポート 2456 -パスワード "秘密"

# Security settings
LockPersonality=true
NoNewPrivileges=true
RestrictRealtime=true
RestrictNamespaces=true
SystemCallArchitectures=native
SystemCallFilter=~@obsolete @clock @debug @module @mount @privileged @reboot @setuid @cpu-emulation
CapabilityBoundingSet=
RestrictAddressFamilies=AF_INET AF_INET6
RestrictSUIDSGID=true
PrivateDevices=true
PrivateTmp=true
PrivateMounts=true
PrivateUsers=true
ProtectControlGroups=true
ProtectHome=tmpfs
BindPaths=/home/steam
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=full
ProtectClock=true
ProtectKernelLogs=true
ProtectProc=invisible
ProtectHostname=true
RemoveIPC=true
InaccessiblePaths=/srv/

A 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.

  • systemd.unit(5)
  • systemd.service(5)
  • systemd.exec(5)
  • systemd.resource-control(5)

Specifying a 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.

さもないと, it specifies the name of a world to use, which must exist in the directory “/home/steam/.config/unity3d/IronGate/Valheim/worlds/”. In the systemd unit above, we specify the world named “Midgard”, so there must exist a file named “/home/steam/.config/unity3d/IronGate/Valheim/worlds/Midgard.fwl”. This lets you use a world copied from elsewhere.

If you want to use an existing world from your PC, keeping your progress, you must also copy the corresponding “.db” file to the same location as the “.fwl” ファイル.

If you want to use a new world but with a specific seed, you must create the world with the game client, as the server provides no way of specifying a seed for the initial world creation.

Enabling the Service

That defines the service, but systemd does not know about it until it reloads units. Do this by running

$ sudo systemctl daemon-reload

Then enable it with

$ sudo systemctl enable valheim.service

Now the Valheim server will automatically start on boot, but not until the network is up (that’s what the line “After=network-online.target” does.) To start it now without rebooting, 走る

$ sudo systemctl start valheim.service

これが今日私たちがこの目的で共有するすべてです ヴァルヘイム ガイド. このガイドは元々、次の者によって作成および執筆されました。 aidalgol. このガイドを更新できなかった場合, これに従って最新のアップデートを見つけることができます リンク.

このサイトのコンテンツがあなたの権利を侵害していると思われる場合, あなたの知的財産権を含む, お問い合わせフォームを使用してすぐにご連絡ください.
ガイド タグ:ヴァルヘイム

ポストナビゲーション

前の投稿: 程遠い 6 – P226ピストルの入手方法
次の投稿: Herding Dog Achievement Guide

返信を残す 返信をキャンセル

あなたのメールアドレスは公開されません. 必須フィールドにマークが付いています *

  • タイトル: ヴァルヘイム
  • 発売日: 2月 2, 2021
  • 開発者: アイアンゲートAB
  • 出版社: コーヒー染色出版

免責事項

引用されたすべてのコンテンツはそれぞれの情報源から得られています. 当社があなたのコンテンツを許可なく使用したと思われる場合, 必ずご連絡ください。真剣に対応させていただきます.
  • 私たちに関しては
  • お問い合わせ
  • プライバシーポリシー
  • 利用規約

著作権 © 2025 ライオットビット.

搭載 プレスブックニュース ワードプレスのテーマ