Skip to content
Menu

Install Florabase

Florabase is installed with one directly usable compose.yaml file and three published linux/amd64 non-root container images (ghcr.io/alessandrorossato/florabase-*). No .env file is required, no container runs as root, and building from source is for development only.

  • linux/amd64 Docker host with Docker Engine 24+ and Docker Compose 2.20+ (other CPU architectures such as arm64 are not built in v1.0.0).
  • Compose manager or CLI: Docker CLI (docker compose), Dockhand, or Synology Container Manager.
  • Two separate local host folders inside a mounted volume (never at the volume mountpoint itself): one for data and one for backups.
  • Dedicated HTTPS hostname served at the root path / via a reverse proxy or Tailscale Serve (subpath hosting is not supported).
  • Pull access to GHCR (ghcr.io/alessandrorossato/florabase-*) and private off-host storage for encrypted backups.
Service Container (UID:GID) Role
db florabase-db (70:70) PostgreSQL 18 (florabase-postgres:latest). Refuses placeholder passwords, validates folder ownership/modes and cluster identity before starting, pins session timezone to UTC.
backend florabase-backend (10001:10001) Runs florabase-start: validates mount separation, runs guarded initialization or verified pre-upgrade dump + migration, creates optional first owner, scrubs owner variables, then execs the API server.
frontend florabase-frontend (101:101) Static web app + reverse proxy to backend. Publishes the only host port on 127.0.0.1:8080.

Step 1: Create the host folders and set owners once

Section titled “Step 1: Create the host folders and set owners once”

Run this block as root (or with sudo) on the Docker host before your first deploy. Adjust DATA and BACKUP to real paths inside a local ext4/Btrfs volume. If any folder is missing or has the wrong owner/mode, db and backend refuse to start instead of silently creating an empty database on the wrong disk.

Terminal window
DATA=/srv/florabase/data
BACKUP=/srv/florabase/backup
mkdir -p "$DATA/postgres" "$DATA/media" "$DATA/state" "$BACKUP/pre-upgrade"
chmod a+rx "$DATA" && chmod a+x "$BACKUP"
chown 70:70 "$DATA/postgres" && chmod 0700 "$DATA/postgres"
chown 10001:10001 "$DATA/media" "$DATA/state" "$BACKUP/pre-upgrade"
chmod 0700 "$DATA/media" "$BACKUP/pre-upgrade" && chmod 0755 "$DATA/state"

Download compose.yaml directly from the latest release tag on GitHub (example using a pinned tag):

Terminal window
TAG=v1.0.0
curl -fsSLO "https://raw.githubusercontent.com/alessandrorossato/florabase/${TAG}/compose.yaml"

Generate a strong database password:

Terminal window
openssl rand -hex 32

Edit these fields directly in compose.yaml (or inside Dockhand / Container Manager):

Field Required Meaning
Host bind paths (left side of :) Yes Absolute host paths for DATA (identical on db and backend) and separate BACKUP (on backend). Change only the left side of each mount.
FLORABASE_DB_PASSWORD Yes PostgreSQL password — must match identically in db and backend. Both refuse to start while it is change-me.
FLORABASE_CANONICAL_ORIGIN Yes Your exact HTTPS origin (e.g. https://florabase.example.com) with no trailing slash or path. Refuses the default placeholder https://florabase.example.org.
frontend port No Loopback binding, default 127.0.0.1:8080:8080. Keep the 127.0.0.1: prefix.
TZ No IANA timezone for container logs (release compose.yaml defaults to Europe/Rome; change to UTC or your local timezone). Database storage and sessions always stay in UTC.
FLORABASE_OWNER_LOGIN First run only Uncomment to create the initial owner (3–64 lowercase letters, digits, ., _, -).
FLORABASE_OWNER_PASSWORD First run only Uncomment to set the initial owner password (at least 12 characters).
Terminal window
docker compose --project-name florabase up -d --wait

On first start, db creates the PostgreSQL cluster, backend initializes the schema, writes state/installation.env, creates the initial owner (if configured), and starts serving.

  • Did not set FLORABASE_OWNER_*? The stack still starts cleanly; create the owner offline via:
    Terminal window
    docker compose --project-name florabase run --rm --no-deps backend \
    python -m florabase.auth.bootstrap owner
  • Docker Engine 24 note: Engine 24 ignores start-interval, so a cold start can take up to 30 seconds per service in the db → backend → frontend chain. Engine 25+ starts in a few seconds.

Florabase only listens on 127.0.0.1:8080. Put it behind an HTTPS reverse proxy or Tailscale Serve before signing in:

After your first sign-in:

  1. Remove FLORABASE_OWNER_LOGIN and FLORABASE_OWNER_PASSWORD from compose.yaml (and your Compose manager UI) and redeploy so credentials do not remain in docker inspect or manager exports.
  2. Change your owner password from Settings → Account.
  3. Set up scheduled Backup, Restore & Upgrades.