Skip to content

Commit 2875618

Browse files
Add Render docs (#673)
* Add Render docs * add id --------- Co-authored-by: Bryant Gillespie <bryant@directus.io> Co-authored-by: bryantgillespie <hey@bryantgillespie.com>
1 parent 7eb3dd5 commit 2875618

2 files changed

Lines changed: 104 additions & 2 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
stableId: 76603d18-6499-4dc0-ad7d-7efe3e070fe1
3+
id: f8e7d6c5-b4a3-4921-9f8e-7d6c5b4a3920
4+
slug: deploy-directus-to-render
5+
title: Deploy Directus to Render
6+
technologies:
7+
- render
8+
description:
9+
Deploy Directus on Render using the official blueprint repository and one-click deploy flow. Provision services from
10+
Infrastructure-as-Code and finish configuration in the Render Dashboard.
11+
---
12+
13+
Render hosts web services and managed databases and can deploy stacks defined as **Blueprints** (a `render.yaml` file in
14+
a GitHub repository). The Directus team maintains an official blueprint repository so you can provision Directus and its
15+
dependencies without building your own Docker Compose setup on Render.
16+
17+
Use the **Deploy to Render** button in the repository README to open Render with that repo selected, or connect the same
18+
repo manually under **New****Blueprint** in the Render Dashboard. Details such as which databases and add-ons are
19+
included live in the repo; treat the README there as the source of truth for required secrets and optional variables.
20+
21+
**Official repository:** [directus/render-blueprint-directus](https://github.com/directus/render-blueprint-directus)
22+
23+
**One-click deploy:**
24+
[Deploy to Render](https://render.com/deploy?repo=https://github.com/directus/render-blueprint-directus)
25+
26+
## Before You Start
27+
28+
- A [Render](https://render.com) account with a supported payment method if your workspace requires paid instance types
29+
(Render documents current plans on their site).
30+
- A GitHub account Render can use to pull the blueprint repository when you use one-click deploy.
31+
32+
> Note: the official blueprint defaults to Render's free plans. Local uploads are ephemeral on the free web service, and
33+
> free Postgres/Key Value plans are subject to Render usage limits. Use a paid web service with persistent disk or
34+
> external storage for durable file uploads.
35+
36+
## Step 1: Deploy the blueprint
37+
38+
1. Open [directus/render-blueprint-directus](https://github.com/directus/render-blueprint-directus) and follow the
39+
**Deploy to Render** link in the README (or use the one-click URL above).
40+
2. Sign in to Render when prompted and authorize GitHub access if Render asks for repository permissions.
41+
3. Render loads the Blueprint from the repo. Review the resources it will create (for example a web service running the
42+
Directus Docker image and a PostgreSQL instance). Confirm names, regions, and instance sizes match what you want for
43+
production or staging.
44+
4. Complete any required fields Render surfaces during Blueprint setup. These often map to environment variables or
45+
secrets listed in the repository README (for example `SECRET`, database passwords, or admin bootstrap values).
46+
5. Start the deploy and wait until services reach a healthy state. The Directus web service receives a default
47+
`*.onrender.com` hostname unless you configure a custom domain later.
48+
49+
If you prefer not to use the button, in the Render Dashboard choose **New****Blueprint**, select the same GitHub
50+
repository, then apply the Blueprint with the same review step.
51+
52+
> Note: the official blueprint uses a `Dockerfile` to build the Directus image. To update the Directus version, change
53+
> the image tag in that `Dockerfile`.
54+
55+
## Step 2: Configure environment variables
56+
57+
After resources exist, finish Directus configuration in the Render Dashboard.
58+
59+
1. Open the **Environment** (or **Environment Variables**) section for the Directus web service.
60+
2. Set **`PUBLIC_URL`** to the URL clients use to reach Directus (for example `https://your-service.onrender.com` or
61+
your custom domain). Directus uses this for redirects, emails, and asset URLs. `PUBLIC_URL` is not required for the
62+
default `*.onrender.com` URL, but you should set it when using a custom domain.
63+
3. The blueprint typically generates `SECRET` automatically. Set **`SECRET`** manually only if you want a deterministic
64+
value under your own control. See [general configuration](/configuration/general) for other optional variables.
65+
4. Align remaining variables with the blueprint README: database connection values are often wired automatically when
66+
Postgres is created in the same Blueprint, but Redis, file storage, or cache settings may need explicit values
67+
depending on how the stack is defined.
68+
69+
Whenever you change environment variables, Render redeploys the web service so the container picks up new values.
70+
71+
::callout{icon="material-symbols:info-outline" title="First admin user"} You can rely on the Studio onboarding flow the
72+
first time you open Directus, or pre-create an admin with [`ADMIN_*` variables](/configuration/general#first-admin-user)
73+
if your blueprint documents them. Follow whichever path the repository README recommends for that stack. ::
74+
75+
## Step 3: Open Directus and verify
76+
77+
1. Visit your service URL in a browser (the same value you used for `PUBLIC_URL`).
78+
2. Complete onboarding or log in with the admin credentials you configured.
79+
3. Upload a test file if your blueprint uses local disk or external storage, so you confirm uploads persist across
80+
redeploys.
81+
82+
## Optional: Custom domain and TLS
83+
84+
1. In the Directus web service on Render, open **Settings** and find **Custom Domain**.
85+
2. Add your domain and apply the DNS records Render shows (typically CNAME or A records).
86+
3. Render provisions TLS automatically once DNS validates.
87+
4. Update **`PUBLIC_URL`** to match the custom domain (for example `https://directus.example.com`).
88+
89+
## Updating the stack
90+
91+
When the blueprint repository changes (for example an updated `render.yaml` or pinned Directus image tag), sync or
92+
reconnect the Blueprint from the Render Dashboard so Render proposes infrastructure updates. Read Render's
93+
[Blueprint documentation](https://render.com/docs/infrastructure-as-code) for merge and rollout behavior in your
94+
workspace.
95+
96+
## Summary
97+
98+
You deployed Directus on Render by applying the official blueprint, letting Render provision the services defined in
99+
`render.yaml`, and setting environment variables such as `PUBLIC_URL` and `SECRET`. For deeper deployment concepts
100+
(version pinning, persistence, health checks), see [Deploying Directus](/self-hosting/deploying) and
101+
[Configuration](/configuration/general).
102+

content/tutorials/6.self-hosting/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Choose the option that matches how much infrastructure you want to manage:
1212

1313
- Use **Directus Cloud** if you want a fully managed deployment with hosted infrastructure, updates, and scaling handled for you.
1414
- Use **Docker** if you want to run Directus yourself on a VPS, local server, or your own cloud infrastructure.
15-
- Use a **platform-specific guide** if your infrastructure is already standardized on a provider like Railway, AWS, Azure, Google Cloud, DigitalOcean, or Ubuntu-based servers.
15+
- Use a **platform-specific guide** if your infrastructure is already standardized on a provider like Railway, Render, AWS, Azure, Google Cloud, DigitalOcean, or Ubuntu-based servers.
1616

1717
## Directus Cloud
1818

@@ -34,4 +34,4 @@ Create a project with Docker.
3434

3535
## Platform-Specific Guides
3636

37-
We also have step-by-step guides for self-hosting Directus on various cloud providers, including Amazon Web Services, Microsoft Azure, Google Cloud Platform, DigitalOcean, Ubuntu, and Railway. The tutorials below walk you through deploying on each platform (often including reverse proxy, SSL, and running as a service where relevant).
37+
We also have step-by-step guides for self-hosting Directus on various cloud providers, including Amazon Web Services, Microsoft Azure, Google Cloud Platform, DigitalOcean, Ubuntu, Railway, and Render. The tutorials below walk you through deploying on each platform (often including reverse proxy, SSL, and running as a service where relevant).

0 commit comments

Comments
 (0)