You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/core/domains/cloudflare.mdx
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,8 +39,13 @@ To switch between modes, follow these steps:
39
39
Follow the steps in the same order to prevent any issues.
40
40
</Callout>
41
41
42
+
You can create a certificate for your origin server using two methods:
43
+
- Using Let's Encrypt to generate a certificate for your origin server.
44
+
- Using Cloudflare's Origin CA to generate a certificate for your origin server.
45
+
42
46
We assume that you have enabled the `Full (Strict)` mode in the previous step, is super important to follow the steps in the same order to prevent any issues.
43
47
48
+
### Using Let's Encrypt
44
49
1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain.
45
50
2. On the left side, click `DNS`.
46
51
3. Click on `Records`.
@@ -62,6 +67,35 @@ We assume that you have enabled the `Full (Strict)` mode in the previous step, i
62
67
19. Wait a few seconds and refresh the application.
63
68
20. You should see the application running on the domain you just created.
64
69
70
+
### Using Cloudflare's Origin CA
71
+
1. Go to cloudflare dashboard and then click on `Account Home` -> Select the Domain.
72
+
2. On the left side, click `SSL/TLS`.
73
+
3. Click on `Origin Server`.
74
+
4. Click on `Create Certificate`.
75
+
5. Select `Generate private key and CSR with Cloudflare`.
76
+
6. Choose the list of hostnames you want the certificate to cover eg. `api.dokploy.com`.
77
+
7. Choose the validity period eg. `15 years`.
78
+
8. Click `Create`.
79
+
9. Using the PEM format, copy the `Origin Certificate` and `Private Key` in the respective fields in the dokploy new certificate panel (Certificates > Add Certificate).
80
+
10. Go to `Domains` section in your application.
81
+
11. Click `Create Domain`.
82
+
12. In the `Host` field, enter the domain name eg. `api.dokploy.com`. (Make sure that the domain is already pointing to your server IP in Cloudflare DNS settings and the **hostname matches the one in the certificate**).
83
+
13. In the `Path` field, enter the path eg. `/`.
84
+
14. In the `Container Port` field, enter the port where your application is running eg. `3000`.
85
+
15. In the `HTTPS` field enable `ON`.
86
+
16. In the `Certificate` field select `None`.
87
+
17. Click `Create`.
88
+
89
+
Using Cloudflare's Origin CA, you are sure that the certificate will be valid for the next 15 years, or the duration you selected, and you don't have to worry about failed renewals.
90
+
91
+
<Callouttype="info">
92
+
You can also create a certificate for wildcards domains eg. `*.dokploy.com` and use it for multiple subdomains.
93
+
</Callout>
94
+
95
+
<Callouttype="warn">
96
+
**Important**: With a free Cloudflare account, this methods work only for the main domain and subdomains, not for sub-subdomains. Eg. `api.dokploy.com` works but `staging.api.dokploy.com` does not work.
0 commit comments