Skip to content

PostgreSQL

PostgreSQL is the most commonly used database engine on Appliku. It is a powerful, open-source relational database well suited for web applications, APIs, and data-heavy workloads.

Supported Versions

Version Notes
PostgreSQL 18 Latest stable release, supports configuration presets
PostgreSQL 17 Previous stable release
PostgreSQL 16 Current LTS-grade option
PostgreSQL 15 Widely deployed
PostgreSQL 12 Legacy support

Tip

If you are starting a new project, choose PostgreSQL 18 for the latest features, performance improvements, and configuration presets. For maximum ecosystem compatibility, PostgreSQL 16 is a safe choice.

Provisioning a PostgreSQL Database

  1. Open your application in the Appliku dashboard
  2. On the Application Overview page, scroll to the Databases block (bottom-right sidebar)
  3. Click Add Database
  4. Select the desired PostgreSQL version from the dropdown
  5. Select the server where the database should run
  6. Click Create

Appliku provisions a PostgreSQL Docker container on the selected server and generates connection credentials automatically.

Connection URLs

Once provisioned, Appliku injects two environment variables into your application:

Variable Description
DATABASE_URL Public connection URL, accessible from outside the server
DATABASE_PRIVATE_URL Private connection URL, for connections within the same server

Use the private URL when your application and database run on the same server for lower latency and no network exposure.

postgresql://user:password@host:port/dbname

Using PostgreSQL with Django

Django applications commonly use dj-database-url or django-environ to parse the DATABASE_URL environment variable.

With dj-database-url:

import dj_database_url

DATABASES = {
    "default": dj_database_url.config(default="sqlite:///db.sqlite3")
}

With django-environ:

import environ

env = environ.Env()

DATABASES = {
    "default": env.db("DATABASE_URL", default="sqlite:///db.sqlite3")
}

No additional configuration is needed -- Appliku handles provisioning the database and injecting the connection string.

Configuration Presets (PostgreSQL 18)

PostgreSQL 18 databases on standalone servers can be tuned from the dashboard, without editing files on the server.

Choosing a preset

When creating a PostgreSQL 18 database, a Configuration dropdown offers three presets. Pick the one matching the resources you can dedicate to the database on the server:

Preset Sized for Key settings
Small (default) ~512 MB RAM 50 connections, 128MB shared_buffers
Medium ~2 GB RAM, 4 vCPU 100 connections, 512MB shared_buffers, parallel workers
Big ~8 GB RAM, 8 vCPU 200 connections, 2GB shared_buffers, more parallel workers

If the selected server has less memory than the preset is tuned for, the form shows a warning -- you can still proceed, but consider a smaller preset or a bigger server.

Changing the configuration later

On the database page, the PostgreSQL Configuration card lets you:

  • Switch between the Small / Medium / Big presets, with a preview of the exact settings
  • Select Custom to edit the full postgresql.conf in the dashboard. The editor is prefilled with the configuration the database currently runs, including any manual edits made on the server

Clicking Save & Apply writes the configuration to the server and restarts the database. Active connections are dropped for a few seconds, and a backup running at that moment will fail (it will succeed on its next scheduled run).

Automatic rollback

If PostgreSQL fails to start with the new configuration (for example, a typo or a memory setting larger than the server can handle), Appliku automatically restores the previous configuration and restarts the database with it. The error is shown in the card and the PostgreSQL output is available in the deployment logs.

Databases created before this feature keep the configuration they were created with (shown as Default), including any manual edits, until you apply a configuration from the dashboard.

Managing Your Database

From the Application Overview page, click Manage in the Databases card to access:

  • Start / Stop / Restart the database container
  • View logs for troubleshooting
  • Schedule backups -- see Database Backups
  • External connections toggle -- control whether the database port is exposed to the internet. See External Connections
  • Delete the database (this permanently destroys all data)

Next Steps