deploy guide

Deploy to Fly.io

Fly is fast, cheap, and flexible — but expects you're comfortable at the command line. If you've never used a terminal before, Railway is the friendlier first stop. total time: about 15 minutes.

Before you start, you'll need:
1

Install the Fly CLI and sign up

On macOS or Linux:

curl -L https://fly.io/install.sh | sh

On Windows (PowerShell):

iwr https://fly.io/install.ps1 -useb | iex

Then create an account:

fly auth signup

Already have an account? fly auth login.

2

Assemble your bot folder

Unzip the bundle you got from the configurator. Everything you need — bot source, your config, your thank-yous — is already inside.

cd justthetips
3

Launch

fly launch

Fly asks several questions:

  • App name: anything, e.g. justthetips
  • Region: pick one close to you
  • Would you like to set up a Postgres database? No. (The bot doesn't use one.)
  • Redis? No.
  • Deploy now? No — we need to set secrets first.

Fly creates a fly.toml in your folder describing the app.

4

Set your secrets

Fly stores environment variables as "secrets." One command per line from your config.env:

fly secrets set OWNER_XRPL_ADDRESS=r...
fly secrets set OWNER_EVM_BASE_ADDRESS=0x...
fly secrets set DISCORD_BOT_TOKEN=MTA1...
# ...and so on for each one
shortcut On macOS/Linux, this one-liner loads your whole config.env:
grep -v '^#' config.env | grep '=' | xargs fly secrets set
5

Deploy

fly deploy

Fly builds your container and deploys. First deploy takes 2-3 minutes.

6

Find your URL

fly info

Look for the Hostname line. Your public URL is https://<hostname>.

Update your API_PUBLIC_URL secret to match:

fly secrets set API_PUBLIC_URL=https://your-bot.fly.dev
7

Check it works

Open https://<your-fly-url>/check.

Every row should be green.

🎉 all green? you're live.

Checking logs

See what your bot is doing:

fly logs

Updates later

  1. Download the new bot tarball, unzip it
  2. Copy config.env, thankyous.json, and fly.toml from your old folder into the new one
  3. fly deploy from the new folder

Secrets stay put between deploys.

Keeping costs low

Fly's pricing is usage-based. A small bot with one machine costs less than $2/month. Scale down machines to zero overnight if you want to save more:

fly scale count 0   # stop
fly scale count 1   # start