Self-host Strapi with Levelrail
VerifiedAn open-source headless CMS with a customizable admin panel and a REST/GraphQL content API.
- Memory512 MiB
- Archarm64
- Services2
How to self-host Strapi
-
Pull the images
2 images are pulled on your server.
Show images
postgres:16-alpineelestio/strapi-production:v5.33.4
-
Create the app
2 services start in a single Compose app, with 2 named volume mounts for your data, on port 1337.
-
Fill in the secrets
5 secrets are generated and stored encrypted, 8 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
Strapi requirements
- Memory
- About 512 MiB
- Architectures
- amd64 image published, arm64 tested
- Ports
- 1337
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- not yet recorded
- Verified. Verified on arm64 with image tag v5.33.4. Our CI ran this exact image version and it answered on its health path. Evidence
- Host ports. It publishes port 1337 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Strapi. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Strapi docs page.
Deploy Strapi your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Strapi from the CLI
levelrail-cli templates deploy strapi --name my-strapi Deploy Strapi with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/strapi/deploy Strapi configuration
Strapi services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| db | postgres:16-alpine | none | strapi_db_data -> /var/lib/postgresql/data |
| strapi | elestio/strapi-production:v5.33.4 | 1337 | strapi_uploads -> /opt/app/public/uploads |
Strapi environment variables
| Variable | Service | Value |
|---|---|---|
| POSTGRES_DB | db | Preset by the template |
| POSTGRES_PASSWORD | db | Generated at deploy |
| POSTGRES_USER | db | Preset by the template |
| ADMIN_JWT_SECRET | strapi | Generated at deploy |
| APP_KEYS | strapi | Generated at deploy |
| DATABASE_CLIENT | strapi | Preset by the template |
| DATABASE_HOST | strapi | Preset by the template |
| DATABASE_NAME | strapi | Preset by the template |
Show all 13 variables
- DATABASE_PASSWORDstrapiGenerated at deploy
- DATABASE_PORTstrapiPreset by the template
- DATABASE_USERNAMEstrapiPreset by the template
- JWT_SECRETstrapiGenerated at deploy
- NODE_ENVstrapiPreset by the template
Ports and volumes
- Ports
- 1337
- Volumes
- 2 named mounts: strapi_db_data -> /var/lib/postgresql/data, strapi_uploads -> /opt/app/public/uploads
Strapi FAQ
How much memory does Strapi need?
The catalog lists about 512 MiB of memory for Strapi across its 2 services.
Does Strapi run on arm64?
For Strapi, arm64 is tested; amd64 is image published.
Does Strapi need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which database does Strapi bundle?
The template includes Postgres, running as its own service.
Which ports does Strapi use?
Strapi listens on port 1337 inside the stack.
Where does Strapi keep its data?
In named volumes: strapi_db_data mounted at /var/lib/postgresql/data and strapi_uploads mounted at /opt/app/public/uploads.
Can I deploy Strapi on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id strapi for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, elestio/strapi-production:v5.33.4 is what you deploy there.