Github
我已经自己编写好了一套sh脚本
https://github.com/Zhang-Steven/dst_server_sh.git
文件 | 描述 |
---|---|
port_config.sh | 配置端口开放的脚本,使用ufw |
dependency.sh | 依赖安装 |
init.sh | steam安装,饥荒服务器服务安装,会有连接问题,建议使用proxy |
cluster_config.sh | 存档的mod设置和token文件建立 |
boot.sh | 服务器运行,看到一串active就是运行成功了 |
update.sh | 服务器更新,记得在更新后要重新运行cluster_config.sh,不然mod不会更新 |
dedicated_server_mods_setup.lua | mod配置文件,放在dst dedicated server 的mod文件夹中 |
install & init
使用sh脚本运行饥荒服务器的搭建和运维
Don’t Starve Together Server Construction and Maintenance using sh scripts.
It was already tested on Ubuntu 1804 and Ubuntu 2204.
中文教程Reference:https://zhuanlan.zhihu.com/p/625645476
Run
sudo ./dependency.sh
sudo ./port_config.sh
./init.sh
config your saved_cluster
copy cluster folder into “~/.klei/DoNotStarveTogether”
edit dedicated_server_mods_setup.lua in this folder
then run
./cluster_config.sh
Boot
copy your token in cluster_token.txt, then mv to your Cluster folder
run
./boot.sh Cluster_1
Cluster_1 is you saved folder in “~/.klei/DoNotStarveTogether” dir
Or run
./boot.sh
It will launch the default cluster in the script.
then enjoy the game
update
run
./update.sh
./cluster_config.sh
remember to run cluster_config.sh after update, or the mods will not be updated correctly.
尾巴
本sh脚本基本参考知乎大佬的文章,自行整理并测试。