I'm attempting to make Immich accessible outside my home via the VPS tunneling with Wireguard into my home network. For context, I'm behind a CG-NAT at home (VM running Ubuntu with Immich on it via Docker) with no static IP or IPv6 available. My workaround has been to purchase a cheap VPS (Ubuntu 20) with a public IP.
I have installed Docker, Docker compose, and Wireguard on both machines (Traefik on just the VPS).
After configuring with help from ChatGPT, my VPS can successfully see my homelab (Immich app) by using the curl command to request the internal Wireguard IP and the Immich port (for example, 10.0.0.1:2283). It pulls up what looks like the Immich login page in html form in the terminal, so that's encouraging. Wireguard seems to be working great.
The issue is that my custom domain isn't pointing to Immich or a Traefik screen. Instead, I get a 404 error (better than timing out like earlier, lol).
I bought the domain on Cloudflare and created an A record pointing to the public IP of my VPS (DNS only, Cloudflare proxy turned off). Not sure why that isn't making its way through Traefik. I also have my traefik.yml file configured to work with Let's Encrypt for a cert. Let's Debug says I'm in the green, but my logs indicate that the ACME challenge is not working and it's falling back on a self signed cert or something.
Any ideas?
My docker-compose.yml
services:
traefik:
image: traefik:v2.10
command:
- "--api.insecure=true" # Enable the dashboard (optional)
- "--providers.docker=true" # Enable Docker provider
- "--entrypoints.web.address=:80" # Listen on port 80
- "--entrypoints.websecure.address=:443" # Listen on port 443
- "--entrypoints.dashboard.address=:8080" # Dashboard entry point
ports:
- "80:80" # HTTP
- "443:443" # HTTPS
- "8080:8080" # Dashboard (optional)
volumes:
- "/var/run/docker.sock:/var/run/docker.sock" # Access Docker socket
- "./traefik.yml:/traefik.yml" # Traefik config
My traefik.yml
api:
dashboard: true
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
certificatesResolvers:
letsencrypt:
acme:
email: EMAIL@email.com # Replace with your email address
storage: acme.json # File to store the certificates
httpChallenge:
entryPoint: web # Entry point for HTTP challenge
http:
routers:
myrouter:
rule: "Host(`DOMAIN.com`)"
entryPoints:
- websecure
service: myservice
tls: # This enables HTTPS; make sure you have Let's Encrypt set up if using this
certResolver: letsencrypt # Make sure you have a cert resolver defined
services:
myservice:
loadBalancer:
servers:
- url: "http://10.1.0.1:2283" # Point to the Immich application
log:
level: DEBUG
My Traefik logs seem to indicate an ACME issue:
time="2024-08-23T15:05:17Z" level=error msg="Cannot retrieve the ACME challenge for DOMAIN.com (token \"letsdebug-test\")" providerName=acme time="2024-08-23T15:05:17Z" level=error msg="Cannot retrieve the ACME challenge for DOMAIN.com (token \"**********<TOKEN>**********")" providerName=acme