---
# System prepended metadata

title: 幻獸帕魯（Palworld） - 伺服器架設
tags: [Palworld, Server, 遊戲]

---

<!-- markdownlint-disable MD013 MD022 MD031 MD032-->

# 幻獸帕魯（Palworld） - 伺服器架設
透過 Linux VM 來架設一個多人遊玩的 Palworld Server。
官方建議新建一個新的使用者 `steam` 來架設 Server，從而避免影響到其他資料。
不過，我有備份乾淨的系統環境，而這個 VM 只做 Palworld Server 用途，所以就不另外新建使用者啦～

## 系統環境
* `OS`：Ubuntu 22.04 LTS
* `CPU`：4 Cores
* `RAM`：8GB
* `Swap`：32GB
* `ROM`：128G

## 安裝 SteamCMD
安裝 SteamCMD 依賴套件
```shell
sudo add-apt-repository multiverse; sudo dpkg --add-architecture i386; sudo apt update
```

安裝 SteamCMD
```shell
sudo apt install steamcmd
```

## 架設 Palworld Server
安裝 Palworld Server
```shell
steamcmd +login anonymous +app_update 2394010 validate +quit
```

## 測試 Palworld Server
啟動 Palworld Server
```shell
~/Steam/steamapps/common/PalServer/PalServer.sh
```

如果出現錯誤
```shell
/home/user/.steam/sdk64/steamclient.so: cannot open shared object file: No such file or directory
```

輸入以下指令
```shell
mkdir -p ~/.steam/sdk64/
steamcmd +login anonymous +app_update 1007 +quit
cp ~/Steam/steamapps/common/Steamworks\ SDK\ Redist/linux64/steamclient.so ~/.steam/sdk64/
```

再次啟動 Palworld Server
```shell
~/Steam/steamapps/common/PalServer/PalServer.sh
```

顯示以下內容表示成功
```shell
Shutdown handler: initalize.
Increasing per-process limit of core file size to infinity.
dlopen failed trying to load:
steamclient.so
with error:
steamclient.so: cannot open shared object file: No such file or directory
[S_API] SteamAPI_Init(): Loaded '/home/ubuntu/.steam/sdk64/steamclient.so' OK.  (First tried local 'steamclient.so')
```

## 開啟 Palworld Server
啟動 Palworld Server 並啟用多執行緒
```shell
~/Steam/steamapps/common/PalServer/PalServer.sh -useperfthreads -NoAsyncLoadingThread -UseMultithreadForDS
```

## 關閉 Palworld Server
按下 Ctrl + C，等待顯示以下內容
```shell
FUnixPlatformMisc::RequestExitWithStatus
FUnixPlatformMisc::RequestExit
Exiting abnormally (error code: 130)
Shutdown handler: cleanup.
```

## 更新 Palworld Server
```shell
steamcmd +login anonymous +app_update 2394010 validate +quit
```

## Server 存檔位置
* Server：遊戲地圖記錄（公會、建築、角色紀錄等等）
`/home/newt/Steam/steamapps/common/PalServer/Pal/Saved/SaveGames/0/地圖亂碼/`
* Client：個人解鎖紀錄（地圖迷霧等等）
`C:\Users\user\AppData\Local\Pal\Saved\SaveGames\Steam的ID\地圖亂碼\`
