Automated update system for Minecraft Bedrock Servers managed through Crafty Controller.
- Automatic update detection from official Minecraft Bedrock Server releases
- Integration with Crafty Controller API for secure server management
- Full backups before every update
- Preservation of configuration files and player data
- Automatic rollback on errors
- Email notifications (success/failure)
- Comprehensive logging
- Cronjob integration for automatic daily updates
- Linux system (Ubuntu/Debian recommended)
- Crafty Controller 4.7.0 or higher
- Bash 4.0+
- jq (JSON processor)
- curl or wget
- tar
# Clone repository
cd /opt
git clone https://github.com/roberteinsle/bedrock-server-updater.git
cd bedrock-server-updater
# Run installation script
sudo ./install.sh
# Adjust configuration
sudo nano .env
# Run first test
sudo ./update-bedrock.sh --dry-runCopy .env.example to .env and adjust the values:
cp .env.example .env
nano .env- CRAFTY_API_URL: URL of your Crafty Controller instance
- CRAFTY_API_TOKEN: API token from Crafty Controller
- SMTP_HOST: SMTP server for email notifications
- SMTP_USER: SMTP username
- SMTP_PASSWORD: SMTP password
- SMTP_TO: Email address for notifications
See docs/CONFIGURATION.md for details.
The Minecraft servers to manage are defined in config/server-list.json:
{
"servers": [
{
"name": "Server1",
"id": "crafty-server-uuid",
"path": "/crafty/servers/crafty-server-uuid"
}
]
}sudo /opt/bedrock-server-updater/update-bedrock.shsudo /opt/bedrock-server-updater/update-bedrock.sh --dry-runThe installation script automatically sets up a daily cronjob. You can adjust the time:
sudo crontab -e
# Example: Daily at 3:00 AM
0 3 * * * /opt/bedrock-server-updater/update-bedrock.sh- All credentials are stored in
.env(not in Git) .envfile has permissions 600 (owner only)- API tokens and passwords are never logged
- Backups are stored with restrictive permissions
The script implements several safety mechanisms:
- Backup before every update: Full backup of all servers
- Automatic rollback: On errors, the old version is restored
- Email notifications: Admins are notified of success/failure
- Comprehensive logging: All actions are logged
The following files are NOT overwritten during updates:
allowlist.json- Whitelistpacketlimitconfig.json- Network settingspermissions.json- Player permissionsprofanity_filter.wlist- Word filterserver.properties- Server configuration- Directories:
worlds/,behavior_packs/,resource_packs/,config/,definitions/
Logs are stored in:
/opt/bedrock-server-updater/logs/update-YYYY-MM-DD.log- Automatic log rotation after 30 days
Backups are stored in:
/opt/bedrock-server-updater/backups/backup-SERVERNAME-YYYY-MM-DD-HHmmss.tar.gz- Default retention: 7 days (configurable)
# Check permissions
ls -la /opt/bedrock-server-updater/update-bedrock.sh
# Make executable
chmod +x /opt/bedrock-server-updater/update-bedrock.sh# Check SMTP settings in .env
cat /opt/bedrock-server-updater/.env
# Run manual email test
source /opt/bedrock-server-updater/lib/notification.sh
send_email "Test" "This is a test email"# Check API token
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://your-crafty-url/api/v2/serversMIT License - see LICENSE
Robert Einsle - robert@einsle.com
Pull requests are welcome! Please open an issue first to discuss major changes.
For problems or questions, please open a GitHub Issue.