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
1. Copy our sample [Caddyfile](./Caddyfile) and change the following values:
45
+
3. Copy our sample [Caddyfile](./Caddyfile) and change the following values:
46
46
47
47
> If you're installed Caddy as a system package, update the default Caddyfile with `vim /etc/caddy/Caddyfile`
48
48
49
49
-`email@example.com`: Email to request certificates from LetsEncrypt/ZeroSSL (does not have to be Coder admin email)
50
50
-`coder.example.com`: Domain name you're using for Coder.
51
51
-`*.coder.example.com`: Domain name for wildcard apps, commonly used for [dashboard port forwarding](https://coder.com/docs/coder-oss/latest/networking/port-forwarding#dashboard). This is optional and can be removed.
52
-
-`localhost:3000`: Address Coder is running on. Modify this if you changed `CODER_ADDRESS` in the Coder configuration.
52
+
-`localhost:3000`: Address Coder is running on. Modify this if you changed `CODER_HTTP_ADDRESS` in the Coder configuration.
53
53
54
-
1.[Configure Coder](https://coder.com/docs/coder-oss/latest/admin/configure) and change the following values:
54
+
4.[Configure Coder](https://coder.com/docs/coder-oss/latest/admin/configure) and change the following values:
If you're [keeping Caddy running](https://caddyserver.com/docs/running) via a system service:
62
62
@@ -70,7 +70,7 @@ This is an example configuration of how to use Coder with [caddy](https://caddys
70
70
caddy run
71
71
```
72
72
73
-
1. Optionally, use [ufw](https://wiki.ubuntu.com/UncomplicatedFirewall) or another firewall to disable external traffic outside of Caddy.
73
+
6. Optionally, use [ufw](https://wiki.ubuntu.com/UncomplicatedFirewall) or another firewall to disable external traffic outside of Caddy.
74
74
75
75
```console
76
76
# Check status of UncomplicatedFirewall
@@ -90,7 +90,7 @@ This is an example configuration of how to use Coder with [caddy](https://caddys
90
90
sudo ufw enable
91
91
```
92
92
93
-
1. Navigate to your Coder URL! A TLS certificate should be auto-generated on your first visit.
93
+
7. Navigate to your Coder URL! A TLS certificate should be auto-generated on your first visit.
94
94
95
95
## Generating wildcard certificates
96
96
@@ -104,7 +104,9 @@ For production deployments, we recommend configuring Caddy to generate a wildcar
104
104
105
105
- Standalone: [Download a custom Caddy build](https://caddyserver.com/download) with the module for your DNS provider. If you're using Debian/Ubuntu, you [can configure the Caddy package](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian) to use the new build.
106
106
107
-
1. Edit your `Caddyfile` and add the necessary credentials/API tokens to solve the DNS challenge for wildcard certificates.
107
+
2. Edit your `Caddyfile` and add the necessary credentials/API tokens to solve the DNS challenge for wildcard certificates.
108
+
109
+
For example, for AWS Route53:
108
110
109
111
```diff
110
112
tls {
@@ -125,3 +127,22 @@ For production deployments, we recommend configuring Caddy to generate a wildcar
125
127
```
126
128
127
129
> Configuration reference from [caddy-dns/route53](https://github.com/caddy-dns/route53).
130
+
131
+
And for CloudFlare:
132
+
133
+
Generate a [token](https://dash.cloudflare.com/profile/api-tokens) with the following permissions:
134
+
135
+
- Zone:Zone:Edit
136
+
137
+
```diff
138
+
tls {
139
+
- on_demand
140
+
issuer acme {
141
+
email email@example.com
142
+
}
143
+
144
+
+ dns cloudflare CLOUDFLARE_API_TOKEN
145
+
}
146
+
```
147
+
148
+
> Configuration reference from [caddy-dns/cloudflare](https://github.com/caddy-dns/cloudflare).
0 commit comments