Turn on backups
Before your first database change, create the three secrets GitHub needs to back up your data, and save the two things you can't get back. About ten minutes.
You do this once, just before your first database change. Until then your database has nothing in it to protect, so there's no need to do this on day one. The first time your project needs to store information, your agent stops and sends you here. It takes about ten minutes. You can also do it sooner if you'd like.
Supabase's free plan doesn't back up your database, so Bumper Lanes does it for you. Your data is copied every night and before every database change. Your code doesn't need this: GitHub already keeps every version.
Backups run on GitHub, and GitHub needs three secrets to reach your database and lock your backups. You have to add these yourself. An agent working in the cloud doesn't have permission to add GitHub secrets, which also keeps your database password away from it.
You don't need to create a token or give your agent more access, even if it suggests that. Never paste a secret into the chat.
Your agent still helps. Say "Connect backups" and it gives you a direct link to your GitHub secrets page. When you've finished, it runs your first backup and checks it worked.
What to save
Choose somewhere safe before you start. A password manager is ideal, but a piece of paper in a safe place works too. Don't keep these in your project, in a chat or in an email.
| What | Save it? | If you lose it |
|---|---|---|
| Backup passphrase | Yes | It can't be recovered. GitHub keeps using its copy but never shows it again, and nobody, including S3, can open your backups without it. |
| Database password | Yes | Supabase can't show it again. You can reset it, but then you have to update SUPABASE_DB_URL in GitHub. |
| Secret key | No | Copy it from Supabase again whenever you need it. |
| Connection string | No | Build it again from Supabase and your database password. |
1. Open two tabs
Supabase: in Vercel, open your project → Storage → your database → Open in Supabase. You sign in with your Vercel account.
GitHub: use the link your agent gave you. Or open your repository and click Settings at the top (on a narrow screen it may be under ⋯), then in the left menu Secrets and variables → Actions.
Can't see Settings? You're probably looking at S3's template rather than your own copy.
2. Get your database password
Vercel created your database, so you've never been given its password. Set a new one:
- In Supabase, open Database → Settings.
- Under Database password, click Reset database password → Generate a password → Reset password.
- Copy it and save it now. Supabase won't show it again.
This won't affect your site, because the starter app doesn't use this password.
Set up your database by hand? Use the password you saved then.
3. Create the three secrets
Do this once for each secret below:
- In GitHub, click New repository secret. Stay on the Secrets tab, not Variables.
- Name: copy the name exactly as written.
- Secret: paste the value.
- Click Add secret.
After you add a secret, GitHub only shows its name. That's normal: nobody can read the value back.
SUPABASE_DB_URL: how to reach your database
- In Supabase, click Connect at the top of the page.
- Choose Session pooler, not "Direct". GitHub can't reach the direct address.
- Copy the connection string and paste it into GitHub's Secret box.
- Still in that box, replace
[YOUR-PASSWORD]with your database password. Remove the square brackets too.
Before you click Add secret, check that it includes pooler.supabase.com and has no square
brackets left in it.
SUPABASE_SECRET_KEY: lets backups save your uploaded files
In Supabase, open Project Settings → API Keys → Secret keys, then copy a key (or create one if
there isn't one). It starts with sb_secret_. Paste it into the Secret box.
BACKUP_PASSPHRASE: locks your backups
Make up a sentence of at least 20 characters that only you know. Save it first, then paste it into the Secret box.
Check the list
You should now see all three names under Repository secrets. Got one wrong? Click the pencil next to it and paste the value again.
Set up before version 1.1 with SUPABASE_ACCESS_TOKEN? That still works — you don't need
SUPABASE_SECRET_KEY as well.
4. Check it worked
Tell your agent "the backup secrets are in". It runs the two jobs below and tells you how they went. If it can't run them, do it yourself:
- In GitHub, open Actions → Database changes → Run workflow → Run workflow. This first run applies the kit's own database changes, including where backups get recorded.
- When it's green, open Actions → Backup → Run workflow → Run workflow.
- After about 2 minutes you should see a green ✓. Click it — the summary shows what was saved.
Your site's /status page now shows your last backup.
A red ✗ means something is missing or wrong, and the message says what. Ask your agent "is my setup ok?" for help. More about backups: Backups and undo. Why settings live in two places: Environment variables and secrets.
Back to building
That's it. Your agent carries on with the database change it was making, and from now on your data is backed up automatically.
Stuck at any point? Ask your agent "is my setup ok?", or see Troubleshooting.