Deploy on Fly.io
Fly.io runs your bot on small VMs in your choice of region. About $3/month for a minimal config, more if you want multi-region redundancy.
Why Fly.io
- Cheap — small VMs start around $3/month.
- Multi-region capability if you want geographic redundancy.
- Persistent volumes available.
- HTTPS termination handled by Fly's edge.
- Good for users who want closer control of their infra than Railway/Render allow.
Prerequisites
- A Fly.io account (signup at fly.io).
- Credit card on file (no free tier as of 2026).
- The Fly CLI installed (
flyctl). - Your caput bundle.
Install flyctl
On macOS:
brew install flyctl
On Linux:
curl -L https://fly.io/install.sh | sh
On Windows:
iwr https://fly.io/install.ps1 -useb | iex
Sign in:
fly auth login
Steps
1. Initialize the Fly app
In the directory where you extracted your bundle:
fly launch --no-deploy
This creates a fly.toml configuration file. You'll be asked:
- App name:
caput-bot(or your choice; becomes part of your URL). - Region: pick the closest to you.
- Database: skip (we use SQLite locally).
- Postgres: skip.
- Deploy now: no.
Answer "no" to deploy now — we need to configure first.
2. Configure fly.toml
Edit the generated fly.toml. Key settings for caput:
app = "caput-bot"
primary_region = "iad" # or your region
[build]
# Phase 2+ will have a Dockerfile; Phase 0 placebuyer doesn't deploy
[env]
XRPL_NETWORK = "testnet"
ADMIN_PORT = "7777"
STATE_DB_PATH = "/data/caput.db"
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = false # IMPORTANT: must be false for caput
auto_start_machines = true
min_machines_running = 1 # always 1 instance running
[[mounts]]
source = "caput_data"
destination = "/data"
The critical setting is auto_stop_machines = false and min_machines_running = 1. If these are wrong, Fly will stop your bot during idle periods, breaking the polling loop and exposing you to operational risk.
3. Set secrets
Sensitive variables (license info, wallet address) should be set as Fly secrets, not in fly.toml:
fly secrets set LICENSE_TX_HASH=<your-tx-hash>
fly secrets set LICENSE_WALLET=<your-wallet-address>
fly secrets set LICENSE_TIER=<tier-number>
fly secrets set LICENSE_MAX_USES=<uses-count>
fly secrets set LICENSE_MEMO=<session-memo>
fly secrets set WALLET_ADAPTER=<your-adapter>
fly secrets set DEPLOY_HOST=fly
(Pull these values from your bundle's config.env.)
4. Create the persistent volume
fly volumes create caput_data --region iad --size 1
This creates a 1GB volume in your region, costing $0.15/month.
5. Deploy
fly deploy
Fly builds the container, pushes to its registry, and starts the VM.
6. Get your public URL
fly status
The hostname will look like caput-bot.fly.dev. Set this as your PUBLIC_HOST:
fly secrets set PUBLIC_HOST=https://caput-bot.fly.dev
7. First-run setup
fly logs
Find the admin setup token in the startup logs.
Visit https://caput-bot.fly.dev/admin?setup=XXXX-XXXX-XXXX to complete setup.
8. Set up uptime monitoring
Same recommendation as other hosts. External uptime monitor hitting /health.
9. Multi-region (optional)
If you want geographic redundancy:
fly regions add lhr # London
fly regions add nrt # Tokyo
fly scale count 3
This runs three instances across three regions. State is on the volume, which is region-pinned, so multi-region is more about HTTP availability than state replication. For caput, single-region with strong uptime monitoring is usually fine.
Costs
- Fly shared-cpu-1x VM (256MB): ~$2/month
- 1GB volume: $0.15/month
- HTTPS / certificates: included
- Bandwidth: usage-based, typically pennies/month for caput's traffic
- Total: ~$3-4/month
For multi-region (3 instances), multiply VM cost by region count.
Updating
fly deploy
Pushes the new code, restarts the machine. State persists on the volume.
Support
Fly docs at fly.io/docs.
Caput-specific issues: read the source.