---
title: "Deploy Directus on StackBlaze"
description: "Deploy Directus with managed Postgres, Valkey for caching and realtime, email for invites and password resets, and volumes for uploads and extensions. Model your content in the Data Studio and read it from the REST or GraphQL API on your own HTTPS URL."
category: "cms, database, api"
url: https://www.stackblaze.com/templates/directus
---

# Deploy Directus

Deploy Directus with managed Postgres, Valkey for caching and realtime, email for invites and password resets, and volumes for uploads and extensions. Model your content in the Data Studio and read it from the REST or GraphQL API on your own HTTPS URL.

**[Deploy Directus on StackBlaze](https://dashboard.stackblaze.com/new/template/directus)**

## This stack

- **Directus**: Web service
- **PostgreSQL**: managed database · TCP:5432
- **Valkey**: managed cache · TCP:6379
- **Email**: platform add-on

## What you get

- **Model content visually**: Create collections and fields in the Data Studio: text, rich text, dates, images, and relations between collections. Directus writes real Postgres tables.
- **Instant REST and GraphQL**: Every collection gets REST and GraphQL endpoints on your public URL the moment you create it. Grant public read access per collection for a website.
- **Realtime and caching**: Valkey backs the API cache, rate limits, and the WebSocket bus, so realtime subscriptions work and the app can run more than one replica.
- **Email that sends**: User invites, password resets, and the Send Email step in Flows go out through the platform email add-on. No mail provider account to set up.
- **Generated secrets**: The signing secret and the admin password are generated at deploy and unique to this instance. Sessions survive restarts and redeploys.
- **Uploads that persist**: Images and files land on a shared volume and are served from the /assets endpoint. Extensions you install keep working after a redeploy.

## After you deploy

1. **Open the public URL**: The hostname is on the app page after deploy. The first start installs the Directus system tables, which takes about a minute.
2. **Sign in as admin**: Sign in as admin@example.com with ADMIN_PASSWORD from the app’s Variables. Directus asks about a license key and a project owner: Skip and Remind Later keep the free Core tier.
3. **Make the account yours, then model content**: Change the admin email to your own in your user profile so password resets reach you. Then create your first collection in Settings → Data Model.

## How it is wired

- **Postgres holds everything you model**: Collections are real tables in the attached database, next to the Directus system tables for users, roles, permissions, and activity.
- **Valkey keeps replicas in step**: The API cache, rate limiter counters, scheduled jobs, and the WebSocket message bus share Valkey, so you can add replicas without extra setup.
- **Uploads sit on a volume**: Files go to a 5 GB shared volume at /directus/uploads and extensions to /directus/extensions. Both survive restarts and redeploys.
- **Keep the secret**: SECRET signs sessions and access tokens. It is generated once at deploy. Changing it signs every user out.

## Common questions

### How do I sign in after deploy?

Open the public URL and sign in as admin@example.com. The password is generated at deploy and shown as ADMIN_PASSWORD in the app’s Variables in the dashboard. Change the email to yours afterwards.

### Is Directus free to use?

Directus is licensed under its own source available license. Without a key it runs on the free Core tier: 3 Studio users, 25 collections, 5 flows, no SSO and no custom permission rules. Organisations under the size limits in the license qualify for a free grant; others need a commercial license from Directus.

### How does my website read the content?

Through the REST API at /items/<collection> or the GraphQL endpoint at /graphql on your hostname. Give the Public policy read access to a collection, or create a user with a static token for server side requests.

### Where are uploaded files stored?

On a shared volume mounted at /directus/uploads. Files are served from /assets on your hostname. Directus can also use S3 storage if you set its storage variables.

### Does it send email?

Yes. Invites, password resets and Flows emails go out through the platform email add-on, from an address on your project’s mail domain.

### Can I use my own domain?

Yes. Attach a custom domain from the dashboard and set PUBLIC_URL to it, so links in emails point at the new address.

### What does it cost?

You pay for the compute, storage and bandwidth Directus, Postgres and Valkey use, not per seat or per API call.


Source: https://github.com/directus/directus
