Skip to content

Installing and Configuring pgEdge ColdFront

This guide describes installing and configuring pgEdge ColdFront on a Debian or Ubuntu system with DEB packages from the pgedge repository. ColdFront keeps tables in PostgreSQL and stores cold data in Apache Iceberg tables in an object store; the Lakekeeper Iceberg REST catalog tracks those tables. The installation covers pgEdge Enterprise Postgres, the ColdFront packages, and Lakekeeper.

Warning

ColdFront is beta software under active development. Do not use ColdFront in production; interfaces, on-disk formats, and behavior may change without notice, and data loss is possible.

The ColdFront packages support PostgreSQL 16, 17, and 18. The examples in this guide use PostgreSQL 18; for another major version, replace 18 in each package name, path, and service name with that version.

Before you start, ensure that:

  • the host runs Debian 12 or 13, or Ubuntu 22.04 LTS or 24.04 LTS, on an amd64 or arm64 processor.
  • you have root or sudo access on the host.
  • the host has network access to the pgedge repository.

Configuring the pgEdge Repository

The ColdFront packages come from the pgedge repository, which requires an access certificate from pgEdge. Follow the steps in Configuring the Repository to install the prerequisites, create the repository, and register your certificate. If the host already uses the pgedge repository, continue with the next section.

Installing pgEdge Enterprise Postgres

If the host already runs pgEdge Enterprise Postgres, continue with Installing the ColdFront Packages.

Use the following steps to install pgEdge Enterprise Postgres and start the server:

  1. Install pgEdge Enterprise Postgres, and then list the database clusters on the host:

    sudo apt update
    sudo apt install -y pgedge-enterprise-postgres-18
    sudo pg_lsclusters
    
  2. If the pg_lsclusters command lists no 18/main cluster, use the following command to create and start the cluster:

    sudo pg_createcluster 18 main --start
    

    Hint

    If the host already runs another PostgreSQL cluster on port 5432, pg_createcluster assigns the next free port to 18/main, and a psql command without a cluster option connects to the other cluster. In that case, add --cluster 18/main to each psql command in this guide, and use the port that sudo pg_lsclusters shows for 18/main in the Lakekeeper connection string and in the coldfront.local_pg_dsn setting (as port=<port>).

  3. Confirm that the server is running before you continue. The following command displays the PostgreSQL version:

    sudo -u postgres psql -c "SELECT version();"
    

    Hint

    A connection error means that the server is not running; use the sudo pg_lsclusters command to check the state of the cluster.

The Installing Postgres guide describes the pgEdge Enterprise Postgres packages and the locations of the installed files.

Installing the ColdFront Packages

pgEdge distributes ColdFront in three packages. The following table describes the packages and the files that each package installs:

Package Description
pgedge-postgresql-18-coldfront The coldfront PostgreSQL extension for PostgreSQL 18. The package depends on pgedge-postgresql-18-pg-duckdb and pgedge-coldfront-duckdb-extensions, so the package manager installs pg_duckdb and the patched DuckDB extensions in /usr/lib/pgedge/coldfront/duckdb-extensions as well.
pgedge-coldfront The archiver, partitioner, and compactor command-line tools in /usr/bin, which work with every supported PostgreSQL version. The package also creates a coldfront system user and installs an example deployment file in /usr/share/doc/pgedge-coldfront/examples.
pgedge-lakekeeper The Lakekeeper Iceberg REST catalog in /usr/bin/lakekeeper, a lakekeeper system user, a lakekeeper systemd service, and the /etc/lakekeeper/lakekeeper.env environment file.

Use the following steps to install the ColdFront packages:

  1. Install the ColdFront extension package for your PostgreSQL major version. The following command installs the package for PostgreSQL 18:

    sudo apt install -y pgedge-postgresql-18-coldfront
    
  2. Install the ColdFront command-line tools and Lakekeeper with the following command:

    sudo apt install -y pgedge-coldfront pgedge-lakekeeper
    

Hint

The pg_duckdb and DuckDB extension packages contain patched builds rather than the upstream releases; the builds include ColdFront's patches to duckdb-iceberg, pg_duckdb, and DuckDB. The Understanding ColdFront's DuckDB Stack section of the ColdFront documentation describes each patch.

The pgedge-lakekeeper package installs Lakekeeper but does not configure or start the service; you configure and start Lakekeeper in Installing and Configuring Lakekeeper.

Configuring PostgreSQL for ColdFront

The ColdFront packages do not configure PostgreSQL. The Configuring PostgreSQL section of the ColdFront documentation describes each setting that the following steps use, along with the optional tuning settings.

Use the following steps to configure PostgreSQL and create the extensions:

  1. Add the following settings to the postgresql.conf file in the /etc/postgresql/18/main/ directory:

    shared_preload_libraries = 'pg_duckdb,coldfront'
    duckdb.extension_directory = '/usr/lib/pgedge/coldfront/duckdb-extensions'
    duckdb.allow_unsigned_extensions = true
    duckdb.autoinstall_known_extensions = false
    duckdb.postgres_role = 'coldfront_duckdb'
    coldfront.iceberg_async_parquet = on
    coldfront.iceberg_bakery_patch = on
    coldfront.warehouse = '<warehouse-name>'
    coldfront.lakekeeper_endpoint = 'http://<lakekeeper-host>:8181/catalog'
    coldfront.local_pg_dsn = 'host=/var/run/postgresql dbname=<db> user=<role>'
    

    If shared_preload_libraries already lists libraries, such as pg_stat_statements, add pg_duckdb and coldfront to the existing list instead of replacing it.

    Replace the placeholders as follows:

    • <warehouse-name> is the name of the Lakekeeper warehouse that you create when you bootstrap Lakekeeper; the ColdFront examples use wh.
    • <lakekeeper-host> is the host that runs Lakekeeper; use localhost when Lakekeeper runs on the same host.
    • <db> and <role> are the database and the role that DuckDB uses to read PostgreSQL tables on this server.
  2. Restart PostgreSQL. The CREATE EXTENSION coldfront command fails on a server that does not preload the extension:

    sudo systemctl restart postgresql@18-main
    
  3. Connect as the postgres superuser with sudo -u postgres psql, create the role that duckdb.postgres_role names, and create the extensions:

    CREATE ROLE coldfront_duckdb NOLOGIN;
    CREATE EXTENSION pg_duckdb;
    CREATE EXTENSION coldfront;
    

    You create the role once for the PostgreSQL server. Run the CREATE EXTENSION commands in each database that uses ColdFront.

Installing and Configuring Lakekeeper

The pgedge-lakekeeper package installs the lakekeeper binary, a lakekeeper system user, and a lakekeeper systemd service, but the package does not configure, enable, or start the service. Lakekeeper stores its catalog in a PostgreSQL 15 or later database and reads its settings from /etc/lakekeeper/lakekeeper.env. The installed environment file contains each setting as a comment; uncomment each setting that you change.

Use the following steps to install, configure, and start Lakekeeper:

  1. If you did not install the pgedge-lakekeeper package with the ColdFront packages, install the package now with the following command:

    sudo apt install -y pgedge-lakekeeper
    
  2. Connect as a PostgreSQL superuser, such as postgres (for example, with sudo -u postgres psql), and create a role and a database for the catalog. Replace <password> with a generated password, such as the output of openssl rand -hex 32; a hex value needs no escaping in the connection string in step 3:

    CREATE ROLE lakekeeper LOGIN PASSWORD '<password>';
    CREATE DATABASE lakekeeper OWNER lakekeeper;
    

    Hint

    The migration in step 4 creates the uuid-ossp, pgcrypto, pg_trgm, btree_gin, and btree_gist extensions. Either allow the lakekeeper role to run CREATE EXTENSION, or create the extensions as a superuser before you run the migration.

  3. In /etc/lakekeeper/lakekeeper.env, set the catalog database's connection string and an encryption key:

    LAKEKEEPER__PG_DATABASE_URL_WRITE=postgresql://lakekeeper:<password>@127.0.0.1:5432/lakekeeper
    LAKEKEEPER__PG_ENCRYPTION_KEY=<encryption-key>
    

    Before you save the file, make the following changes:

    • Replace <password> with the password from step 2, and adjust the host and port if the catalog database is on another server.
    • Replace <encryption-key> with a random secret, such as the output of openssl rand -base64 32. Lakekeeper encrypts stored credentials with the key, so keep the key stable and backed up. Every node that shares the catalog needs the same key.
  4. Run the one-time database migration as the lakekeeper user. The command reads the environment file as that user, because the file is not readable by other accounts:

    sudo -u lakekeeper sh -c \
      'set -a; . /etc/lakekeeper/lakekeeper.env; set +a; exec /usr/bin/lakekeeper migrate'
    
  5. Secure the listener before you start the service. By default, Lakekeeper listens on port 8181 on every address and, with no authorization backend, accepts every request. Do not start Lakekeeper with the default settings; instead, choose one of the following options:

    • If every client runs on the same host, add the following setting to /etc/lakekeeper/lakekeeper.env:

      LAKEKEEPER__BIND_IP=127.0.0.1
      
    • If clients connect from other hosts, configure authentication and an enforcing authorization backend, and limit access to port 8181 with a firewall.

  6. Enable and start the service with the following command:

    sudo systemctl enable --now lakekeeper
    

Completing the ColdFront Configuration

The rest of the ColdFront installation applies to each installation method; consult the ColdFront documentation for details. Use the following steps to finish the configuration:

  1. Bootstrap Lakekeeper as described in Bootstrapping Lakekeeper. For the SeaweedFS store, the same section creates the warehouse and the namespace. The warehouse name must match the coldfront.warehouse setting.

  2. For any other object store, create the warehouse, the namespace, and the credential as described in your backend's section of Configuring your Object Store.

  3. Store the object store credential in each database that uses ColdFront, and grant access to application roles, as described in Configuring PostgreSQL for Lakekeeper.

  4. Write ColdFront's table configuration with the archiver register or archiver import command, as described in Writing ColdFront's Configuration. An import also writes the object store credential from the deployment file. The pgedge-coldfront package installs an example deployment file. Use the following command to copy the example to the current directory:

    cp /usr/share/doc/pgedge-coldfront/examples/config.example.yaml deploy.yaml
    

    Edit the copy for your deployment, and then use the following command to import the configuration:

    archiver import --config deploy.yaml
    

    A system configured to skip package documentation does not install the example file. The ColdFront repository includes the same config.example.yaml file.

For detailed information about using ColdFront, see Using ColdFront.