Direct Answer
Start a Pro trial with the Self-Hosted Edge add-on, or add it to Pro. Add your domain as “HTTPS for my own site”, run the container from its setup on each server, and point the domain’s A or AAAA records at them. RedirHub issues the certificate once your servers answer, renews it from then on, and emails you if your servers stop answering. The links you add to the domain redirect on your servers too.
With Self-Hosted Edge, HTTPS for your domains ends on your own servers, in a container 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. Visitors go straight to your servers and never pass through RedirHub.
The same container serves every link you add to the domain, as RedirHub’s own network does: redirects, short links, QR codes, custom HTML pages and password-protected links. A link for a path redirects before your app answers, a catch-all takes only your app’s 404s, and visits and 404s show up in Analytics. Just HTTPS? Add no links, and every request goes to your app.
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’s server token.
Step 1: Get the Self-Hosted Edge add-on#
Self-Hosted Edge 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 Edge. 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 “HTTPS for my own site”, 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 “On my own servers”. 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#
Under “What your servers do”, the setup lists what the container does and builds the command to match: your domain’s links, your app’s 404 reports, port 80 sent to HTTPS, and the port your app listens on. Copy the command, with your server token filled in, 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 server 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, certificates and the last copy of your links.
| Setting | Default | What it does |
|---|---|---|
| REDIRHUB_TOKEN | None (required) | Your workspace’s server token. It lets the server fetch your workspace’s certificates and links, 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: -e UPSTREAM=http://127.0.0.1:8080. |
| PORT_HTTPS | 443 | The port the container takes for HTTPS. Change it only behind a TCP load balancer that passes port 443 through to this port: Let’s Encrypt and our checks reach your domains on 443. |
| PORT_HTTP | off | A port for plain HTTP, e.g. 80. Off leaves port 80 to your app. |
| ALWAYS_HTTPS | on | What plain HTTP on PORT_HTTP gets: on sends it to HTTPS (301), off serves it like HTTPS (your links, then your app). |
| LINKS | on | off serves no links on these servers: HTTPS only, every request goes to your app. |
| REPORT_404 | on | off reports none of your app’s 404s from these servers. |
| PORT_HEALTH | off | A port for a load balancer’s health check: GET /ready answers 200 once the server holds your certificates. |
| PROXY_PROTOCOL | off | Behind a TCP load balancer that sends the PROXY protocol: its addresses or ranges, e.g. 10.0.0.0/8, so your app sees the visitor’s address. |
To change how requests reach your app, mount your own files in /etc/edge/: proxy.conf replaces the generated proxy settings, and files in http.d/ and server.d/ are added to the http block and to the servers of your domains (for example an upstream with several app servers, or an HSTS header). The container checks them before it starts and names the line that does not load.
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. Wildcards get certificates only, no links.
We then check your servers. Their 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 and link changes reach them by themselves, within seconds.
Redirects and 404s on your servers#
- A link for a path redirects before your app, even when the page exists. Add one in RedirHub to take a page down or move it without a release of your app.
- A catch-all link only takes your app’s 404s: a working page is never taken over, and a page your app no longer has goes where the catch-all says.
- Your app’s 404s are reported and show up in Analytics, with the visits of your links. Turn 404 reports off for the domain in RedirHub, or with REPORT_404=off on the servers.
- Every kind of link works on your servers: the container runs the same redirector as RedirHub’s network, so custom HTML pages, frame redirects and password-protected links behave exactly as they do on RedirHub’s DNS. A link you add, change or pause reaches every server within seconds.
If RedirHub cannot be reached, your servers keep serving with the certificates and links they have.
Monitoring#
We check every domain on your servers regularly, and email the workspace’s owners and managers when something needs you:
- Your servers stopped answering: one email when none of your servers has answered for a domain for an hour, naming every domain affected. If they stay silent for 7 days, the domain is released and you get one more email; start the container again and it connects by itself.
- A certificate can’t be renewed: renewal starts weeks before expiry and retries on its own. If Let’s Encrypt still cannot reach the container on port 443 when the certificate has 14 days left, we email you, at most once a day, with the date it runs out.
These are the domain status emails: turn them off under Email preferences.
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 (docker ps), 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 Edge 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 and link changes. Remove a server you no longer use from “Your servers”.
Try Self-Hosted Edge free Start Pro with Self-Hosted Edge: free for 14 days, up to 100 servers, certificates issued and renewed for you, your links served on your servers.
Start a free trialFrequently asked questions
No. TLS ends in the container on your server, which answers your links and passes every other request to your application. RedirHub issues and renews the certificates, syncs them and your links to every server, and receives the visit and 404 counts.
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 and your links with what they already have. Certificates are renewed well ahead of expiry, so a short outage never lets one lapse.
Yes. Add no links to the domain, or start the container with -e LINKS=off, and every request goes to your app. Turn 404 reports off with -e REPORT_404=off.
Up to 100 servers per workspace, in any region or cloud. For more, talk to us about Enterprise; pricing is set by contract.
