-
Notifications
You must be signed in to change notification settings - Fork 327
docs: add Dokploy self-hosting guide #3082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+135
−3
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
30c4e52
docs: add Dokploy self-hosting guide
ChiragAgg5k 2941a18
docs: register dokploy screenshots in optimize cache
ChiragAgg5k f29fbd1
docs: clarify GitHub VCS integration section for dokploy
ChiragAgg5k 5cd57ff
(docs): clarify wildcard certificate setup for dokploy
ChiragAgg5k fde293f
(fix): correct _APP_SMTP_SECURE value in self-hosting docs
ChiragAgg5k f06d4e6
(docs): add per-domain certificate alternative for dokploy
ChiragAgg5k 9856b49
(fix): correct GitHub VCS integration description in coolify guide
ChiragAgg5k File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
src/routes/docs/advanced/self-hosting/platforms/dokploy/+page.markdoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| --- | ||
| layout: article | ||
| title: Dokploy | ||
| description: Learn how to self-host Appwrite on your infrastructure with Dokploy. | ||
| --- | ||
|
|
||
| Dokploy is an open-source, self-hosted deployment platform that simplifies application management through an intuitive dashboard and one-click template deployments. Appwrite is available as a template in Dokploy's template catalog, letting you deploy the complete Appwrite stack, including the database, workers, and function executor, in a few clicks. This guide walks you through setting up Appwrite on your Dokploy instance and provides necessary configuration and troubleshooting tips. | ||
|
|
||
| # Prerequisites {% #prerequisites %} | ||
|
|
||
| Before starting, ensure your server meets the [minimum requirements](/docs/advanced/self-hosting#system-requirements) for hosting Appwrite with Dokploy. | ||
|
|
||
| # Installation {% #installation %} | ||
|
|
||
| Install Dokploy on your server using the command below: | ||
|
|
||
| ```bash | ||
| curl -sSL https://dokploy.com/install.sh | sh | ||
| ``` | ||
|
|
||
| Once the installation is complete, open the Dokploy dashboard in your web browser at `http://your-server-ip:3000`. | ||
|
|
||
| 1. Sign up for a new account. | ||
| 2. Click the **Create Project** button to start a new project. | ||
| 3. Inside the project, click **Create Service** and select **Template**. | ||
| 4. Search for and select **Appwrite** from the template catalog. | ||
| 5. Click **Create**, then open the new service and click **Deploy**. | ||
|
|
||
| Once the deployment finishes, the **Containers** tab lists every Appwrite service running on your server. | ||
|
|
||
| {% only_dark %} | ||
|  | ||
| {% /only_dark %} | ||
| {% only_light %} | ||
|  | ||
| {% /only_light %} | ||
|
|
||
| The template generates secure random secrets and pre-fills the recommended settings, but you can customize them in the **Environment** tab. After deployment completes, access your Appwrite console by opening the main domain from the **Domains** tab and navigating to `/console`. | ||
|
|
||
| # Domains and HTTPS {% #domains-https %} | ||
|
|
||
| The template configures three domains for your Appwrite instance: the main API/console domain, a `sites.` subdomain, and a `functions.` subdomain. To use your own domain: | ||
|
|
||
| 1. Point DNS `A` records for your domain and the `sites.` and `functions.` subdomains to your server. | ||
| 2. Add wildcard `A` records for `*.sites.your-domain` and `*.functions.your-domain`, which Appwrite uses for site previews and function execution URLs. | ||
| 3. Update the hosts in the service's **Domains** tab and the `_APP_DOMAIN`, `_APP_CONSOLE_DOMAIN`, `_APP_DOMAIN_SITES`, and `_APP_DOMAIN_FUNCTIONS` environment variables to match. | ||
| 4. For the main domain entries (API, console, and realtime), enable **HTTPS** with the **Let's Encrypt** certificate provider, then redeploy. These are single hosts, so Dokploy issues certificates for them automatically. | ||
| 5. The two wildcard domains (`*.sites.your-domain` and `*.functions.your-domain`) need a wildcard certificate you provide — see below. | ||
|
|
||
| **Wildcard certificates** | ||
| Dokploy's built-in Let's Encrypt uses the HTTP-01 challenge, which cannot issue wildcard certificates, so the `*.sites` and `*.functions` domains (used for site previews and function execution URLs) need a certificate you supply: | ||
|
|
||
| 1. Issue a wildcard certificate for `*.sites.your-domain` and `*.functions.your-domain` with a **DNS-01** client such as [lego](https://go-acme.github.io/lego/), acme.sh, or certbot, using your DNS provider's API token. DNS-01 is required — HTTP-01 cannot validate wildcards. | ||
| 2. Add the certificate under **Dokploy → Settings → Certificates**. | ||
| 3. In the **Domains** tab, set each wildcard domain's certificate provider to **None** (keep HTTPS enabled). This is the step most people miss: if it stays on **Let's Encrypt**, Traefik keeps retrying an impossible wildcard issuance and never serves the certificate you uploaded. | ||
|
|
||
| Traefik then serves your uploaded certificate for matching subdomains via SNI. | ||
|
|
||
| **Simpler alternative: per-domain certificates** | ||
| If you only need HTTPS on a handful of specific site or function domains — for example a production site on `app.sites.your-domain` or a custom domain — you can skip the wildcard certificate entirely. HTTP-01 can issue a certificate for a specific hostname (just not a wildcard), so: | ||
|
|
||
| 1. In the service's **Domains** tab, add the exact domain (not a wildcard) with **Port 80**, **HTTPS** enabled, and the **Let's Encrypt** certificate provider. | ||
| 2. Redeploy. Dokploy issues a standard certificate for that host, the same way it does for your main domain. | ||
|
|
||
| The domain must resolve to your server (the wildcard `A` record already handles this) and be publicly reachable on port 80 for the challenge. This is easier than managing a wildcard certificate, but you repeat it for each domain and it does not cover Appwrite's auto-generated preview subdomains — use the wildcard certificate above if you need every subdomain covered automatically. | ||
|
|
||
| {% info title="Using Cloudflare" %} | ||
| Cloudflare's free Universal SSL only covers your apex and first-level wildcard (`*.your-domain`), not second-level wildcards like `*.sites.your-domain`. If these subdomains are proxied (orange cloud), a matching edge certificate requires Cloudflare Advanced Certificate Manager. To avoid that cost, set the `*.sites` and `*.functions` records to **DNS only** (grey cloud) and rely on the Let's Encrypt wildcard certificate above. A Cloudflare **Origin** certificate will not work here — it is only trusted behind Cloudflare's proxy, never by browsers directly. | ||
| {% /info %} | ||
|
|
||
| # Configuration {% #configuration %} | ||
|
|
||
| Dokploy stores the template's environment variables in the service's **Environment** tab. You can modify these variables and redeploy the service to apply the changes. To enable additional features, you may need to configure some environment variables manually. | ||
|
|
||
| **Assistant** | ||
| To enable the assistant, which allows you to generate code snippets and assist with documentation for your Appwrite project, set your OpenAI API key: | ||
|
|
||
| ```bash | ||
| _APP_ASSISTANT_OPENAI_API_KEY=sk-1234567890 | ||
| ``` | ||
|
|
||
| **SMS Notifications** | ||
| To enable SMS-based OTP authentication, configure the following environment variables: | ||
|
|
||
| ```bash | ||
| _APP_SMS_FROM=123456789 | ||
| _APP_SMS_PROVIDER=sms://username:password@mock | ||
| ``` | ||
|
|
||
| **Email Notifications** | ||
| To enable email notifications, configure these environment variables: | ||
|
|
||
| ```bash | ||
| _APP_SMTP_HOST=smtp.example.com | ||
| _APP_SMTP_PASSWORD=password | ||
| _APP_SMTP_PORT=587 | ||
| _APP_SMTP_SECURE=tls | ||
| _APP_SMTP_USERNAME=username | ||
| ``` | ||
|
|
||
| **GitHub Integration** | ||
| To connect a GitHub App so Appwrite can build and deploy functions and sites from your GitHub repositories, set these environment variables: | ||
|
|
||
| ```bash | ||
| _APP_VCS_GITHUB_APP_ID | ||
| _APP_VCS_GITHUB_APP_NAME | ||
| _APP_VCS_GITHUB_CLIENT_ID | ||
| _APP_VCS_GITHUB_CLIENT_SECRET | ||
| _APP_VCS_GITHUB_PRIVATE_KEY | ||
| ``` | ||
|
|
||
| The [Github Docs](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps) provide more information on configuring your Github app. | ||
|
|
||
| # Troubleshooting {% #troubleshooting %} | ||
|
greptile-apps[bot] marked this conversation as resolved.
|
||
|
|
||
| 1. **Sites or function domains return 404** | ||
| Requests to `<id>.sites.your-domain` require wildcard DNS records (`*.sites.your-domain` and `*.functions.your-domain`) pointing to your server. Verify the records exist and that the `_APP_DOMAIN_SITES` and `_APP_DOMAIN_FUNCTIONS` environment variables match your configured domains. | ||
|
|
||
| 2. **Browser shows a certificate warning on site subdomains** | ||
| Generated subdomains need a wildcard certificate, which Dokploy cannot issue automatically. Follow the steps in [Domains and HTTPS](#domains-https) to add one under **Dokploy → Settings → Certificates**. | ||
|
|
||
| 3. **Only deploy one Appwrite instance per server** | ||
| The Appwrite template runs its function executor and runtime containers on the shared Docker network, so multiple Appwrite deployments on the same Dokploy server can conflict. Use one Appwrite service per server. | ||
Binary file added
BIN
+36.3 KB
static/images/docs/advanced/self-hosting/dokploy/dark/deployed-service.avif
Binary file not shown.
Binary file added
BIN
+36.3 KB
static/images/docs/advanced/self-hosting/dokploy/deployed-service.avif
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.