Skip to main content

PostgreSQL Destination

Prerequisites

  • A PostgreSQL server (version 12 or later) accessible from the internet or via SSH tunnel
  • Permission to create users and grant privileges

Step 1: Create a Dedicated User

Connect to your PostgreSQL server and run:

-- Create a dedicated user for Landed
CREATE USER landed WITH PASSWORD '<strong-password>';

-- Grant privileges on the target schema
GRANT USAGE ON SCHEMA public TO landed;
GRANT CREATE ON SCHEMA public TO landed;

-- If using a custom schema:
-- CREATE SCHEMA IF NOT EXISTS landed_data;
-- GRANT USAGE ON SCHEMA landed_data TO landed;
-- GRANT CREATE ON SCHEMA landed_data TO landed;

The user needs:

  • USAGE on the target schema
  • CREATE on the target schema (to create new tables)
  • Landed will also need INSERT, UPDATE, DELETE on the tables it creates (granted automatically as the table owner)

Step 2: Allow Network Access

Cloud-hosted PostgreSQL

Amazon RDS / Aurora:

  1. Go to AWS Console > RDS > your instance > Security Group
  2. Add an inbound rule: Type = PostgreSQL, Source = Custom, with Landed's static IPs

Google Cloud SQL:

  1. Go to Cloud Console > SQL > your instance > Connections
  2. Under "Authorized networks", add Landed's static IPs

Supabase:

  1. Supabase allows connections from any IP by default
  2. Use the connection details from Settings > Database

Neon:

  1. Neon allows connections from any IP by default
  2. Use the connection string from the Neon dashboard

Landed's Static IPs

EnvironmentIPs
Production34.170.185.84, 35.192.90.94
Staging34.171.93.34

SSH Tunnel (for private databases)

If your database is not publicly accessible, Landed supports SSH tunneling:

  1. Set up a bastion/jump host with a public IP
  2. Add Landed's SSH public key to the bastion's authorized_keys
  3. Ensure the bastion can reach your database on port 5432
  4. In Landed, enable the SSH tunnel toggle and fill in the bastion details

Step 3: Configure in Landed

Option A: Individual Fields

FieldValue
HostYour database hostname or IP
Port5432 (default)
DatabaseYour database name
Userlanded (the user you created)
PasswordThe password you set
Schemapublic (or your custom schema)

Option B: Connection String

Provide a full PostgreSQL URI:

postgresql://landed:<password>@host:5432/mydb?sslmode=require

Step 4: SSL Configuration

We recommend using SSL for all connections. Most cloud providers enable SSL by default:

  • RDS: SSL is enabled by default; use sslmode=require
  • Cloud SQL: Use the Cloud SQL Auth proxy or SSL certificates
  • Supabase: SSL is enabled by default
  • Self-hosted: Configure ssl = on in postgresql.conf

Common Errors

ErrorCauseFix
Connection refusedWrong host/port or firewall blockingVerify host, port, and that Landed's IPs are allowed
Password authentication failedWrong credentialsDouble-check username and password
Database does not existWrong database nameVerify the database name with \l in psql
Permission denied for schemaMissing grantsRun GRANT USAGE, CREATE ON SCHEMA public TO landed;
SSL connection requiredServer requires SSLEnsure sslmode=require in connection string
Connection timed outNetwork unreachableCheck firewall rules and security groups

What Landed Creates

Landed creates tables in your specified schema with the naming pattern <connector>__<stream> (e.g., stripe__customers, hubspot__contacts). Each table includes metadata columns for sync tracking.