Cloudflare domains
Serve a Cloudflare-managed domain with Full (Strict) using Let's Encrypt or Origin CA, or with Flexible mode.
Cloudflare's SSL/TLS mode decides how traffic is encrypted between Cloudflare and your server. This page covers the two modes that fit wtree Cloud.
Before you start
- A domain on Cloudflare and your server's IPv4 address.
- Set the SSL/TLS mode first, then create the domain in wtree Cloud in the order below.
| Mode | Encryption | Use when |
|---|---|---|
| Full (Strict) | End to end, origin certificate validated | You want encrypted origin traffic. Recommended. |
| Flexible | Visitor to Cloudflare only; Cloudflare to origin is HTTP | Your origin has no certificate. |
Cloudflare also offers Full (origin cert not validated), Strict (SSL-Only Origin Pull) and Off. They are not covered here. Off shows browsers a "not secure" warning.
Switch the SSL/TLS mode
In the Cloudflare dashboard, open Account Home and select the domain.
Go to SSL/TLS → Overview → Configure SSL/TLS Encryption.
Choose Full (Strict) or Flexible and save.
Full (Strict) with Let's Encrypt
In Cloudflare, go to DNS → Records → Add Record. Add an A record with the host name (for example api) and your server's IPv4 address.
In wtree Cloud, open the application or Compose service and go to Settings › Domains and click Add domain.
Set Host to api.example.com, Path to / and Container port to your app's port, for example 3000.
Turn HTTPS on, set Certificate to Let's Encrypt, and click Create.
Full (Strict) with Origin CA
Origin CA certificates last as long as the validity you pick, up to 15 years, so you never face a failed renewal.
In Cloudflare, go to SSL/TLS → Origin Server → Create Certificate.
Choose Generate private key and CSR with Cloudflare, list the hostnames to cover (for example api.example.com) and choose a validity such as 15 years. Click Create.
Copy the Origin Certificate and Private Key in PEM format into wtree Cloud under Domains › Certificates › Add certificate. See Certificates.
Make sure the host's A record exists in Cloudflare and points at your server.
In wtree Cloud, go to Settings › Domains and click Add domain. Set Host to the hostname in the certificate, Path to /, and Container port to your app's port.
Turn HTTPS on, set Certificate to None, and click Create.
A wildcard certificate such as *.example.com covers several subdomains.
On a free Cloudflare plan, a certificate covers the apex domain and first-level subdomains only. api.example.com works; staging.api.example.com does not.
Flexible
In Cloudflare, add the A record as above.
In wtree Cloud, go to Settings › Domains and click Add domain. Set Host, Path / and Container port.
Turn HTTPS off, set Certificate to None, and click Create.
Verify
Wait a few seconds, refresh the service and open the domain. Your app should respond.
Container port only routes Traefik to the container. It does not publish the port on the host.
Next steps
- DNS providers: create the
Arecord from wtree Cloud. - Domain troubleshooting
