Self-hosting · Draft
External database
Draft. This page is written from the product plan and has not been checked against a release.
This is an advanced option. The installer’s prompts do not offer it. Use it if you already run Postgres, or want a managed one with point-in-time recovery.
Requirements #
- Postgres 14 or newer.
- An empty database owned by the app’s role. The first migration runs
create extension if not exists citext, which is a trusted extension, so the owner can create it without superuser rights. - A connection the Docker network can reach. For Postgres on the same host, use
host.docker.internalas the host and allow the Docker networks inpg_hba.conf.
Install with it #
curl -fsSL https://get.eddyline.app | sh -s -- --database-url 'postgres://user:pass@host:5432/db?sslmode=require'
The URL goes into .env only and is never echoed or logged. Percent-encode any @, / or : in the password. The installer says so if the URL does not parse.
Before it writes anything, the installer connects through a one-off container and checks that it can connect, that the server is version 14 or newer, that citext exists or the role can create it, and that the database has no tables or only tables from an earlier Eddyline install. Anything else stops the install with a plain message. A database that belongs to another app is never migrated.
What is different #
.envsetsDB_MODE=external. There is no bundled database container and no database password to manage.- Migrations run when the app starts, under a lock. Set
MIGRATE_ON_START=falseif you prefer to run them by hand. - Backups and restores use a one-off client container that matches your server’s major version. Restore needs a role that owns the schema, and never drops or creates the database. See backups.
eddy uninstall --purgenever touches an external database. It says so and prints the database host.
Switching between bundled and external #
Switching is a restore:
- Run
eddy backup. - Run
eddy configand changeDATABASE_URL,DB_MODEandCOMPOSE_FILE. - Run
eddy restorewith the file from step 1.
There is no switch command.