Self-host Directus on a VPS
An open-source headless CMS and instant REST/GraphQL API layer over your own database.
levelrail-cli templates deploy directus --name my-directusSpecification
- Status
- Verified on arm64 with image tag 11
- Category
- Developer Tools
- Services
- db, directus, redis
- Ports
- 8055
- Volumes
- 3
- Memory
- about 512 MiB
- arm64
- tested
- amd64
- image published
- Settings to fill in
- none
- License
- Source available, BUSL-1.1
About Directus
An open-source headless CMS and instant REST/GraphQL API layer over your own database. Runs 3 containers (db, directus, redis), with directus listening on port 8055; data is kept in named volumes.
What it deploys
Directus runs as 3 services in a single Compose app, listening on port 8055, with 3 named volume mounts.
| Service | Image | Tag | Ports | Volumes |
|---|---|---|---|---|
| db | postgres | 16-alpine | none | directus_db_data -> /var/lib/postgresql/data |
| directus | directus/directus | 11 | 8055 | directus_uploads -> /directus/uploads |
| redis | redis | 7-alpine | none | directus_redis_data -> /data |
Before you install
- CPU architecture. arm64 listed. Every image lists linux/arm64 in its registry manifest. That is a manifest fact, not proof the app runs on Arm.
- Verified. Verified on arm64 with image tag 11. Verified means our CI ran this exact image version and it answered on its health path. Evidence
- Host ports. It publishes port 8055 directly on the host, so open them in the VPS firewall only if you want that.
Settings and environment
You do not have to fill in anything. 5 secrets are generated at deploy and stored encrypted. Values are never shown here.
| Service | Variable | Value |
|---|---|---|
| db | POSTGRES_DB | Preset by the template |
| db | POSTGRES_PASSWORD | Generated at deploy |
| db | POSTGRES_USER | Preset by the template |
| directus | ADMIN_EMAIL | Preset by the template |
| directus | ADMIN_PASSWORD | Generated at deploy |
| directus | CACHE_ENABLED | Preset by the template |
| directus | CACHE_STORE | Preset by the template |
| directus | DB_CLIENT | Preset by the template |
| directus | DB_DATABASE | Preset by the template |
| directus | DB_HOST | Preset by the template |
| directus | DB_PASSWORD | Generated at deploy |
| directus | DB_PORT | Preset by the template |
| directus | DB_USER | Preset by the template |
| directus | KEY | Generated at deploy |
| directus | REDIS | Preset by the template |
| directus | SECRET | Generated at deploy |
Install Directus on a VPS
-
Install Levelrail on a fresh VPS
Run this as root on a Linux server (amd64 or arm64) with ports 80 and 443 reachable. The installer prints a setup link.
curl -fsSL https://levelrail.com/install.sh | sudo sh -
Sign in
Open the setup link, choose a password, then log the CLI in. The CLI install command is
curl -fsSL https://levelrail.com/install-cli.sh | shif the machine does not have it. See Getting started.levelrail-cli login --device -
Read the template
Shows the entry, including its full compose.yaml.
levelrail-cli templates get directus -
Deploy it
This deploys the template compose file as an app. The app name defaults to the template id; --name sets another.
levelrail-cli templates deploy directus --name my-directus
Without a domain the app gets an sslip.io address. You can also deploy it from the dashboard: Apps, New app, Browse templates, then Directus.
Docs and upstream
More in Developer Tools
- Docker RegistryA private registry for storing and distributing your own container images.
- Docker RegistryThe official open source registry for storing and distributing your own container images.
- Docker Registry (Authenticated)A private container registry with HTTP basic auth baked in at boot, unlike the catalog's open registry entry.
- DatabasusA free, self-hosted backup tool for Postgres, MySQL, and MongoDB databases.
- CyberChefThe cyber swiss army knife: encode, decode, hash, and analyse data in the browser.
- ConvertXA self-hosted file converter that handles well over a thousand image, document, and media formats.