NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
22.17k stars 2.55k forks source link

Openwrt support #2337

Open TheRealGramdalf opened 1 year ago

TheRealGramdalf commented 1 year ago

Is your feature request related to a problem? Please describe. Running NPM in docker requires additional overhead, making it nigh impossible to run on embedded devices (in this case a consumer router).

Describe the solution you'd like This will most likely be fixed with v3.

Describe alternatives you've considered Compiling binaries from source for an armv7 device based on this script

Additional context For various reasons, I would like to run my reverse proxy directly on my edge router. The main two are that NPM can handle things directly, as opposed to being behind a firewall, the second being uptime. If NPM is running on the router, 404 pages would still function if the server goes down, as the proxy is typically deployed on the same server as the services (at least in my case, which is for homelab usage).

What I would enjoy is pretty simple. When v3 is released, I request that it be added to opkg, OpenWRT's package manager. As an additional bonus, specifying a location for all the program files would be ideal. A simple way, at install, to install to a secondary location of the users choosing. This should probably be the default unless the entire package is under 10mb.

The way I would implement this is by having the package install a script rather than the package itself, the purpose of the script being to upgrade the actual package (by replacing the script each time the package is upgraded, just with a new version number. After installation/upgrade, the script would run, check if the version that is actually installed is older, and if so, update it).

Another bonus to have would be the UCI system. Stands for unified configuration interface. from what I know, it should be pretty simple to expose some key values (such as listen ip/interface, http/https/webui port, etc) to UCI. If you wanted to go one step further, you could even add an app for LUCI (the UCI GUI).

I would like to end off with an offer of help. While I'm not the greatest at developing from scratch, I feel fairly confident that I could help build and/or maintain the things regarding OpenWRT.

Oh, one last thing: is there a beta/newsletter/place to get updates on the progress of v3? I'd be intrested in testing the alpha/beta myself.

TheRealGramdalf commented 1 year ago

Related links:

https://openwrt.org/docs/guide-developer/start << quick start guide for development https://openwrt.org/tag/development << development FAQ https://openwrt.org/docs/guide-developer/toolchain/using_the_sdk << Development tools

the1ts commented 1 year ago

At the moment, my nginxproxymanager container is using 350MiB of memory, (docker stat), a very tight fit for a router. Its not surprising as it has nginx, nodejs running 24x7, both of which are not developed with embedded scenarios specifically in mind. This is why openwrt uses lighthttpd last I looked (half a decade ago). Also of note, I have a nginx only container, that runs at 24MiB, there is nothing stopping people using some method to clone the nginx and ssl config from NPM and allowing just nginx to run that in a much smaller footprint. Even http renewals could work since certbot just polls letsencrypt to see if they have successfully got the secret from the webserver.

TheRealGramdalf commented 1 year ago

Yeah, I know what you mean. That's what I meant about looking at the script to clone the config.

Again, I believe this will be fixed in v3, since it no longer requires nodejs. That's kind of the whole point of v3- to make a single, static binary that is able to run in many more locations than just docker.

github-actions[bot] commented 7 months ago

Issue is now considered stale. If you want to keep it open, please comment :+1: