Creating a service account user

1. Access Neon Console

Log in to your Neon Console and navigate to your project.

2. Navigate to Database Settings

In your project dashboard, go to Settings > Database or use the Connection Details section.

3. Create the service user

Neon provides a default postgres user, but for better security, you can create a custom service user:
  1. Go to SQL Editor in your Neon console
  2. Run the following SQL commands to create a dedicated service user:
-- Create a new user for Fabi.ai
CREATE USER fabi_service_user WITH PASSWORD 'secure_password';

-- Grant necessary privileges
GRANT CONNECT ON DATABASE neondb 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;

4. Get connection details

From your Neon project dashboard, you’ll need:
  • Host: Your project’s database host (found in Connection Details)
  • Database name: Usually neondb or your custom database name
  • Port: Usually 5432
  • Username: Either postgres or your custom service user
  • Password: Your database password or custom user password

5. Connection String

Neon provides a connection string in the Connection Details section. It will look like:
postgresql://[user]:[password]@[host]/[database]?sslmode=require

Connecting Neon 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.