Install Nibleaf on one Linux server
Install the pinned Nibleaf release with the guided installer or Docker Compose, then verify migrations, sign-up, storage, and publishing.
- 4 min read
- Updated
On this page
The guided installer pulls the pinned v0.2.1 linux/amd64 image. It does not
compile Nibleaf on your server. Use a disposable host for the first installation.
The production Compose file has no Qdrant or ClickHouse service; ordinary
published search works without them. Optional features such as workspace AI
keys, Ask AI chat and MCP OAuth stay off until you configure them in their guides.
This tutorial creates a new installation. Preserve existing secrets and data: use backups and upgrades, or the v0.1.2 to v0.2.1 guide, for an existing stack.
Prepare a Linux amd64 (x86_64) server with Docker Engine, Docker Compose v2,
curl, sed, and OpenSSL. You need an interactive SSH terminal and permission
to use Docker. The published release supports linux/amd64 only.
Prepare a dashboard hostname, a separate browser-reachable storage hostname, and a TLS reverse proxy. For email-code sign-in, configure Postmark or SMTP; Google sign-in is the alternative when both Google credentials are configured. Keep space and an off-host destination for database and storage backups.
uname -m
docker --version
docker compose version
curl --version
openssl version
Expect x86_64 from uname -m. Stop if the Docker daemon is on an unsupported
architecture or required tools are missing.
The following command downloads the versioned installer and verifies its SHA-256
hash from release/self-host.json before execution. If the hash differs, the
shell stops; do not bypass it:
set -eu; d=$(mktemp -d); trap 'rm -rf "$d"' EXIT; curl -fsSLo "$d/nibleaf-install.sh" https://github.com/lord007tn/nibleaf/releases/download/v0.2.1/nibleaf-install.sh; actual=$(openssl dgst -sha256 "$d/nibleaf-install.sh"); actual=${actual##* }; [ "$actual" = "b653c9e51106ff0d6778ad65163ebbed08c57c5dbc7c2ac869a31e9c32778032" ] || { echo "Nibleaf installer checksum mismatch" >&2; exit 1; }; sh "$d/nibleaf-install.sh"
The installer asks for public origins and mail settings, generates fresh secrets,
writes a mode-600 .env, verifies the Compose download, and starts the services.
Leave the image tag at v0.2.1 for the pinned release. It refuses an existing
installation or existing Compose volumes. Do not delete those volumes to get past
the check; use the upgrade guide.
The default directory is $PWD/nibleaf. After the installer completes, enter
that directory (use the selected directory if you changed it):
cd nibleaf
It contains docker-compose.yml and .env; subsequent docker compose commands
find the file automatically. Go to verification below.
Use this alternative when you want to edit the environment yourself. Git is
required for this path. Check out the release tag so a moving main does not
supply a different template:
git clone --branch v0.2.1 --depth 1 https://github.com/lord007tn/nibleaf.git
cd nibleaf
cp .env.production.example .env
chmod 600 .env
export COMPOSE_FILE=docker-compose.prod.yml
Edit .env before starting services. Set APP_URL, BETTER_AUTH_SECRET,
POSTGRES_PASSWORD, STORAGE_PUBLIC_ENDPOINT, STORAGE_ACCESS_KEY_ID, and
STORAGE_SECRET_ACCESS_KEY. Set STORAGE_PUBLIC_URL to your public bucket or
asset URL, configure mail, and set an independent INTERNAL_API_SECRET for
trusted client-address forwarding. Replace all example domains. The
configuration guide explains the public/internal
storage distinction and optional settings.
Generate independent secrets on the server; do not reuse example values:
openssl rand -hex 32
openssl rand -base64 24
Then pull and start the release. COMPOSE_FILE above ensures these commands use
the production stack. The one-shot migrate service applies Postgres migrations
before API and worker start:
docker compose pull
docker compose up -d
Run from the deployment directory, in the same shell:
docker compose ps
docker compose logs migrate
docker compose logs --tail=100 server worker app
Expect migrate to finish successfully and long-running services to become
healthy. The worker is unhealthy when mail is required but no mail provider is
configured. API and worker health checks alone do not prove delivery.
Open /sign-up on the APP_URL you configured. Create the first owner, receive
a real sign-in code (or use configured Google sign-in), upload an image, and
publish two pages. Open both pages while signed out, search for the second
page, and verify the image URL. Configure routing to maxio port 9000 for the
storage hostname; only app port 4310 is published by default.
If a service fails, keep .env and volumes intact, read its first error, and use
troubleshooting. Do not rerun the installer to
repair an existing deployment. Before inviting writers, finish the
production checklist and an isolated
backup restore.