Traefik/Cloudflare app management CLI for quick deployment of web apps with automatic SSL and DNS setup.
Hotify is an opinionated CLI+UI tool that simplifies deploying web apps behind Traefik with Cloudflare DNS and Let's Encrypt SSL certificates. It assumes apps follow the boilerplate-cli-ui-go pattern: a binary with daemon start/stop that exposes an HTTP server on a port.
- CLI Commands: Add, edit, remove, and list apps
- Web UI: Browser-based app management
- DNS Setup: Automatic Cloudflare DNS record creation
- SSL Certificates: Automatic Let's Encrypt certificates via Traefik
- Traefik Integration: Automatic Traefik configuration updates
- Daemon Mode: Background service for persistent management
cd /home/jarancibia/ai/hotify-cli
chmod +x build.sh
./build.sh
sudo cp hotify-cli /usr/local/bin/hotify-cli --helphotify-cli initYou'll be prompted for:
- Cloudflare API token (legacy format recommended)
- Base domain (e.g., example.com)
- Admin email for Let's Encrypt
hotify-cli add \
--id myapp \
--name "My App" \
--domain myapp \
--port 3000 \
--command "/path/to/myapp start" \
--source "github.com/user/repo"hotify-cli edit --id myapp --name "Updated Name"hotify-cli remove --id myapphotify-cli list# Foreground
hotify-cli start --port 8080
# Background (daemon)
hotify-cli start --daemonhotify-cli statushotify-cli stopStart the daemon and access the web UI:
hotify-cli start --daemon
# Access at http://localhost:8080The web UI provides:
- Configuration overview
- App management (add/edit/remove)
- One-click DNS setup
- One-click Traefik configuration
- Real-time status updates
After adding an app, set up the DNS record:
hotify-cli setup-dns --id myapp --ip 92.113.145.178This creates an A record in Cloudflare pointing to your server IP.
Configure Traefik for your app:
hotify-cli setup-traefik --id myappThis:
- Creates/updates
/etc/traefik/traefik.yml - Creates/updates
/etc/traefik/dynamic.yml - Sets up Cloudflare environment variables
- Configures systemd service
- Restarts Traefik
Apps must follow this pattern:
- Binary: Single executable file
- Daemon Mode: Support
start/stopcommands - HTTP Server: Expose HTTP on a specific port
- No SSL: Let Traefik handle SSL/TLS
Example app structure:
myapp start --port 3000 # Starts HTTP server on port 3000
myapp stop # Stops the daemonConfiguration is stored at ~/.hotify/config.json:
{
"cloudflare_token": "your_token",
"domain": "example.com",
"admin_email": "admin@example.com",
"apps": [
{
"id": "myapp",
"name": "My App",
"domain": "myapp.example.com",
"port": 3000,
"command": "/path/to/myapp start",
"source": "github.com/user/repo",
"status": "stopped"
}
]
}main.go- CLI command handlingconfig.go- Configuration managementdaemon.go- Daemon process managementserver.go- HTTP server and web UIcloudflare.go- Cloudflare API integrationtraefik.go- Traefik configuration management
Hotify manages:
/etc/traefik/traefik.yml- Main Traefik configuration/etc/traefik/dynamic.yml- Dynamic routing configuration/etc/traefik/cloudflare.env- Cloudflare credentials/etc/traefik/acme.json- SSL certificate storage/etc/systemd/system/traefik.service- Systemd service
Hotify uses Cloudflare API to:
- Get zone ID for domain
- Create A records for app subdomains
- Configure DNS-only mode (proxy disabled)
When the web UI is running, these API endpoints are available:
GET /- Web UIGET /api/status- Server statusGET /api/health- Health checkGET /api/config- Current configurationGET /api/apps- List all appsPOST /api/apps/add- Add new appPOST /api/apps/edit- Edit existing appPOST /api/apps/remove- Remove appPOST /api/apps/setup-dns- Setup DNS for appPOST /api/apps/setup-traefik- Setup Traefik for app
-
Initialize hotify (first time only):
hotify-cli init
-
Add the app:
hotify-cli add \ --id myapp \ --name "My App" \ --domain myapp \ --port 3000 \ --command "/home/user/myapp start" \ --source "github.com/user/myapp"
-
Deploy the app binary to the server
-
Setup DNS:
hotify-cli setup-dns --id myapp --ip 92.113.145.178
-
Setup Traefik:
hotify-cli setup-traefik --id myapp
-
Access the app at https://myapp.example.com
-
Start the daemon:
hotify-cli start --daemon
-
Use the web interface to:
- View configuration
- Add/edit/remove apps
- Setup DNS with one click
- Setup Traefik with one click
- Go 1.21+ (for building)
- Linux server with systemd
- Cloudflare account with domain
- Traefik installed on server
- Server with public IP
# Check status
hotify-cli status
# View logs
cat /tmp/hotify-cli.log
# Restart daemon
hotify-cli stop
hotify-cli start --daemon# Check Traefik status
sudo systemctl status traefik
# View Traefik logs
sudo journalctl -u traefik -f
# Restart Traefik
sudo systemctl restart traefik- Verify Cloudflare token has DNS edit permissions
- Check that domain is managed in Cloudflare
- Ensure server IP is correct
- Check Cloudflare dashboard for DNS records
- Verify admin email is correct
- Check Traefik logs for ACME errors
- Ensure DNS record is propagated
- Check Let's Encrypt rate limits
- Cloudflare token is stored in plaintext config file
- Set appropriate file permissions on
~/.hotify/config.json - Use API tokens with minimal required permissions
- Consider using environment variables for sensitive data
- Regularly rotate Cloudflare tokens
- Assumes specific app architecture (binary + HTTP server)
- Requires Traefik to be installed separately
- Only supports Cloudflare DNS provider
- No built-in app deployment (binary management)
- No automatic app process management
- Single server deployment only
- Support for multiple DNS providers
- Built-in app deployment (git pull, build, install)
- App process management (start/stop/restart)
- Multi-server support
- SSL certificate monitoring
- Health check integration
- Rollback capabilities
- Configuration backup/restore
MIT
Contributions welcome! Please read the contributing guidelines first.
For issues and questions:
- GitHub Issues: [repository URL]
- Documentation: [docs URL]