
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
A comprehensive, production-ready Docker setup for running ARK: Survival Evolved dedicated servers with automated monitoring, backup system, and cluster support.
The setup consists of two main containers:
ark-server) - Runs the ARK dedicated serversark-health-watcher) - Monitors and manages server healthbash# Pull the latest image from Docker Hub docker pull meopill/ark-server:latest # Or clone repository for docker-compose files git clone https://github.com/meo-pill/ark-server.git cd ark-server
bash# Create persistent data directories sudo mkdir -p <PathToPersistentData>/config sudo mkdir -p <PathToPersistentData>/saves # Set proper permissions sudo chown -R 5000:5000 <PathToPersistentData>/
bash# Add your SSH public key for remote access echo "your-ssh-public-key-here" > <PathToPersistentData>/config/authorized_keys
bash# Copy example configuration cp docker-compose.example.yml docker-compose.yml # Edit the configuration file nano docker-compose.yml # Update the image name and volume paths: # - Change image: to your-dockerhub-username/ark-server:latest # - Change volume paths to your actual host paths
bash# Start the complete stack docker-compose up -d # Check container status docker-compose ps # View logs docker-compose logs -f ark
The following environment variables can be configured in docker-compose.yml:
ARK Server Container
| Variable | Default | Description |
|---|---|---|
MAX_BACKUPS | 24 | Maximum number of backup files to retain |
BACKUP_INTERVAL | 3600 | Backup interval in seconds (1 hour) |
MEMORY_ALERT_THRESHOLD | 90 | Memory usage threshold for alerts (%) |
FAILURE_THRESHOLD | 5 | Number of health check failures before action |
RESTART_THRESHOLD | 2 | Number of restart atte***s before container restart |
Health Watcher Container
| Variable | Default | Description |
|---|---|---|
FAILURE_THRESHOLD | 5 | Number of health failures before server restart |
RESTART_THRESHOLD | 2 | Number of restart atte***s before container restart |
MEMORY_ALERT_THRESHOLD | 90 | Memory usage alert threshold (%) |
CHECK_INTERVAL | 60 | Health check interval in seconds |
CONTAINER_NAME | ark-server | Target container name to monitor |
| Host Path | Container Path | Description |
|---|---|---|
/mnt/donnee/conf/ark/config | /ark-config | Configuration files and backups |
/mnt/donnee/conf/ark/saves | /root/arkGame/ShooterGame/Saved | Game world saves |
| Port Range | Protocol | Description |
|---|---|---|
7777-7800 | UDP/TCP | ARK game connection ports |
27015-27019 | UDP/TCP | Steam query ports |
27051-27057 | UDP/TCP | Extended query ports |
7722 | TCP | SSH access (mapped from container port 22) |
Install Docker and Docker Compose:
bash# Ubuntu/Debian curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh sudo apt-get install docker-compose-plugin # Add your user to docker group (optional) sudo usermod -aG docker $USER
Create directory structure:
bashsudo mkdir -p <PathToPersistentData>/{config,saves} sudo chown -R 5000:5000 <PathToPersistentData>/
Download project files:
bashmkdir ark-server && cd ark-server # Copy all project files to this directory
Build the Docker image:
bashdocker build -t ark:latest .
Create cluster configuration:
bash# Connect to the running container to configure docker-compose up -d docker exec -it ark-server bash # Inside container - configure your cluster launch.sh config
Configure your cluster settings:
MyARKCluster)My ARK Server)Generate SSH key pair (if you don't have one):
bashssh-keygen -C "your_email@example.com"
Add your public key:
bashcat ~/.ssh/id_rsa.pub > <PathToPersistentData>/config/authorized_keys
Connect via SSH:
bashssh -p 7722 root@your-server-ip
Start your ARK cluster:
bash# Inside container or via SSH launch.sh start (normally not needed, as it starts automatically)
Monitor server status:
bash# Monitor system resources launch.sh monitor
Manage maps:
bash# Add a new map launch.sh add # Remove a map launch.sh remove # List configured maps launch.sh list
bash# Start the stack docker-compose up -d # Stop the stack docker-compose down # Restart ARK server only docker-compose restart ark # View logs docker-compose logs -f ark docker-compose logs -f health-watcher # Execute commands in ARK container docker exec -it ark-server bash
bash# Configure cluster settings launch.sh config # Start all configured maps launch.sh start # Stop all servers launch.sh stop # Auto-start (for container startup) launch.sh auto # Add a map to cluster launch.sh add <MapName> # Remove a map from cluster launch.sh remove <MapName> # List configured maps launch.sh list # Show server status launch.sh status # Monitor system resources launch.sh monitor # Start specific map launch.sh start <MapName> # Stop specific map launch.sh stop <MapName>
The automated backup system creates compressed archives of your world saves:
/ark-config/backup-YYYYMMDD-HHMMSS.tar.gzBACKUP_INTERVAL (default: 1 hour)MAX_BACKUPS (default: 24 backups)bash# Create immediate backup docker exec ark-server tar -czf /ark-config/manual-backup-$(date +%Y%m%d-%H%M%S).tar.gz /root/arkGame/ShooterGame/Saved
bash# Stop servers first docker exec ark-server launch.sh stop # Restore from backup docker exec ark-server tar -xzf /ark-config/backup-20240621-120000.tar.gz -C / # Start servers docker exec ark-server launch.sh start
The system includes comprehensive health monitoring:
bash# Container logs docker-compose logs ark docker-compose logs health-watcher # ARK server logs (inside container) tail -f /root/arkGame/ShooterGame/Saved/Logs/ShooterGame.log
Container won't start:
sudo chown -R 5000:5000 /mnt/donnee/conf/ark/Can't connect to servers:
launch.sh listHigh memory usage:
SSH connection refused:
docker exec ark-server /etc/init.d/ssh statusyaml# In docker-compose.yml deploy: resources: limits: memory: 64G # Adjust based on available RAM reservations: memory: 8G # Minimum guaranteed RAM
yaml# In docker-compose.yml deploy: resources: limits: cpus: '8' # Adjust based on available CPU cores
For issues and questions:
docker-compose logsdocker exec ark-server launch.sh monitorThis project is provided as-is for educational and personal use. ARK: Survival Evolved is a trademark of Studio Wildcard.
This image is available on Docker Hub:
Image: meopill/ark-server:latest
latest - Latest stable release1.0.0 - Specific version tagsdev - Development builds (unstable)linux/amd64 - x86_64 architecturelinux/arm64 - ARM64 architecture (if built)If you prefer to build the image yourself:
bash# Clone the repository git clone https://github.com/meo-pill/ark-server.git cd ark-server # Build the image docker build -t ark-server:latest . # Or use the build script chmod +x build-and-push.sh ./build-and-push.sh
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务