this post was submitted on 03 Apr 2025
24 points (87.5% liked)

Selfhosted

45453 readers
557 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.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I have a lemmy instance running but I'm having trouble with my reverse proxy config. I'm using Caddy. Previously I had used nginx but didn't end up keeping the instance alive. Now I want to get it back up but I've since switched to Caddy because it's just easier. I have several self hosted services already working great with caddy and don't want to disrupt that.

I've found a few configs online but none seem to work. I'm running this on a standard ubuntu server 22.04 box.

Any ideas or suggestions?

you are viewing a single comment's thread
view the rest of the comments
[–] irmadlad@lemmy.world 1 points 15 hours ago

I'm not sure if this will help you out since I'm really not sure what your problems are other than getting the reverse proxy to work. So, I'll give you what I've found to work and if it's not what you were looking for then you can just skip over what I"m yammering on about.

The process:

Spin up a container, let's say it's Dozzle and it needs port 1124. Container deployed, so lets put it in reverse proxy:

Issue command together:

sudo nano /etc/caddy/Caddyfile
sudo systemctl restart caddy	

Enter the following in the Caddyfile:

dozzle.myverycooldomain.duckdns.org:443 {
	reverse_proxy localhost:1124
}

Press ctrl x, press y, press enter, and the Caddy server restarts if you indeed issued the commands together. Now go to dozzle.myverycooldomain.duckdns.org for test run.