Direct Answer
Start a Pro trial with the Self-Hosted TLS add-on, or add it to Pro. Then add your domain as “Only HTTPS, on my own servers”, run the container from its setup on each server, and point the domain’s A or AAAA records at them. RedirHub issues the certificate as soon as your servers answer for the domain, and renews it from then on.
With Self-Hosted TLS, HTTPS for your domains terminates on your own servers, in a container that sits in front of your application. RedirHub issues each domain’s certificate, renews it and syncs it to every server, so you run no ACME client or renewal job. Visitor requests go straight to your servers and never pass through RedirHub.
A domain in this mode gets HTTPS only: RedirHub does not serve redirects or short links on it.
Before you start#
- A server with Docker, reachable from the internet on port 443. Port 80 stays with your application.
- Your application, or a proxy such as Caddy or nginx, answering plain HTTP on the server’s port 80. Another port works too, with one setting.
- The manager role in your workspace: only managers see the command with the workspace token.
Step 1: Get the Self-Hosted TLS add-on#
Self-Hosted TLS is an add-on to Pro, $100/month for up to 100 servers. On Enterprise, the contract sets it.
- New to RedirHub: start a Pro trial with Self-Hosted TLS. It is free for 14 days. A card is needed to start, and nothing is charged before the trial ends.
- Already on a Pro trial: add the add-on to your plan in the dashboard. Your trial keeps running, the add-on is free until it ends, and then it is billed with Pro.
- On paid Pro: add it to your plan in the dashboard. The Add domain and Connect dialogs also offer it, with its price, when your workspace does not have it yet.
Step 2: Add the domain#
- Go to Hostnames and click Add domain.
- Enter the domain or subdomain, for example app.example.com.
- Under “What will you use it for?”, choose “Only HTTPS, on my own servers”, then click “Add and set up servers”. Its setup opens next.
For a domain you already added, open Connect and choose “Use my own servers” under the other ways to connect. Through the API or the MCP server, create the domain with connection_mode set to self_hosted. With the Terraform provider (redirhub/redirhub 0.2.0 or later), set connection_mode on redirhub_domain; changing it later switches the domain in place:
hclresource "redirhub_domain" "shop" {
host = "shop.example.com"
connection_mode = "self_hosted"
}
# Waits until your servers answer for it; its certificate follows.
resource "redirhub_domain_verification" "shop" {
host = redirhub_domain.shop.host
}Step 3: Run the container on each server#
The setup shows the command with your workspace token filled in. Copy it and run it on each server:
bashdocker run -d --name redirhub-edge --restart unless-stopped --network host \
-v redirhub-edge:/data \
-e REDIRHUB_TOKEN=<your workspace token> \
redirhub/edgeThe container takes port 443 and passes every request to your app on port 80, which keeps serving as before. Run the same command, with the same token, on every server; each one appears under “Your servers” once its container starts. Keep the volume when you update the image: it holds the server’s identity and certificates.
| Setting | Default | What it does |
|---|---|---|
| REDIRHUB_TOKEN | None (required) | Your workspace token. It lets the server fetch your workspace’s certificates, and nothing else, and prove each of your domains. |
| UPSTREAM | http://127.0.0.1:80 | Where your app listens. For an app on another port, add -e UPSTREAM=http://127.0.0.1:8080. |
| HTTPS_PORT | 443 | The port the container takes for HTTPS. Change it only behind a load balancer that passes port 443 through to this port: Let’s Encrypt and our checks reach your domains on 443. |
| HTTP_PORT | off | A port for plain HTTP. Off leaves port 80 to your app. |
| HTTP_MODE | redirect | What plain HTTP on HTTP_PORT gets: redirect sends it to HTTPS, proxy passes it to your app. |
Step 4: Point the DNS at your servers#
- At your DNS provider, set the domain’s A (and AAAA) records to your servers’ addresses.
- Point www to the same servers too, and its certificate covers www as well.
- For a wildcard such as *.example.com, also add the CNAME record the setup shows. It proves the wildcard is yours and lets us issue its certificate.
We then check your servers. Their first answer on /.well-known/host-verification over HTTPS proves the domain is yours; the container answers it by itself. We issue the certificate and sync it to every server, and the setup shows that your servers serve HTTPS with it. Renewals reach them by themselves.
If the setup shows a problem#
| Message | What it means | Fix |
|---|---|---|
| Couldn’t reach port 443 | The domain does not reach a running container on port 443. | Check that its A or AAAA records point to your servers, that the container is running, and that your firewall allows port 443. |
| Port 443 answered, but not with this workspace’s token | Something else answers on port 443, or the container was started with another token. | Stop the other HTTPS server or move it to port 80 behind the container, and start the container with the token the setup shows. |
| We don’t see the CNAME record yet | The wildcard’s CNAME record is missing or has not propagated. | Add the record exactly as shown. DNS changes can take a few minutes to show. |
| Your workspace no longer includes its own servers | The add-on was removed from the plan. | Add Self-Hosted TLS to your plan again within a week; after that, the domain is released. |
Replace the token#
If the token has leaked, click Replace token in the domain’s setup, then start the container again with the new token on every server. Servers that keep the old token stop receiving certificates. Remove a server you no longer use from “Your servers”.
Try Self-Hosted TLS free Start Pro with Self-Hosted TLS: free for 14 days, up to 100 servers, certificates issued and renewed for you.
Start a free trialFrequently asked questions
No. TLS terminates in the container on your server, which passes each request to your application. RedirHub only issues and renews the certificates and keeps every server in sync.
Yes. Let it serve plain HTTP on port 80 and leave port 443 to the container, which passes every request to it. Turn off its own certificates and its HTTP-to-HTTPS redirect for these domains.
Yes, when you start the trial with it or add it during the trial. It is free until the trial ends, and then billed at $100/month with Pro.
Your servers keep serving HTTPS with the certificates they already have. Certificates are renewed well ahead of expiry, so a short outage never lets one lapse.
Up to 100 servers per workspace, in any region or cloud. For more, talk to us about Enterprise; pricing is set by contract.
