One-Command Stardew Valley Server Deployment | Cross-Platform Multiplayer Support
一键部署星露谷物语服务器 | 全平台联机支持
Setting up a Stardew Valley dedicated server has never been easier! With one simple command, you can have your own 24/7 multiplayer server running on any platform - PC, Mac, Linux, iOS, and Android players can all join together.
Perfect for:
- ✅ Remote Multiplayer - Play with friends anywhere in the world
- ✅ Cross-Platform Gaming - iOS, Android, and PC players together
- ✅ 24/7 Always-On Server - Join anytime, no need for host to be online
- ✅ Easy Setup - One command deployment with Docker Compose
- ✅ Low Resource Usage - Runs smoothly on just 2GB RAM
- One-Command Deploy - Deploy in 3 minutes with a single command
- Cross-Platform Support 📱 - PC, Mac, Linux, iOS, Android all supported
- 24/7 Dedicated Server ⚡ - Runs independently without requiring the host to be online
- Docker Compose 🐳 - Easy deployment and management
- Resource Efficient 💪 - Runs smoothly on servers with only 2GB RAM
- Auto-Save Loading 💾 - Automatically loads your save on server restart
- VNC Remote Access 🖥️ - Built-in VNC for easy first-time setup
- Instant Sleep 🛏️ - Bonus feature: Players can sleep at any time without waiting
- Hidden Host 👻 - Host player is automatically hidden for seamless gameplay
English Version:
curl -sSL https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/quick-start.sh | bash中文版 (Chinese Version):
curl -sSL https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/quick-start-zh.sh | bashThe script will:
- ✅ Check your Docker installation
- ✅ Guide you to enter Steam credentials
- ✅ Create all necessary directories with correct permissions
- ✅ Generate configuration files
- ✅ Start the server
- ✅ Show you connection information
That's it! ☕ Grab a coffee while it downloads the game (~1.5GB).
- Docker and Docker Compose installed (Get Docker)
- A Steam account with Stardew Valley purchased
- 2GB RAM minimum, 4GB recommended
- 2GB free disk space
# Clone the repository
git clone https://github.com/truman-world/puppy-stardew-server.git
cd puppy-stardew-server
# Or download files directly
mkdir puppy-stardew && cd puppy-stardew
wget https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/docker-compose.yml
wget https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/.env.example# Copy environment template
cp .env.example .env
# Edit with your Steam credentials
nano .env # or use your favorite editor.env example:
STEAM_USERNAME=your_steam_username
STEAM_PASSWORD=your_steam_password
ENABLE_VNC=true
VNC_PASSWORD=stardew123# Create data directories
mkdir -p data/{saves,game,steam}
# Set correct ownership (steam user in container is UID 1000)
chown -R 1000:1000 data/
# Or use sudo if needed
sudo chown -R 1000:1000 data/# Start the server
docker compose up -d
# View logs
docker logs -f puppy-stardewIf Steam Guard is enabled, you'll need to enter the code:
docker attach puppy-stardew
# Enter your Steam Guard code
# Press Ctrl+P Ctrl+Q to detach (NOT Ctrl+C!)After the server starts, you need to create or load a save file once:
-
Connect to VNC:
-
In the VNC window:
- Create a new farm, or
- Load an existing save
-
Once loaded:
- The ServerAutoLoad mod will remember your save
- Future restarts will auto-load this save
- You can disconnect from VNC
-
Players can now connect!
- Open Stardew Valley
- Click "Co-op" → "Join LAN Game"
- Your server should appear in the list
- Or manually enter:
your-server-ip:24642
| Mod | Version | Purpose |
|---|---|---|
| AutoHideHost | v1.0.0 | Custom mod - Hides host player and enables instant sleep |
| Always On Server | v1.20.3 | Keeps server running 24/7 without host player |
| ServerAutoLoad | v1.2.1 | Custom mod - Automatically loads your save on startup |
All mods are pre-configured and ready to use!
View Server Logs
# Real-time logs
docker logs -f puppy-stardew
# Last 100 lines
docker logs --tail 100 puppy-stardewRestart Server
docker compose restartStop Server
docker compose downUpdate to Latest Version
docker compose down
docker pull truemanlive/puppy-stardew-server:latest
docker compose up -dBackup Your Saves
# Manual backup
tar -czf backup-$(date +%Y%m%d).tar.gz data/saves/
# Or use the backup script (after running quick-start.sh)
./backup.shCheck Server Health
# Use the health check script (after running quick-start.sh)
./health-check.sh
# Or manually
docker ps | grep puppy-stardew # Should show "healthy"Error: "Disk write failure" when downloading game
Cause: Data directories have wrong permissions.
Fix:
chown -R 1000:1000 data/
docker compose restartThe container runs as user ID 1000, so files must be owned by UID 1000.
Steam Guard code required
If you have Steam Guard enabled:
docker attach puppy-stardew
# Enter the code from your email/mobile app
# Press Ctrl+P Ctrl+Q to detach (NOT Ctrl+C!)Tip: Consider using Steam Guard mobile app for faster codes.
Game won't start
- Check logs:
docker logs puppy-stardew - Verify Steam credentials in
.env - Ensure you own Stardew Valley on Steam
- Check disk space:
df -h - Restart:
docker compose restart
Players can't connect
-
Check firewall: Port
24642/udpmust be open# Ubuntu/Debian sudo ufw allow 24642/udp # CentOS/RHEL sudo firewall-cmd --add-port=24642/udp --permanent sudo firewall-cmd --reload
-
Verify server is running:
docker ps | grep puppy-stardew -
Check if save is loaded: Connect via VNC or check logs for "Save loaded"
-
Ensure game versions match: Server and clients must have same Stardew Valley version
VNC won't connect
- Check port
5900/tcpis accessible - Verify VNC password (max 8 characters)
- Try a different VNC client (RealVNC)
- Check logs:
docker logs puppy-stardew | grep -i vnc
Server uses too much RAM
Edit docker-compose.yml to reduce memory limit:
deploy:
resources:
limits:
memory: 1.5G # Reduce from 2GThen restart:
docker compose up -dCustomize Mod Settings
Mod configs are in /home/steam/stardewvalley/Mods/ inside the container:
# Edit AutoHideHost config
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/AutoHideHost/config.json
# Edit Always On Server config
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/AlwaysOnServer/config.json
# Edit ServerAutoLoad config
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/ServerAutoLoad/config.jsonAfter editing, restart the server:
docker compose restartChange Port Numbers
Edit docker-compose.yml:
ports:
- "24642:24642/udp" # Change first number to your desired port
- "5900:5900/tcp" # VNC portRestart after changes:
docker compose up -dDisable VNC After Setup
Edit .env:
ENABLE_VNC=falseRestart:
docker compose up -dThis saves ~50MB RAM.
Server:
- CPU: 1+ cores (2+ recommended)
- RAM: 2GB minimum (4GB recommended for 4+ players)
- Disk: 2GB free space
- OS: Linux, Windows (Docker Desktop), macOS (Docker Desktop)
- Network: Open port 24642/UDP (and 5900/TCP for VNC)
Clients:
- Stardew Valley (any platform: PC, Mac, Linux, iOS, Android)
- Same game version as server
- LAN or internet connection to server
- Low RAM servers (2GB): Set memory limit to 1.5G in docker-compose.yml
- Multiple players: Increase to 4GB RAM for 4+ concurrent players
- Reduce bandwidth: Players on slow connections should avoid hosting events
- SSD recommended: Faster load times for saves
License: MIT License - free to use, modify, and distribute.
Important Legal Notes:
- ✅ You MUST own Stardew Valley on Steam
- ✅ Game files are downloaded via YOUR Steam account
- ✅ This is NOT a piracy tool
- ✅ Mods follow their original licenses:
- Always On Server: GPL-3.0
- ServerAutoLoad: MIT (custom mod for this project)
- AutoHideHost: MIT (custom mod for this project)
- Stardew Valley by ConcernedApe
- SMAPI by Pathoschild
- Always On Server by funny-snek & Zuberii
- Docker by Docker, Inc.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
- Bug Reports: GitHub Issues
- Questions: GitHub Discussions
- Docker Hub: truemanlive/puppy-stardew-server
If this project helps you, consider giving it a star! ⭐
搭建星露谷物语专用服务器从未如此简单!通过一条命令,您就可以拥有自己的 24/7 多人联机服务器,支持全平台联机 - PC、Mac、Linux、iOS 和 Android 玩家都可以一起游戏。
完美适用于:
- ✅ 远程联机 - 与世界各地的朋友一起玩
- ✅ 跨平台游戏 - iOS、Android 和 PC 玩家一起联机
- ✅ 24/7 在线服务器 - 随时加入,无需房主在线
- ✅ 简单搭建 - 使用 Docker Compose 一键部署
- ✅ 低资源占用 - 仅需 2GB 内存即可流畅运行
- 一键部署 - 一条命令 3 分钟完成部署
- 全平台支持 📱 - PC、Mac、Linux、iOS、Android 全支持
- 24/7 专用服务器 ⚡ - 服务器独立运行,不需要房主在线
- Docker Compose 🐳 - 轻松部署和管理
- 资源高效 💪 - 2GB 内存服务器也能流畅运行
- 自动加载存档 💾 - 重启容器,存档自动加载
- VNC 远程访问 🖥️ - 内置 VNC,首次设置超简单
- 即时睡眠 🛏️ - 附加功能:玩家随时可以睡觉,无需等待
- 隐藏房主 👻 - 房主玩家自动隐藏,零干扰
英文版 (English Version):
curl -sSL https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/quick-start.sh | bash中文版:
curl -sSL https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/quick-start-zh.sh | bash脚本会自动:
- ✅ 检查 Docker 安装
- ✅ 引导输入 Steam 凭证
- ✅ 创建必要目录并设置正确权限
- ✅ 生成配置文件
- ✅ 启动服务器
- ✅ 显示连接信息
就这么简单! ☕ 下载游戏文件时去喝杯咖啡(约 1.5GB)。
- 已安装 Docker 和 Docker Compose(安装 Docker)
- 一个 Steam 账户,并且已购买星露谷物语
- 最低 2GB 内存,推荐 4GB
- 2GB 可用磁盘空间
# 克隆仓库
git clone https://github.com/truman-world/puppy-stardew-server.git
cd puppy-stardew-server
# 或者直接下载文件
mkdir puppy-stardew && cd puppy-stardew
wget https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/docker-compose.yml
wget https://raw.githubusercontent.com/truman-world/puppy-stardew-server/main/.env.example# 复制环境变量模板
cp .env.example .env
# 编辑并填写您的 Steam 凭证
nano .env # 或使用您喜欢的编辑器.env 示例:
STEAM_USERNAME=your_steam_username
STEAM_PASSWORD=your_steam_password
ENABLE_VNC=true
VNC_PASSWORD=stardew123# 创建数据目录
mkdir -p data/{saves,game,steam}
# 设置正确的所有权(容器内 steam 用户的 UID 是 1000)
chown -R 1000:1000 data/
# 如果需要,使用 sudo
sudo chown -R 1000:1000 data/# 启动服务器
docker compose up -d
# 查看日志
docker logs -f puppy-stardew如果启用了 Steam 令牌,您需要输入验证码:
docker attach puppy-stardew
# 输入您的 Steam 令牌代码
# 按 Ctrl+P Ctrl+Q 分离(不是 Ctrl+C!)服务器启动后,您需要一次性创建或加载存档:
-
连接到 VNC:
-
在 VNC 窗口中:
- 创建新农场,或
- 加载现有存档
-
加载完成后:
- ServerAutoLoad 模组会记住您的存档
- 以后重启会自动加载此存档
- 您可以断开 VNC 连接了
-
玩家现在可以连接了!
- 打开星露谷物语
- 点击"合作" → "加入局域网游戏"
- 您的服务器应该出现在列表中
- 或手动输入:
服务器IP:24642
| 模组 | 版本 | 用途 |
|---|---|---|
| AutoHideHost | v1.0.0 | 自定义模组 - 隐藏房主玩家并启用即时睡眠 |
| Always On Server | v1.20.3 | 保持服务器 24/7 运行,不需要房主在线 |
| ServerAutoLoad | v1.2.1 | 自定义模组 - 启动时自动加载存档 |
所有模组都已预配置,开箱即用!
查看服务器日志
# 实时日志
docker logs -f puppy-stardew
# 最后 100 行
docker logs --tail 100 puppy-stardew重启服务器
docker compose restart停止服务器
docker compose down更新到最新版本
docker compose down
docker pull truemanlive/puppy-stardew-server:latest
docker compose up -d备份存档
# 手动备份
tar -czf backup-$(date +%Y%m%d).tar.gz data/saves/
# 或使用备份脚本(运行 quick-start.sh 后可用)
./backup.sh检查服务器健康状态
# 使用健康检查脚本(运行 quick-start.sh 后可用)
./health-check.sh
# 或手动检查
docker ps | grep puppy-stardew # 应该显示 "healthy"错误:"Disk write failure" 下载游戏时
原因:数据目录权限不正确。
解决方法:
chown -R 1000:1000 data/
docker compose restart容器以用户 ID 1000 运行,所以文件必须归 UID 1000 所有。
需要 Steam 令牌代码
如果您启用了 Steam 令牌:
docker attach puppy-stardew
# 输入您邮箱/手机应用中的代码
# 按 Ctrl+P Ctrl+Q 分离(不是 Ctrl+C!)提示:建议使用 Steam 令牌手机应用,获取代码更快。
游戏无法启动
- 检查日志:
docker logs puppy-stardew - 验证
.env中的 Steam 凭证 - 确保您在 Steam 上拥有星露谷物语
- 检查磁盘空间:
df -h - 重启:
docker compose restart
玩家无法连接
-
检查防火墙:端口
24642/udp必须开放# Ubuntu/Debian sudo ufw allow 24642/udp # CentOS/RHEL sudo firewall-cmd --add-port=24642/udp --permanent sudo firewall-cmd --reload
-
验证服务器正在运行:
docker ps | grep puppy-stardew -
检查存档是否已加载:通过 VNC 连接或检查日志中的 "Save loaded"
-
确保游戏版本匹配:服务器和客户端必须是相同的星露谷物语版本
VNC 无法连接
- 检查端口
5900/tcp是否可访问 - 验证 VNC 密码(最多 8 个字符)
- 尝试不同的 VNC 客户端(RealVNC)
- 检查日志:
docker logs puppy-stardew | grep -i vnc
服务器占用太多内存
编辑 docker-compose.yml 减少内存限制:
deploy:
resources:
limits:
memory: 1.5G # 从 2G 减少然后重启:
docker compose up -d自定义模组设置
模组配置文件在容器内的 /home/steam/stardewvalley/Mods/ 目录:
# 编辑 AutoHideHost 配置
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/AutoHideHost/config.json
# 编辑 Always On Server 配置
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/AlwaysOnServer/config.json
# 编辑 ServerAutoLoad 配置
docker exec puppy-stardew nano /home/steam/stardewvalley/Mods/ServerAutoLoad/config.json编辑后重启服务器:
docker compose restart更改端口号
编辑 docker-compose.yml:
ports:
- "24642:24642/udp" # 更改第一个数字为您想要的端口
- "5900:5900/tcp" # VNC 端口更改后重启:
docker compose up -d设置完成后禁用 VNC
编辑 .env:
ENABLE_VNC=false重启:
docker compose up -d这可以节省约 50MB 内存。
服务器:
- CPU:1+ 核心(推荐 2+)
- 内存:最低 2GB(4+ 玩家推荐 4GB)
- 磁盘:2GB 可用空间
- 操作系统:Linux、Windows(Docker Desktop)、macOS(Docker Desktop)
- 网络:开放端口 24642/UDP(VNC 需要 5900/TCP)
客户端:
- 星露谷物语(任何平台:PC、Mac、Linux、iOS、Android)
- 与服务器相同的游戏版本
- 局域网或互联网连接到服务器
- 低内存服务器(2GB):在 docker-compose.yml 中设置内存限制为 1.5G
- 多玩家:4+ 同时在线玩家,增加到 4GB 内存
- 减少带宽:网速慢的玩家避免主办活动
- 推荐 SSD:存档加载更快
许可证:MIT 许可证 - 免费使用、修改和分发。
重要法律说明:
- ✅ 您必须在 Steam 上拥有星露谷物语
- ✅ 游戏文件通过您的 Steam 账户下载
- ✅ 这不是盗版工具
- ✅ 模组遵循其原始许可证:
- Always On Server:GPL-3.0
- ServerAutoLoad:MIT(本项目自定义模组)
- AutoHideHost:MIT(本项目自定义模组)
- 星露谷物语 by ConcernedApe
- SMAPI by Pathoschild
- Always On Server by funny-snek & Zuberii
- Docker by Docker, Inc.
欢迎贡献!请:
- Fork 本仓库
- 创建功能分支
- 提交 Pull Request
- 错误报告:GitHub Issues
- 问题讨论:GitHub Discussions
- Docker Hub:truemanlive/puppy-stardew-server
如果这个项目帮助了您,请考虑给个 Star!⭐
Made with ❤️ for the Stardew Valley community
为星露谷物语社区用爱制作