Skip to content

Fly.io ​

The repository includes fly.toml.example. It builds from the Dockerfile, mounts a volume at /data, forces HTTPS and keeps one machine running.

sh
git clone https://github.com/karanjot786/trail && cd trail
cp fly.toml.example fly.toml          # then set `app` to your app name
fly launch --no-deploy --copy-config
fly volumes create trail_data --size 1
fly secrets set TRAIL_PASSWORD=change-me   # optional: without it, the first start logs a generated password
fly deploy

Open https://<app>.fly.dev and sign in with TRAIL_PASSWORD, or with the generated password from fly logs | grep 'Log in'. The session key is kept in the database on the volume, so logins survive deploys without TRAIL_SECRET. If you skipped TRAIL_SITES, add your site under Settings → Add site.

What the example config sets ​

KeyValueWhy
[env] TRAIL_DB/data/trail.dbThe file lives on the volume
[env] TRAIL_TZAsia/KolkataChange it to your timezone for daily buckets
[mounts]trail_data → /dataOne volume, one machine
auto_stop_machinesoffIngest must answer at any time
min_machines_running1
[[vm]] memory256mb

Run exactly one machine. SQLite is a local file, so a second machine would have its own separate database.

Backups ​

Fly takes daily volume snapshots. For a copy you control, see Backups; on Fly run the commands through fly ssh console.

Next ​