Creating a service account user

1. Access Supabase Dashboard

Log in to your Supabase Dashboard and navigate to your project.

2. Navigate to Database Settings

Go to Settings > Database in your project dashboard.

3. Create the service user

In the Database settings, scroll down to the Connection string section. You can use the existing connection string or create a new service role key:
  1. Go to Settings > API
  2. Under Project API keys, copy the service_role key (this has admin privileges)
  3. Or create a custom service user with limited permissions using SQL

4. Create a custom service user (Optional)

For better security, you can create a custom service user with limited permissions. In the SQL Editor, run:
-- Create a new user for Fabi.ai
CREATE USER fabi_service_user WITH PASSWORD 'secure_password';

-- Grant necessary privileges
GRANT CONNECT ON DATABASE postgres TO fabi_service_user;
GRANT USAGE ON SCHEMA public TO fabi_service_user;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO fabi_service_user;

-- Optional: Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO fabi_service_user;

5. Get connection details

From your Supabase project settings, you’ll need:
  • Host: Your project’s database host (found in Settings > Database)
  • Database name: Usually postgres
  • Port: Usually 5432
  • Username: Either postgres (with service_role key) or your custom service user
  • Password: Your service_role key or custom user password

Connecting Supabase to Fabi.ai

Once you’ve gathered your connection details, follow the steps in Connecting to Your Data
For information about our industry-leading security practices, check out our Security hub.