Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sovereign, high-performance data protection

PostgreSQL

KMS connecting to a dedicated PostgreSQL database and user

[db]
database_type = "postgresql"
database_url = "postgres://kms_user:kms_password@pgsql-server:5432/kms"

Setting up a PostgreSQL database

Before running the server, a dedicated database with a dedicated user should be created on the PostgreSQL instance. These sample instructions create a database called kms owned by a user kms_user with password kms_password:

  1. Connect to psql under user postgres

    sudo -u postgres psql  # or `psql -U postgres`
    
  2. Create user kms_user with password kms_password

    create user kms_user with encrypted password 'kms_password';
    
  3. Create database kms under owner kms_user

    create database kms owner=kms_user;
    

See also