10
10
月
2026
星界边境的 Linux 服务端是原生版本,而且官方建议在 Linux 上跑长期服(更稳定、资源占用低)。
这篇讲 Linux 下的完整搭建流程。
📌 系统选错了?→ 星界边境开服教程(Windows 版)
Linux 环境还没准备?→ Linux 开服通用前置教程
一、开服前必须知道的三件事
- ⚠️ 不能用匿名登录下载,必须用拥有这款游戏的 Steam 账号(AppID
211820) - 端口只有一个:TCP 21025(是 TCP,不是 UDP)
- 配置是
sbboot.config(JSON),服务器程序是linux64/starbound_server
配置建议:
| 项目 | 2-6 人 | 8-20 人 |
|---|---|---|
| CPU | 2 核 | 4 核 |
| 内存 | 4 GB | 8 GB |
| 磁盘 | 10 GB SSD | 20 GB SSD |
| 系统 | Ubuntu 20.04+ / Debian 11+ | 同左 |
二、端口规划
| 用途 | 端口 | 协议 |
|---|---|---|
| 游戏主连接 | 21025 | TCP |
| SSH | 22(映射成别的) | TCP |
三、准备环境
1. 建专用用户
sudo adduser --disabled-password --gecos "" starbound
sudo su - starbound2. 装依赖
sudo apt update
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 lib32stdc++6 steamcmd3. 放行防火墙
sudo ufw allow 22/tcp
sudo ufw allow 21025/tcp
sudo ufw enable四、下载服务端(需要 Steam 账号)
su - starbound
steamcmd +login 你的Steam账号 +force_install_dir /home/starbound/server +app_update 211820 validate +quit只写账号不写密码,命令行会单独提示输入,更安全。
开了 Steam Guard 会要求邮箱验证码,按提示输入。
小技巧:如果你在 Windows 机器上操作,但服务器是 Linux,可以强制下载 Linux 版本:
steamcmd +login 你的账号 +@sSteamCmdForcePlatformType linux +force_install_dir ./starbound_linux +app_update 211820 +quit完成后:
/home/starbound/server/
├── linux64/
│ ├── starbound_server ← 服务端主程序
│ └── sbboot.config ← 主配置
├── assets/
│ └── packed.pak
└── storage/ ← 存档(首次启动生成)五、配置服务器
cd /home/starbound/server/linux64
cp sbboot.config sbboot.config.bak # 先备份
nano sbboot.config{
"assetDirectories" : [
"../assets/",
"../mods/"
],
"storageDirectory" : "../storage/",
"defaultConfiguration" : {
"gameServerBind" : "*",
"queryServerBind" : "*",
"rconServerBind" : "*",
"serverName" : "我的星界边境服",
"maxPlayers" : 8,
"maxTeamSize" : 8,
"serverUsers" : {
"你的管理员账号" : {
"admin" : true,
"password" : "管理员密码"
}
},
"serverPassword" : "",
"allowAnonymousConnections" : true,
"checkAssets" : false
}
}关键项:
| 项 | 说明 |
|---|---|
gameServerBind | 设 *,:: 可能只监听 IPv6 |
maxPlayers | 最大人数 |
serverUsers | 管理员账号 |
serverPassword | 进服密码 |
六、启动服务器
启动脚本
nano /home/starbound/server/start.sh#!/bin/bash
cd /home/starbound/server/linux64
./starbound_serverchmod +x /home/starbound/server/start.sh
chmod +x /home/starbound/server/linux64/starbound_server方式一:screen
sudo apt install -y screen
screen -S starbound
./start.sh
# Ctrl+A 然后 D方式二:systemd(推荐)
sudo nano /etc/systemd/system/starbound.service[Unit]
Description=Starbound Dedicated Server
After=network.target
[Service]
Type=simple
User=starbound
WorkingDirectory=/home/starbound/server/linux64
ExecStart=/home/starbound/server/linux64/starbound_server
Restart=on-failure
RestartSec=15
KillSignal=SIGINT
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now starbound
sudo systemctl status starbound
sudo journalctl -u starbound -fKillSignal=SIGINT 很重要:让服务端能优雅退出并保存宇宙数据,直接 SIGKILL 可能损坏存档。七、加载 MOD(可选)
把 .pak 放到 /home/starbound/server/mods/,并在 assetDirectories 加上 "../mods/"。
⚠️assetDirectories不递归搜索,MOD 不要放在子文件夹里,直接平铺.pak文件。
改完重启生效。
八、玩家怎么进服
游戏内 Multiplayer → 输入 IP:21025。
连不上?
ss -tulnp | grep 21025 # 确认在监听(应为 tcp)
sudo ufw status # 确认 21025/tcp 放行九、常见问题排查
| 现象 | 原因 | 解决 |
|---|---|---|
| 下载失败 | 用了 anonymous | 必须登录 Steam 账号 |
| 玩家连不上 | 只开了 UDP | 21025 是 TCP |
| 服务端秒退 | sbboot.config JSON 错 | 检查逗号引号,恢复 .bak |
Permission denied | 没执行权限 | chmod +x starbound_server |
| 只监听 IPv6 | bind 是 :: | 改 * |
| 存档损坏 | 被 SIGKILL 强杀 | 用 SIGINT 停止;定期备份 |
| MOD 不生效 | 目录路径没加 / 没重启 | 加 assetDirectories + 重启 |
| 宇宙加载慢 | 磁盘慢 | 换 SSD |
十、日常维护
# 更新(需要账号)
sudo systemctl stop starbound
su - starbound
steamcmd +login 你的账号 +force_install_dir /home/starbound/server +app_update 211820 validate +quit
exit
sudo systemctl start starbound
# 备份宇宙存档
tar -czf /backup/starbound_$(date +%Y%m%d).tar.gz /home/starbound/server/storage十一、总结
星界边境 Linux 开服要点:
- 必须用自己的 Steam 账号下载
- 端口是 TCP 21025
- 配置在 linux64/sbboot.config(JSON)
- systemd 里设
KillSignal=SIGINT,优雅退出保存档 - 备份 storage 目录 = 备份整个宇宙
📌 觉得有用请点赞收藏,遇到问题评论区交流。
想省掉命令行折腾,可以看看 财富云计算 的游戏云服务器,NAT 型性价比高,适合长期挂服。
延伸阅读
- 网站环境怎么选:LNMP 手动 / 宝塔面板 / Docker / 云开发
- 问卷表单系统搭建:SurveyKing / Formbricks,数据自己收
- 图床搭建:Lsky Pro / Lychee,自托管图片托管方案
- 邮件列表搭建:listmonk 自托管 Newsletter,把读者握在自己手里
- 文档站点搭建:MkDocs / VuePress / Docsify,产品文档与技术手册方案
- RSS 阅读器搭建:FreshRSS 自托管,把信息流拿回自己手里
- 短链接服务搭建:Shlink 自托管,链接数据自己掌握
- 网站状态监控页搭建:Uptime Kuma,服务器挂了第一时间知道

[...]这是本站长期维护的游戏配置与教程总索引。想开服,先在这页搞清楚两件事:你的游戏要吃多少配置、你的系统该看哪篇教程。建议收藏——换游戏、加 MOD、人数变多时,回来核对一遍能省掉大部分"卡爆了"和"连不上"。搭配阅读:还没买服务器?先看购前决策索引(预算分级 / NAT vs 独立 IP / 避坑清单);端口映射看不懂?先看端口速查表(40+ 游戏端口协议一页查清)。一、全游戏配置需求速查表下表按"[...]
2026-10-18 回复