注:本教程在Vultr VPS上测试通过,如需部署请前往Vultr.com
先决条件
您需要在您的Steam帐户上拥有此游戏。
sudo用户。
Vultr Ubuntu 16.04服务器实例。
安装Starbound
在开始之前,请确保系统是最新的。然后,我们将为服务器创建一个新用户。出现提示时,为此用户指定一个安全的强密码。
sudo apt-get update
sudo apt-get upgrade
adduser starbound
passwd starbound
我们还打开必要的防火墙端口。
firewall-cmd --zone=public --add-port=21025/tcp --permanent
firewall-cmd --reload
安装运行SteamCMD所需的系统库。
sudo apt-get install lib32g
切换到先前创建的用户帐户。
su starbound
cd ~
安装SteamCMD软件。
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar xf steamcmd_linux.tar.gz
接下来,我们将使用SteamCMD安装游戏服务器文件。如果您的Steam帐户启用了Steam Guard,则需要检查电子邮件收件箱中的登录代码。
./steamcmd.sh
login YourAccount
*input password and steam guard code*
force_install_dir ./starbound
app_update 211820 validate
当屏幕显示 Success! App '211820' fully installed.
,只需键入 quit
然后按Enter。
现在已安装Starbound服务器。
定制服务器
服务器定制是通过编辑文件来完成的 sbboot.config
。仅在冒号之后更改值 :
。
nano ~/starbound/linux64/sbboot.config
在第47行,更改 A Starbound Server
到所需的服务器名称。
在第48行,更改 8
到所需的插槽数量。
更新服务器
首先,创建文件 update_starbound.txt
。
nano /home/starbound/update_starbound.txt
用以下内容填充它。
login YourAccount YourPassword
force_install_dir ./starbound
app_update 211820
quit
您可以随时使用以下命令更新服务器。请注意,如果您启用了Steam Guard,则在更新过程中需要再次输入代码。
cd ~ && ./steamcmd.sh +runscript update_starbound.txt
运行服务器
要启动服务器,请运行以下命令。
cd /home/starbound/starbound/linux64
screen -dmS starbound ./starbound_server
您的服务器现在正在屏幕会话中运行。您可以随时使用以下命令将其关闭:
screen -S starbound -X quit
注:本教程在Vultr VPS上测试通过,如需部署请前往Vultr.com