I highly recommend npm. It's also the only one I've used, so please keep that in mind.
Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
I really like Zoraxy. Similar to NPM but it's its own thing and I like it a lot more
I know how to use raw nginx/Caddy/traefik to do it, but I find the WebUI and all the extra features Zoraxy has to be very convenient and easy to use.
NPM was the first one that worked for me. I used a YouTube tutorial. I tried Nginx and Caddy, but couldn't figure them out. For context, I try to run anything I can out of Docker, which adds some complexity I think. I must not have been doing the templates correctly or something.
I plan on trying to go for Nginx or Caddy later, but right now NPM works wonders for my use case.
I am using nginx on a separate machine (VM) I have yet to try it in docker, I just have not found a reason to change it yet.
I've tried npm, caddy and traefik but they are always way more complicated then adding a new config file in nginx...
I feel the others add too much to the docker configs and limit what can be added to the reverse proxy. I have control of access from the nginx server, without having to change the apps configuration.
NPM is the closest to what I would like (only needing the same network in docker) if I go the docker way but for some reason it never works as it should when I configure it. So I am sticking to plain nginx.
I used NPM, It was pretty solid
Then I changed headspace and now I run SearXNG through cloudflare, and tailscale everything that doesn't need to be public.
I think NGINX has the best reverse proxy
Nginx installed directly, I use nano over ssh to edit configs. Forces you to learn some things and I never moved passed it because it works so well.
I had a poor experience with NPM which turned me to SWAG, it worked, but was a tad slow. Moved to Traefik and haven’t looked back.
If you're just going to VPN in to your home network, I've found caddy to be the simplest.
I tried using PiVPN to route my phone's Internet access through my home network, but it kept breaking and I found I don't have a head for networks.
Would caddy be able to do that in an easier to maintain way?
Set up wireguard in a docker container and then forward the port to wireguard, the default container on docker hub is fairly straightforward and you can always ask me for help if you need :).
However, If you are using ipv4, you need to make sure that you're not behind a CG-NAT (If you think you might be, call your ISP and tell them you have security cameras that need to get out or something like that).
You could also try tailscale which is built using wireguard with nat-busting features and a bit easier to configure (I dont personally use it as wireguard is sufficient for me).
After that Caddy + DNSMasq will simply allow you to map different URLs to IP addresses
dnsmasq
- will let you map, E.g.
my_computer
->192.168.1.64
- will let you map, E.g.
- Caddy (Or nginx, but caddy is simpler)
- will let you map to ports so e.g.:
- with DNS (DNSMasq as above)
http://dokuwiki.my_computer
->http://my_computer:8080
- Without DNS
http://dokuwiki.192.168.1.64
->http://192.168.1.64:8080/
- with DNS (DNSMasq as above)
- will let you map to ports so e.g.:
Caddy and DNSmasq are superfluous, if you've got a good memory or bookmarks, you don't really need them.
VPN back into home is a lot more important. You definitely do not want to be forwarding ports to services you are running, because if you don't know what you're doing this could pose a network security risk.
Use the VPN as the entry point, as it's secure. I also recommend running the VPN in a docker / podman container on an old laptop dedicated just to that, simply to keep it as isolated as you can.
Down the line you could also look into VLan If your router supports that.
I personally would not bother with SSL If you're just going to be providing access to trusted users who already have access to your home network.
If you are looking to host things, just pay for a digital droplet for $7 a month, It's much simpler, You still get to configure everything but you don't expose your network to a security risk.
Thank you, that looks like a good set of hooks for me to get into at a weekend, child allowing.
I very much appreciate the guide. I'll let you know when I've had a fiddle.
Caddy all the way!
Seconding Caddy. I've been using it for a couple of years now in an LXC and it's been very easy to setup, edit and run.
Traefik is a PITA.
Caddy all the way. If you build it with Docker support (or grab the prebuilt), you can use docker container names to reverse proxy using names instead of any IP addresses or ports. It's nice because if the IP updates, so does caddy. All automatically.
Here's what my caddyfile looks like;
{
acme_dns cloudflare {key}
}
domain.dev {
encode zstd gzip
root * /var/www/html/domain.dev/
php_fastcgi unix//run/php/php8.1-fpm.sock
tls {
dns cloudflare {key}
}
}
*.domain.dev {
encode zstd gzip
tls {
dns cloudflare {key}
}
@docker host docker.domain.dev
handle @docker {
encode zstd gzip
reverse_proxy {portainer}
}
@test host test.domain.dev
handle @test {
encode zstd gzip
reverse_proxy 127.0.0.1:10000
}
@images host i.domain.dev
handle @images {
encode zstd gzip
reverse_proxy 127.0.0.1:9002
}
@proxy host proxy.domain.dev
handle @proxy {
encode zstd gzip
reverse_proxy proxy
}
@portal host portal.domain.dev
handle @portal {
encode zstd gzip
reverse_proxy portal
}
@ping host ping.domain.dev
handle @ping {
encode zstd gzip
respond "pong!"
}
}
DNS hosted by cloudflare but because caddy handles ACME certs, all the subdomains automatically get SSL.
Actually I found traefik rather easy, I just had to make the proper docker labels and config.
PITA
Unrelated, I'm going to sound like a grammar nazi here, but holy shit there are so many acronmys, how am I supposed to know every one of them without googling? Please just say "traefik is a pain in the ass". Also please don't take this as a snarky reply.
PITA = pain in the ass.
I never said it was hard. Just a real pain in the ass. Like iptables vs UFW. They're the same thing, but one is easy and a pain in the ass and the other is just easy... So I opt to make my life easier. lol
I like NPM, it's simple, but also allows for more complex configs as well if needed. I run it in its own LXC because I have other non-dockerized things that are exposed.
I use Synology integrated reverse proxy, stupidly simple and always works for me (only if IPv6 doesn't fuck up itself, I can't fallback to IPv4 because that is CGNATED), if I am missing features that other options have I would like to know :)
I've looked at it but never actually given the Synology proxy a go despite using their DNS server. Does it do auto certificate renewal?
Have you considered using a Cloudflare tunnel to bypass the CGNAT? You can do that into a proxy or straight into the service.
Does it do auto certificate renewal?
Yes.
Have you considered using a Cloudflare tunnel to bypass the CGNAT?
I did before when I had some free domain over there, but I don't think there are any worthy free domains out there anymore, and even when they are cheap, I really don't need it and don't feel comfortable to pay for something that I can't use in its fullest (due to CGNAT).
For example, I am aware cloudflare tunnels can't be used for a Plex/Video streaming and that is the number 1 service that I want to be exposed to the Internet.
For now I am living with my IPv6 address and the Synology DDNS with the reverse proxy features... My personal fallback are Tailscale and Zerotier.
For a while now I've been using either haproxy or nginx depending on my needs. I've hit instances with both where the functionality I want is in the paid version.
Nginx from day one. Well documented, it works. If something doesn’t work chances are you are a quick googlefu away from the solution.
This the main reason I switched from traefik, I can have certificates on all my internal stuff and not just on my docker host. I personally love NPM but maybe I'll give NPMPlus a try, I have never heard of it.
Ok, stupid question from a stupid person: if I have a phone connected to a local WiFi network, and I type in the URL of a subdomain which points make to that same network ie a hosted service on a home server, what route does the data take from the service back to my phone?
Simple question but can be a complex answer. Basically it depends where your phone gets DNS from: if it's using the ISP DNS (or some other public DNS server) it will resolve the public internet IP of your server and the data will route out to the ISP WAN before being routed back in.
On the other hand you can configure a split DNS system, so say you are using your modem/gateway as your DNS server and it forwards DNS queries up to your ISP (or other) DNS server - a common setup, 1. you can add in a static host entry for your local server. Eg 'yourservice.yourserverdomain.com = 192.168.1.20 (your server's LAN IP)'
Now when your phone is on the WiFi and it looks up your server's address it gets the local IP and routes locally, which will be faster.
If you need more info, search for terms like 'reverse proxy split DNS best practice'.
Thanks!
Caddy. I started with npm but I realized it was hiding enough stuff that I wasn't learning anything about managing networking. Caddy is super easy and has lot of sane defaults.
same, i've been very happy with Caddy, even with lots of subdomains and weird configs it's been rock solid.
i use nginx proxy manager but im barely getting by. Theres zero useful documentation for setting up custom paths so everyone uses subdomains. I ended up buying my own domain just so i didnt feel guilty spamming freedns lmao.
At that point you might be better off just using Nginx without the gui. SWAG is a nice reverse proxy focused implementation of it.
I spent far too much on my domain (£3.86 for the year) to change course now!
You having a domain or not has no bearing on which of these you use lol
my laziness does though! ill keep that service in mind though :)
npm/npmplus
Stick with Traefik if you've figured it out. It's much more powerful than NPM in my opinion. If you insist on using NPM, you might want to try NPMPlus, it has more bells and whistles and is more actively maintained.
Yeah I'll stick with Traefik, I know how to use it
I'll throw in another recommendation for Caddy. I've been using it for years and the few problems/feature suggestions I had got implemented by the developers pretty quickly. They're super active on their forums and I haven't yet run into an issue where I couldn't either figure it out myself or with help from their community forums (usually from a dev.) They're very friendly and won't berate you for simple mistakes like other devs.
I use nginx for static websites and TLS passthrough servers.
I use traefik as a reverse proxy for sites with many services and SSO.
Nginx is definitely easier to configure for simple things. But I prefer traefik for more complex setups.
I've been mostly using Nginx Proxy Manager, but I recently set up Bunkerweb as a WAF for a couple of public services I'm hosting and I kind of like it. It does reverse proxy along with a bunch of other things (bad behavior blocking, geographic blocking, SSL cert handling, it does a lot).
Mentioning it because I didn't see any other mention of it yet.
NPM is easy to use. Caddy sounds like something I'd like to try too now.