Decide whether to use Supabase
Bolt Database works for most projects. Bolt creates a database automatically if your project needs one, and you don’t need to do any setup. Supabase is a better fit if you need:- SQL editing, external management tools, or advanced monitoring in the Supabase dashboard
- Auth emails sent from your own email provider through custom SMTP, which raises the limit on auth emails your app can send
- Your database in your own Supabase account, where you control its plan and settings
- Pausing: On Supabase’s Free plan, Supabase pauses databases after a week of low activity, whether you claimed the database from Bolt or connected it, and even if your Bolt project is published. To learn how to resume a paused database, see My Supabase database looks disconnected in Bolt.
- Leaked password protection: Leaked password protection requires a Supabase Pro plan or higher. On the Free plan, the setting is turned off.
Options for using Supabase
All three options require you to connect Bolt to Supabase first.
Connect Bolt to Supabase
Connect Bolt to Supabase in your Account settings, under Applications. You only need to do this once, and the connection is available to all of your projects.
- Log in to Bolt and open any project.
- In the left sidebar, click your project name, then click All project settings.
- Under Account, click Applications.
- In the Supabase row, click Connect.
- Log in with your Supabase credentials. The Authorize Bolt page appears.
- Select your Supabase organization, and review the access permissions Bolt is requesting. Bolt connects your account to one Supabase organization, and you can’t change which organization is connected later.
- Click Authorize Bolt. The page closes and you return to Bolt. You should see a confirmation that your Supabase account is connected.
Start a project using Supabase
When you create a new project from the Bolt homepage, you can select Supabase as your database. If your Bolt account isn’t connected to Supabase yet, Bolt guides you through the connection when you select Supabase.
- Log in and open the Bolt homepage.
- In the bottom-left corner of the chatbox, click the plus icon.
- Hover over Database, then click Supabase.
Claim your Bolt Database in Supabase
Claiming your database moves an existing Bolt Database, including its data, to your Supabase account. After you claim your database, it follows your Supabase plan’s rules for pausing and leaked password protection. To claim your database, you need to be an owner of the Supabase organization you connected to Bolt. Supabase controls this permission, so if you’re not the owner, you’ll have to ask the owner to claim the database or to change your permissions in Supabase.
- Make sure you’ve already connected Bolt to your Supabase account.
- Log in to Bolt and open the project with the database you want to claim.
- In the top center of your screen, click the database icon.
- Click the Advanced tab.
- Click Claim.
- Follow the prompts in Supabase to finish claiming the database.
Connect a Supabase database
Connect a Supabase database to use a database you already have in Supabase, or to create a new Supabase database for an existing Bolt project.
- Make sure you’ve connected Bolt to your Supabase account.
- Log in to Bolt and open the project you want to connect the database to.
- In the top center of your screen, click the database icon.
- Click the Advanced tab.
- Click Connect.
- Select an existing Supabase project or create a new one.
- Click Connect project.
View and manage your Supabase database in Bolt
To view your connected Supabase database, or to change settings like authentication, server functions, and secrets, click the database icon at the top center of your screen, then select the tab for the settings you need. When you restore an earlier version of your project, your Supabase database keeps its current data.Add authentication with Supabase
When you ask Bolt to add authentication with Supabase, your app’s users can sign up and log in through Supabase’s user management service. To add authentication to your app:- Make sure you’ve connected your Supabase account.
- Prompt Bolt to add authentication with Supabase, including a signup and login screen.
- In your app, go through the signup process.
- If Supabase sends you an email to confirm your email address, open it and confirm your address.
- In Supabase, open your project.
- In the left navigation menu, click Authentication.
- In the Users list, check that the user you just created appears.
Use server functions
Supabase runs your app’s server functions as edge functions. Bolt uses them when your app needs an API or connects to other services, like Stripe for payments. Before you begin, make sure you’ve connected your Supabase account. To add a server function, prompt Bolt to create the edge function you need. For example:Disconnect Supabase
Disconnecting Supabase removes the connection between your Bolt account and your Supabase organization for all of your projects. To disconnect the database from only one project, see Disconnect your database. To disconnect and reconnect a Supabase database, see Restart your database instead.
- In Bolt, disconnect Supabase:
- Log in to any project.
- At the top left of the screen, click your project name, then click All project settings.
- Click Applications under Account settings.
- In the Supabase row, click Disconnect.
- In Supabase, remove Bolt from your authorized applications:
- In the Supabase dashboard, make sure you’re in the organization that you connected to Bolt.
- In the left menu, click Organization Settings.
- Click the OAuth Apps tab.
- Next to Bolt, click Delete.
FAQs and troubleshooting
My Supabase database looks disconnected in Bolt
My Supabase database looks disconnected in Bolt
On Supabase’s Free plan, Supabase pauses databases after a week of low activity, whether you claimed the database from Bolt or connected it, and even if your Bolt project is published. While the project is paused, the Database panel in Bolt looks as if no database is connected.To resume the project, open it in your Supabase dashboard, then click Resume project. The database reconnects in Bolt after the project resumes. For more information, see Supabase’s project pausing documentation.
My database isn't showing in the Select your database dialog
My database isn't showing in the Select your database dialog
If a claimed database doesn’t appear in the Select your database dialog when you click Connect, disconnect Supabase, then connect Bolt to Supabase again. Reconnecting restores the project list.
Bolt doesn't connect to my Supabase database when I prompt it to
Bolt doesn't connect to my Supabase database when I prompt it to
The most common reasons Bolt can’t connect to Supabase are that your Bolt account isn’t connected to Supabase or that your Bolt Database hasn’t been claimed in Supabase.
Can I switch from Supabase to Bolt Database?
Can I switch from Supabase to Bolt Database?
Bolt doesn’t support moving a Supabase database to Bolt Database.