WebWorld.nl
VPS

Connecting your own domain with HTTPS to your app

Make n8n, Open WebUI or Dify reachable at, for example, app.yourcompany.com, with a free SSL certificate via Caddy.

This guide changes along with the apps

The apps on our VPS plans are developed quickly and get frequent updates, sometimes several a month. Commands, menus and screens may therefore differ from what is described here. We update this guide regularly; the date at the top shows when that last happened. When in doubt, the official documentation of the app takes precedence.

By default you open the apps through an SSH tunnel. If colleagues or customers need to use the app, or you want to receive webhooks in n8n, connect your own (sub)domain with HTTPS. Here we use Caddy, a web server that obtains a free Let's Encrypt certificate by itself.

Not for Coolify: Coolify has its own proxy on ports 80 and 443; you set domains in the Coolify dashboard. We advise against making OpenClaw public; use the SSH tunnel for it.

1. Set up DNS

With your DNS provider, create an A record pointing to the IPv4 address of your VPS, for example app.yourcompany.com. Also add an AAAA record for the IPv6 address. Wait until the record works (check with ping app.yourcompany.com).

2. Install Caddy

apt update && apt install -y caddy

Using ufw? Then allow ports 80 and 443: ufw allow 80,443/tcp.

3. Configure Caddy

Open the configuration file with nano /etc/caddy/Caddyfile, replace its content with the block for your app and save:

AppAddress after reverse_proxy
n8n127.0.0.1:5678
Open WebUI127.0.0.1:3000
Dify127.0.0.1:8080
app.yourcompany.com {
    reverse_proxy 127.0.0.1:5678
}

Load the new configuration:

systemctl reload caddy

Now open https://app.yourcompany.com. The certificate is requested automatically on the first visit and renewed by itself afterwards.

4. Extra step for n8n

n8n needs to know the address it is reachable on, otherwise the webhook URLs are wrong. Restart the container with these extra settings (replace the domain):

docker stop n8n && docker rm n8n
docker run -d --name n8n --restart unless-stopped \
  -p 127.0.0.1:5678:5678 \
  -e GENERIC_TIMEZONE=Europe/Amsterdam -e TZ=Europe/Amsterdam \
  -e N8N_HOST=app.yourcompany.com -e N8N_PROTOCOL=https \
  -e WEBHOOK_URL=https://app.yourcompany.com/ \
  -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n

Use these extra lines with every future update as well.

Not working?

  • View Caddy's messages with journalctl -u caddy -n 50.
  • Requesting a certificate only works when the DNS record already points to the VPS and port 80 is reachable.

Frequently asked questions

Does the SSL certificate cost anything?

No. Caddy uses free Let's Encrypt certificates and renews them automatically.

A VPS with the app already installed?

Choose a ready-made app when ordering: OpenClaw, Hermes Agent, n8n, Open WebUI, Dify or Coolify.

View VPS plans
WhatsApp WhatsApp