💾 Archived View for hari.smol.pub › every-guide-reverse-proxies-openmediavault-overkill captured on 2023-12-28 at 15:06:32. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Every guide about setting up reverse proxies with OpenMediaVault is overkill

If you search "reverse proxy" and "openmediavault" and "nginx" you're going to get blog post after blog post about how you need to spin up an nginx docker, change the ports that OMV listens on, set up Let's Encrypt, etc.

They're all overkill

Most people do not need their home server accesible from outside their home network (it's a bad idea! Most of you are _not_ going to secure your network enough to justify it!). That means Let's Encrypt is a waste of your time, just self-sign.

I'm running out of stema already, so here's the gist of it: OMV already has an nginx server. Yes, its config files are automatically generated -- but they have a wildcard include that we can take advantage of.

Without further ado, this is the tl;dr: create a file named `reverse-proxy.conf` in `/etc/nginx/openmediavault-webgui.d/` on your OMV server. Enter the `location` contexts for each of your servers.

For example, this is what my `/etc/nginx/openmediavault-webgui.d/reverse-proxy.conf` looks like:

location /portainer/ {
    proxy_pass http://127.0.0.1:9000/;
}

location /plex/ {
    proxy_buffering off;
    proxy_pass http://127.0.0.1:32400/web/;
    proxy_set_header X-Script-Name /plex;
}

location /shoko/ {
    proxy_pass http://127.0.0.1:8111/webui/;
}

location /calibre/ {
    proxy_pass http://127.0.0.1:8083/;
    proxy_set_header X-Script-Name /calibre;
}

That's it. One file needed. No changes needed in the OMV settings, omv remains the base of your system. Generate a self-signed cert in OMV's Certificates section, enable SSL, and you're finished. I'll write up more detailed instructions later this week.

Maybe I've missed something, but this seems to be, by far, the most graceful way to manage a reverse proxy in OpenMediaVault. Let me know if I'm a fool and have set up a timebomb.

[ Home page ]