
Self-hosting Directus the easy way
Yulei ChenDirectus is an open-source headless CMS that wraps any SQL database with a dynamic REST and GraphQL API. It gives you a beautiful admin panel to manage your content, users, and permissions — no coding required. Directus Cloud starts at $99/month, and the free tier is limited to a single user. If you need more flexibility without the price tag, self-hosting is the way to go.
Sliplane is a managed container platform that makes self-hosting painless. You can get Directus running in minutes with one-click deployment — no SSH, no reverse proxy config, no infrastructure to maintain.
If you'd rather go the manual route, check out self-hosting Directus with Docker on a Ubuntu server — it walks through the full Docker + Caddy setup step by step.
Prerequisites
Before deploying, ensure you have a Sliplane account (free trial available).
Quick start
Sliplane provides one-click deployment with presets.
- Click the deploy button above
- Select a project
- Select a server. If you just signed up you get a 48-hour free trial server
- Click Deploy!
That's it! Once the service is healthy, open the domain Sliplane provides (e.g. directus-xxxx.sliplane.app) and log in with the ADMIN_EMAIL and ADMIN_PASSWORD from your service's environment variables.
About the preset
The Directus preset deploys a single service with everything you need:
- Directus 11.17.2 — the main app with REST and GraphQL APIs, plus the admin panel
- SQLite database — embedded database that stores data in a file on the volume, no separate database service needed
- WebSockets enabled — real-time updates out of the box
- Persistent volumes — database, uploads, extensions, and templates all survive redeployments
The KEY and SECRET environment variables are used for signing tokens and encrypting data. The preset generates strong random values for these automatically.
Next steps
Once Directus is running on Sliplane, use the domain Sliplane provides (e.g. directus-xxxx.sliplane.app). From there you can sign in, tune environment variables, and adjust logging to match your project.
Default credentials
Log in at https://your-directus-domain.sliplane.app/admin with the email and password you configured in ADMIN_EMAIL and ADMIN_PASSWORD.
Key environment variables
Directus is highly configurable through environment variables. Here are some you might want to customize:
| Variable | Description | Default |
|---|---|---|
PUBLIC_URL | The public-facing URL of your instance | Auto-detected |
CACHE_ENABLED | Enable response caching | false |
CACHE_AUTO_PURGE | Automatically clear cache on content changes | false |
CACHE_STORE | Cache backend (memory, redis) | memory |
RATE_LIMITER_ENABLED | Enable rate limiting | false |
MAX_PAYLOAD_SIZE | Max upload size | 1mb |
FILES_MAX_UPLOAD_SIZE | Max file upload size | Unlimited |
For the full list, check the Directus environment variables docs.
Logging
By default, Directus logs to STDOUT, which works perfectly with Sliplane's built-in log viewer. You can control the log level with the LOG_LEVEL environment variable:
| Value | Description |
|---|---|
trace | Most verbose |
debug | Debugging info |
info | Default level |
warn | Warnings only |
error | Errors only |
fatal | Critical failures only |
For general Docker logging tips, check out our post on how to use Docker logs.
Troubleshooting
If Directus fails to start, check the logs in Sliplane's log viewer. Common issues:
- Admin login not loading — give it a minute after the first deploy, Directus needs to initialize the SQLite database and create the admin user
- Permission errors on volumes — Directus runs as a non-root user inside the container; make sure volumes are properly mounted
- Missing environment variables — ensure
KEY,SECRET,ADMIN_EMAIL, andADMIN_PASSWORDare all set
Cost comparison
| Provider | vCPU Cores | RAM | Disk | Estimated Monthly Cost | Notes |
|---|---|---|---|---|---|
| Sliplane | 2 | 2 GB | 40 GB | €9 | charge per server |
| Directus Cloud | — | — | — | $99+ | Managed, starts at 1 user |
| Render | 1 | 2 GB | 40 GB | ~$35–$45 | VM Small |
| Fly.io | 2 | 2 GB | 40 GB | ~$20–$25 | VM + volumes |
| Railway | 2 | 2 GB | 40 GB | ~$15–$66 | Usage-based |
FAQ
Here are answers to questions that often come up when self-hosting Directus on Sliplane.
What can I build with Directus?
Directus works as a backend for websites, mobile apps, IoT dashboards, internal tools — anything that needs structured content. It turns your database into a full API with an admin panel, so you can manage content without writing backend code. You can also use it as a traditional headless CMS for blogs, landing pages, or e-commerce.
How do I enable caching?
Add these environment variables to your Directus service on Sliplane:
CACHE_ENABLED=true
CACHE_AUTO_PURGE=true
This enables in-memory response caching, which can significantly speed up read-heavy workloads. For more advanced setups, you can deploy a separate Redis service and set CACHE_STORE=redis with a REDIS connection string.
How do I update Directus?
Change the image tag in your Directus service settings on Sliplane (e.g. from directus/directus:11.17.2 to a newer version) and redeploy. Check Docker Hub for the latest stable version. Always read the release notes before upgrading, as major versions may include breaking changes or required database migrations.
How does Directus compare to other headless CMS options?
Payload CMS is a code-first alternative if you prefer TypeScript-based schema definitions. Ghost is great if you specifically need a publishing platform. Directus stands out because it works with any existing SQL database and doesn't require you to define schemas in code — everything is managed through the admin UI.
Can I use Directus with an existing database?
Yes! This is one of Directus's strongest features. It can introspect an existing PostgreSQL, MySQL, SQLite, MS SQL, or Oracle database and automatically generate APIs and an admin panel for it. Just point the DB_* environment variables at your existing database.