Skip to main 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

VersionNotes
PostgreSQL 17Latest stable release
PostgreSQL 16Current LTS-grade option
PostgreSQL 15Widely deployed
PostgreSQL 12Legacy support
tip

If you are starting a new project, choose PostgreSQL 17 for the latest features and performance improvements. 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:

VariableDescription
DATABASE_URLPublic connection URL, accessible from outside the server
DATABASE_PRIVATE_URLPrivate 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.

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
  • Delete the database (this permanently destroys all data)

Next Steps