

How to deploy Directus: step-by-step deployment guide
If you’re looking for a powerful and open-source platform to manage your data and content, Directus is one of the best options available. It wraps any SQL database with a dynamic API and an intuitive admin app ideal for teams building headless CMS, internal tools, or data-driven applications.
With Northflank, you can deploy Directus in minutes using a one-click template or set it up manually. Northflank handles scaling, networking, and infrastructure, allowing you to focus on your content and API design.
Before you begin, create a Northflank account.
- Deploying Directus with a one-click template on Northflank
- Deploying Directus manually on Northflank
What is Northflank?
Northflank is a modern developer platform that makes it easy to build, deploy, and scale applications, databases, jobs, and GPU workloads. It abstracts away Kubernetes complexity with smart defaults, giving you production-ready deployments while still allowing advanced customization.
You can launch Directus on Northflank in just a few minutes using the ready-made template. This option is ideal if you want to quickly spin it up or demo it without performing a manual setup.

The Directus deployment on Northflank includes:
- 1 PostgreSQL addon for data storage
- 1 Redis addon for caching and session management
- 1 MinIO addon for file and media storage (S3-compatible)
- 1 Secret group for managing environment variables and credentials
- 1 Directus service deployed from the official Docker image:
directus/directus:11.7.2
- Visit the Directus template on Northflank.
- Click Deploy.
- Northflank will automatically:
- Create a project, database, Redis, MinIO, and the Directus deployment
- Link all required credentials to your secret group
- Expose a public URL for your Directus dashboard
- Once the deployment completes, open the generated public URL to access the Directus Admin UI.
- Log in using the credentials you set in the template arguments (
ADMIN_EMAILandADMIN_PASSWORD).
If you want more flexibility or need to customize your setup, you can deploy Directus manually. This approach provides complete control over configuration and integration.
Note: You can also customise Northflank's one-click deploy templates.
Log in to your Northflank dashboard, click the “Create new” button (+ icon) in the top right corner of your dashboard. Then, select “Project” from the dropdown.

Projects serve as workspaces that group together related services, making it easier to manage multiple workloads and their associated resources.
You’ll need to fill out a few details before moving forward.
-
Enter a project name, such as
directus-projectand optionally pick a color for quick identification in your dashboard. -
Select Northflank Cloud as the deployment target. This uses Northflank’s fully managed infrastructure, so you do not need to worry about Kubernetes setup or scaling.
(Optional) If you prefer to run on your own infrastructure, you can select Bring Your Own Cloud and connect AWS, GCP, Azure, or on-prem resources.
-
Choose a region closest to your users to minimize latency for calendar syncing and video calls.
-
Click Create project to finalize the setup.

Inside your project, go to the Addons tab at the top menu and click "Create new addon". Then, select PostgreSQL as the Addon type, give it a descriptive name such as directus-db, select your prefered version, and choose a compute plan size.
- If you’re just testing or experimenting, the smallest option is cost-effective and sufficient.
- For production, we recommend starting with
nf-compute-50. This provides more resources and stability, ensuring Directus runs reliably under real workloads.
Once you’ve configured the settings, click Create addon to provision your database.

Next, you’ll need a Redis instance for caching and session management.
- Go to the Addons tab again and click Create new addon.
- Select Redis as the Addon type.
- Give it a name like
directus-rd. - Choose a version (the default latest version is recommended) and a compute plan.
- Click Create addon to provision your Redis service.
Redis helps Directus store sessions, authentication tokens, and caching data efficiently.

If you want to manage file and media uploads within Directus, you can use MinIO an S3-compatible object storage.
- Navigate again to Addons → Create new addon.
- Select MinIO as the Addon type.
- Name it
directus-s3and select your preferred plan. - Click Create addon to launch it.
Once it’s ready, you can connect it to Directus by setting the S3-related environment variables during service setup.

Next, go to the Secrets tab and click Create Secret Group. Name it something easy to recognize, such as directus-secrets. This group will hold all the environment variables required by Directus. You can find the full list of supported variables in the Directus documentation.

If you don't want to go through the stress of manually configuring or searching for environment variables to use, you can use the already configured ones below:
DB_CLIENT="pg"
ADMIN_EMAIL={Update this}
ADMIN_PASSWORD={Update this}
SECRET=${fn.randomSecret(32)}
CACHE_ENABLED=true
CACHE_STORE="redis"
STORAGE_S3_DRIVER="s3"
STORAGE_S3_BUCKET="directus-uploads"
STORAGE_S3_REGION="us-east-1"
STORAGE_S3_FORCE_PATH_STYLE=true
DB_SSL__REJECT_UNAUTHORIZED=false
WEBSOCKETS_ENABLED=true
REDIS_ENABLED=true
CORS_ENABLED=true
CORS_ORIGIN="https://${refs.directus-server.ports.0.dns}"
CORS_CREDENTIALS=true
REFRESH_TOKEN_TTL="7d"
REFRESH_TOKEN_COOKIE_SECURE=true
REFRESH_TOKEN_COOKIE_SAME_SITE="None"
SESSION_COOKIE_SECURE=true
SESSION_COOKIE_SAME_SITE="None"
SESSION_COOKIE_TTL="1d"
IP_TRUST_PROXY=true
Notes about these values:
ADMIN_EMAILandADMIN_PASSWORDare your Directus admin credentials. Update them before deployment to secure your instance.SECRETis automatically generated usingfn.randomSecret(32)— this ensures a strong, unique key for session and token encryption.DB_CLIENT="pg"tells Directus to use PostgreSQL as the database driver, matching the addon created in your Northflank project.CACHE_ENABLEDandCACHE_STORE="redis"enable caching and session management through the Redis addon.- The
STORAGE_S3_*variables configure Directus to use MinIO as S3-compatible storage for file uploads and media. DB_SSL__REJECT_UNAUTHORIZED=falseallows SSL connections to the PostgreSQL database, even if the certificate is self-signed.WEBSOCKETS_ENABLED=trueactivates real-time features like live updates in the Directus Admin UI.CORS_*settings ensure secure cross-origin communication between your dashboard and API by automatically referencing your Northflank service domain.REFRESH_TOKEN_*andSESSION_COOKIE_*settings handle secure authentication and session persistence across browser sessions.IP_TRUST_PROXY=trueis necessary when running behind a reverse proxy, which Northflank uses to route traffic.
Link the PostgreSQL, Redis, and MinIO addons to your secret group
Northflank addons like PostgreSQL, Redis, and MinIO expose connection details such as username, password, host, and ports.
Instead of copying these values manually into your secrets, you can link each addon directly to your secret group.
This way, whenever credentials are rotated, your Directus service automatically receives the updated values.
Under the Linked addons section:
-
For PostgreSQL, click Configure and map the following
USERNAME→DB_USERPASSWORD→DB_PASSWORDDATABASE→DB_DATABASEHOST→DB_HOSTPORT→DB_PORT
-
For Redis, link
REDIS_MASTER_URL→REDIS
-
For MinIO, link
ACCESS_KEY→STORAGE_S3_KEYSECRET_KEY→STORAGE_S3_SECRETMINIO_NDPOINT→STORAGE_S3_ENDPOINT
Finally, click Create secret group to save everything.
Within your project, navigate to the Services tab in the top menu and click “Create New Service.” Select Deployment and give your service a name such as directus-server.
For the deployment source, choose External image and enter the official Directus Docker image: directus/directus:11.7.2

Select compute resources
Choose the compute size that best matches your workload:
- Small plans are fine for testing or lightweight usage.
- Larger plans are recommended for production, as Directus can be resource-intensive under real-world traffic.
The flexibility to adjust resources later means you can start small and scale up as your usage grows.

Set up a port so your app is accessible:
- Port:
8055 - Protocol:
HTTP - Public access: enable this to let people access your Directus instance from the internet
Northflank will automatically generate a secure, unique public URL for your service. This saves you from having to manage DNS or SSL certificates manually.

Deploy your service
When you’re satisfied with your settings, click “Create service.” Northflank will pull the image, provision resources, and deploy Label Studio.
Once the deployment is successful, you’ll see your service’s public URL at the top right corner, e.g.: p01--directus-server--lppg6t2b6kzf.code.run

Deploying Directus on Northflank gives you a production-ready way to manage data and content without worrying about infrastructure.
Whether you use the one-click template for speed or set it up manually for full control, Northflank handles scaling, storage, and networking so you can focus on building great digital experiences.
This setup is ideal for teams, startups, or organizations that need a flexible, secure, and scalable headless CMS platform with minimal operational overhead.