this post was submitted on 18 Feb 2026
23 points (100.0% liked)

Selfhosted

57938 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hello all,

I figured that a chunk of the selfhost community is using Caddy, so decided to post my query here. I am a novice in Caddy, so I might be saying some incorrect terms.

Some information

  • The router and the host running Caddy, are different machines
  • The router page is running HTTP, but I am accessing it via HTTPS through Caddy
  • Caddy is running via Docker.

I have a couple of services running on a host, so I access them via Caddy's reverse proxy. Now I am also trying to access my router login via the same reverse proxy. This is what the router entry in the caddyfile looks like

.
.
{
    local_certs
}
login.router.lan {
	reverse_proxy 192.168.1.1:80
}
.
.

With this entry, I can access the login page. However, when I enter the password, I feel like it's attempting to login but then it just comes back to the original login page. When I access it directly, the login is successful. I also have Pihole running and the Pihole login process works fine. So I suspect that the router login page is expecting some extra information from Caddy to forward it to the login page.

After some searching online and some LLM wrangling, I figured it's some cookie issue or my login page is expecting a certain host.

What should I add to my Caddyfile so that the login redirect works?

Edit1: Clarification! Everything is behind wireguard. Nothing is exposed to public (other than wireguard). I only access it within my home. The router login page cannot be accessed from outside.

Edit2: After a discussion with a friend, I have slightly narrowed it down (maybe, I'm not sure) to a http/https issue. When I made this change, the login redirection works.

http://login.router.lan/ {
    reverse_proxy 192.168.1.1:80
}

But this means that all communication is over HTTP.

you are viewing a single comment's thread
view the rest of the comments
[–] iamthetot@piefed.ca 3 points 1 month ago (1 children)

I don't have anything to help you, other than to say you're probably onto it being something specific about your router wanting more info from the reverse proxy. I have an actiontec modem I proxy behind nginx proxy manager and it works fine without any additional configuration, though.

What I really wanted to comment on was my surprise that everyone in a self hosting community assumed you were exposing that to the public when you absolutely did not say anything that implied it. Do none of you reverse proxy your local services? It's wonderful!

[–] xavier666@lemmy.umucat.day 1 points 1 month ago (1 children)

Do none of you reverse proxy your local services? It’s wonderful!

Yes please! I don't want to type the port number when multiple services are running on the same server.

what cert are you using?

It's a self-signed local cert. I'm not using Let's Encrypt. Does it require a valid domain name to work?

[–] iamthetot@piefed.ca 2 points 1 month ago

The setup I have does require a domain name, yes. I DNS challenge through cloudflare at the moment to get a wildcard cert for *.domain.tld and use that for my local services, including my modem, to serve with https.