mirror of
https://github.com/BrenBroZAYT/uptime-kuma-discord-bot.git
synced 2026-06-13 16:40:03 +00:00
3.4 KiB
3.4 KiB
Deploy to Fly.io
Deploy your Uptime Kuma Discord Bot to Fly.io with minimal resources (free tier compatible).
Prerequisites
- Fly.io account (sign up at https://fly.io)
- Fly CLI installed (
brew install flyctlor see https://fly.io/docs/hands-on/install-flyctl/) - Discord bot token
- Uptime Kuma credentials
Quick Deploy
1. Clone and Navigate
git clone https://github.com/jakedev796/uptime-kuma-discord-bot
cd uptime-kuma-discord-bot
2. Login to Fly.io
fly auth login
3. Deploy
fly launch --copy-config --auto-confirm --ha=false --name your-unique-bot-name --now
This will:
- Create the app with minimal resources (256MB RAM, 1 shared CPU)
- Create a 1GB volume for persistent data
- Deploy the bot immediately
4. Set Secrets
fly secrets set \
DISCORD_BOT_TOKEN=your_discord_bot_token_here \
UPTIME_KUMA_URL=https://your-uptime-kuma-url.com \
UPTIME_KUMA_USERNAME=admin \
UPTIME_KUMA_PASSWORD=your_password_here \
ADMIN_USER_IDS=your_discord_user_id
The bot will automatically restart with the new secrets.
5. Verify Deployment
fly logs # Check startup logs
fly status # Verify it's running
6. Configure in Discord
/set-channel #status
/set-title Production Services
/track-all
Done! Your bot is running on Fly.io!
Configuration
The fly.toml is pre-configured for minimal resources:
- CPU: 1 shared CPU
- Memory: 256MB (minimal but sufficient for this bot)
- Volume: 1GB for persistent configuration
- Region:
iad(Ashburn, VA - change if needed) - Always on:
auto_stop_machines = falseandmin_machines_running = 1 - Single instance:
ha = false(no high availability needed)
Managing Your Deployment
View Logs
fly logs
Check Status
fly status
Scale Resources (if needed)
fly scale memory 512 # Increase to 512MB
fly scale count 1 # Ensure single instance
Update Secrets
fly secrets set UPTIME_KUMA_PASSWORD=new_password
Redeploy After Code Changes
fly deploy
SSH into the App
fly ssh console
Costs
With this configuration:
- Shared CPU-1x @ 256MB: ~$1.94/month
- 1GB Volume: Free (3GB included)
- Bandwidth: Free (100GB included)
Total: ~$2/month or free with Fly.io credits
Regions
Change the region in fly.toml if needed:
iad- Ashburn, Virginia (US)lhr- London, UKfra- Frankfurt, Germanysyd- Sydney, Australianrt- Tokyo, Japan
Full list: https://fly.io/docs/reference/regions/
Troubleshooting
Bot not starting
fly logs # Check for errors
fly status # Verify it's running
Update environment variables
fly secrets list # See all secrets
fly secrets set KEY=value
Bot keeps restarting
- Check memory usage:
fly scale show - Increase if needed:
fly scale memory 512 - Check logs for errors:
fly logs
Volume issues
fly volumes list # List volumes
fly volumes delete bot_data # Delete if needed
fly volumes create bot_data --size 1 # Recreate
Cleanup
To delete the app:
fly apps destroy your-app-name
Support
For Fly.io specific issues:
- Fly.io Docs: https://fly.io/docs/
- Fly.io Community: https://community.fly.io/
For bot issues:
- Check README.md
- Open GitHub issue