
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
They write their server setup instructions like sh*t, so we made this Docker image to simplify things.
Please read the whole document before putting your hands on your server.
https://dev.azure.com/nekomimiswitch/General/_apis/build/status/docker-dst-server?branchName=master](https://dev.azure.com/nekomimiswitch/General/_build/latest?definitionId=80&branchName=master)
The DST server code changes a lot. We offer multiple variants (tags) on https://hub.docker.com/r/jamesits/dst-server/:
latest or vanilla are less frequently updated images, recommended for day-to-day usenightly is a nightly built image, so it (hopefully) comes with the latest server codesteamcmd-rebase works the same way as latest but is based on https://hub.docker.com/r/cm2network/steamcmdAll variants except nightly also have a -slim tagged version which does not come with DST server pre-installed; required files will be downloaded every time the container is launched. The -slim versions cannot be launched offline.
All variants except latest is built using Azure DevOps CI. The latest variant is built using Docker Hub's autobuild.
Let's assume you are saving your server config and status to ${HOME}/.klei/DoNotStarveTogether. (This is the default location when it is running outside Docker, so we'll use this as an example. If you want to save it to other location, just mount that directory read-write to the /data folder of the container.)
Start server:
shelldocker run -v ${HOME}/.klei/DoNotStarveTogether:/data -p 10999-11000:10999-11000/udp -p 12346-12347:12346-12347/udp -it jamesits/dst-server:latest
If you use docker-compose, an https://github.com/Jamesits/docker-dst-server/blob/master/docker-compose.yml is provided.
Just press Ctrl+C and wait a little while to let itself spin down. (If the server is saving data, don't press ^C twice to force kill the server.)
To programmatically shut down the server, send a SIGINT to the supervisord process.
Note: the server may take up to ~5min to save map and fully shut down.
If you don't already have a set of server config in your data directory, we will generate one for you. Start server once using the command above, and you will see:
Creating default server config... Please fill in `DoNotStarveTogether/Cluster_1/cluster_token.txt` with your cluster token and restart server!
To generate a cluster token (as of 2019-11-02):
The token looks like pds-g^aaaaaaaaa-q^jaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=. Then either set DST_CLUSTER_TOKEN environment variable during docker run, or paste the token into your_data_directory/DoNotStarveTogether/Cluster_1/cluster_token.txt.
If you need to add mods, change world generation config, etc., please do it now. Don't forget to edit your_data_directory/DoNotStarveTogether/Cluster_1/cluster.ini and get your server an unique name!
After you finish this, re-run start server command, and the server should be running.
(In most cases you don't need this; just pull the prebuilt image from Docker Hub.)
shellgit clone https://github.com/Jamesits/docker-dst-server.git docker-dst-server cd docker-dst-server docker build . -t dst-server:latest
There are some arguments you can set via --build-arg:
BASE_IMAGE: the FROM image (recent Debian or Ubuntu based images are supported)STEAMCMD_PATH: where is steamcmd.sh in the base imageDST_DOWNLOAD: set to 1 to embed DST server into the imageDST_USER: the user to run server as (inside container)DST_GROUP: the group to run server as (inside container)Online catalog. )How to update server or mods?
Restart the server. Updates will be downloaded automatically.
How to connect to a LAN only server?
Run c_connect("IP address", port) or c_connect("IP address", port, "password") in client console.
How to check if the server is online?
You can try the 3rd party website Don't Starve Together Server List.
What port does this server require?
You need to expose UDP *** (master) and *** (caves) for client to connect; udp *** and *** for steam connection. Don't NAT these ports to different port numbers.
The server use another 2 high UDP ports for unknown communication, and UDP *** (listen on localhost) for communication between cluster servers.
Here is a netstat -tulpn output on our test server:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name udp 0 0 0.0.0.0:12346 0.0.0.0:* 54/./dontstarve_ded udp 0 0 0.0.0.0:12347 0.0.0.0:* 53/./dontstarve_ded udp 0 0 0.0.0.0:38223 0.0.0.0:* 53/./dontstarve_ded udp 0 0 0.0.0.0:36517 0.0.0.0:* 54/./dontstarve_ded udp 0 0 127.0.0.1:10998 0.0.0.0:* 54/./dontstarve_ded udp 0 0 0.0.0.0:10999 0.0.0.0:* 54/./dontstarve_ded udp 0 0 0.0.0.0:11000 0.0.0.0:* 53/./dontstarve_ded
Error! App '343050' state is 0x202 after update job.
Your disk is full.
Error! App '343050' state is 0x602 after update job.
Usually there is a file system permission issue preventing steamcmd from writing to your game installation directory.
Client high latency or lagging
Possible causes:
How can I copy local data to server?
Local data is stored in <User Documents>\Klei\DoNotStarveTogether\<Random Number>.
There are two situations:
Cluster_X to server and rename to Cluster_1, then it should work.client_save except session and Cluster_X/save/session to server Cluster_1/save.saveindex because the server recognize only the first slot.supervisor.conf to disable cave server.How can I enable mods after copy local data to server?
Open Cluster_X/Master/modoverrides.lua and you will see something like workshop-XXXXX where XXXXX is a number.
Open Cluster_1/mods/dedicated_server_mods_setup.lua on server and write ServerModSetup("XXXXX").
Don't Starve Together Dedicated Server Docker Image Copyright (C) 2015-2018 James Swineson (Jamesits) and Mingye Wang (Arthur2e5) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务