Skip to main content

BYO PostgreSQL

Knocknoc server v8.5+ installs with a local installation of PostgreSQL by default. However, you may bring your own PostgreSQL instance (such as AWS RDS, Azure Database for PostgreSQL or a local cluster) by choosing to enter an alternate database connection string during installation, or by reconfiguring DBURL in the Knocknoc configuration file.

The format of the connection string is:

postgres://[user[:password]@][netloc][:port][/dbname]

Some /opt/knocknoc/etc/server.conf examples:

  • DBURL = "postgres:///knocknoc"
  • DBURL = "postgres://knocknoc:secret@10.0.0.1/knocknoc"
  • DBURL = "postgres://knocknoc:secret@db.example.com/knocknoc"

Note that the user should have owner privileges on the database you have created for Knocknoc.

Connection pool

The default connection pool can be adjusted to suit your environmental needs, by appending pool_max_conns as below.

DBURL = "postgres:///knocknoc?pool_max_conns=50"