Skip to main content

PostgreSQL

What it is

A PostgreSQL connection lets SQL nodes run queries and statements against one database. Nodes reference the connection by name; the password itself is written to Honeybase's secret store at setup and is never returned by the API afterwards.

Before you start

  • The server must accept connections from Honeybase's egress addresses. If it sits in a private network, you will need the SSH tunnel described below rather than a direct connection.
  • Decide which database this connection is for. A connection targets exactly one.

Setup fields

These are the fields the guided setup collects — both the Add integration form and the setup card Barry raises in chat. Additional settings live on the connection's settings page once it exists.

Connection settings

FieldTypeRequiredSecretNotes
nameTextYesNoDisplay name for this connection. This is what you pick from in a workflow node.
hostTextYesNoHostname or IP address of the server, reachable from Honeybase.
portNumberYesNoTCP port. PostgreSQL listens on 5432 by default.
databaseTextYesNoThe single database this connection targets. One connection is one database.
usernameTextYesNoThe PostgreSQL role Honeybase authenticates as.
sslToggleNoNoRequire TLS for the connection. Leave this on unless the server genuinely has no TLS.

Credentials

FieldTypeRequiredSecretNotes
passwordPasswordYesYesThe password for that role. Create a dedicated role for Honeybase rather than reusing an application account.
Configured after the connection exists

The guided setup does not ask for SSH tunnel, read-only mode, connection pool size, connection lifetime or query timeout. Open the connection on the Integrations page to change them.

Creating a role for Honeybase

Give Honeybase its own role, scoped to what the workflows actually need, rather than reusing an application account. A read-only reporting connection, for example:

CREATE ROLE honeybase LOGIN PASSWORD 'a-strong-generated-password';
GRANT CONNECT ON DATABASE analytics TO honeybase;
GRANT USAGE ON SCHEMA public TO honeybase;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO honeybase;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO honeybase;

Grant INSERT, UPDATE or DELETE only on the specific tables a workflow writes to.

Read-only mode and the SSH tunnel

Two settings on the connection's page are worth knowing about before you debug a failure:

Read-only mode wraps every statement in a read-only transaction. A node that tries to write against a read-only connection fails with cannot execute INSERT in a read-only transaction — which reads like a database problem but is a Honeybase setting.

SSH tunnel connects through a bastion host instead of directly. Turning it on reveals the public key to install on the bastion and the Honeybase IP ranges to allow through.