Https for your Apps
How to get https for selfhosted apps on a homelab or VPS.
Proxies
I started with NPM, but understood that there are few alternatives to get https into your selfhosted services.
See this example on how one service (Multichat), can be deployed with Https with any of the 3 Proxies.
Traefik
Sample Selfhosted Apps with Traefik support out of the box:
- Dokploy
- Claper PPTs
- The MultiChat: which works with traefik/nginx as per these configs
If the DNS is set properly, these will work:
#nslookup gibme.duckdns.org
nslookup https://jalcocertech.com
If the DNS Challenge worked with the Cloudflare API token, these will work:
curl -I https://jalcocertech.com
echo | openssl s_client -servername jalcocertech.com -connect jalcocertech.com:443 2>/dev/null | openssl x509 -noout -dates
This blog was inspiring and here you have a Traefik x Groq working sample with the PhiData Fork
Whats great about Traefik, is that you can provide HTTPs to other services, just by adding label into their docker-compose.yml
:
And all of that happens programatically, plus we wont have conflict of using the same ports, as the host wont be seeing them!
Caddy
I tried to close 2024 with a post about selfhosting AI apps with Caddy.
Sample SelfHosted Apps with Caddy support out of the box:
NGINX
NGINX can be used together with Authelia, which provides potentially, an authentication layer.
Example project working with NGINX Proxy Manager:
Behind a NAT
Initially, it was all about cloudflared, but lately you will also hear about:
- Pangolin
- Cloudflare Tunnels
Cloudflare Tunnels
How to expose Apps safely, through your domain, with https and without exposing your home public IP.
That was a blocker for long to me.
Until I discovered Cloudflared tunnels.
And saw a practical example to expose a selfhosted app with cf.
cloudflared_tunnel
network on the containers you want to expose!docker network connect cloudflared_tunnel portainer #your_docker_container_to_expose #network (tunnel) - service