UNOFFICIAL/UNSUPPORTED Guide to using Inventree with Nginx Proxy Manager in Docker #9052
Replies: 3 comments 5 replies
-
|
Let’s be clear: we do not support proxy setups outside of the ones we provide. Running caddy is very efficient and ensures your instance does not break. We only test that setup and will not ensure this guide keeps working. |
Beta Was this translation helpful? Give feedback.
-
|
My question (and I suspect many others') is, how do I adapt these instructions or the official ones if I'm already running a standalone Nginx Proxy Manager? Do I really need this or the Caddy component in that case? |
Beta Was this translation helpful? Give feedback.
-
|
This guide was written for Docker and I don't know how the install script differs from the Docker install. I'm also not an expert with Nginx or Linux, just someone who works in IT and got this to work with a bit of trial and error. However, I can see at least one potential issue with your install. In my Docker configuration above, NPM has access to the media and static files of Inventree as it mounts them via a Docker volume. If you are running NPM on a different host to Inventree, have you mounted those folders on that host so it can access the files? I also notice you haven't said if you have added a custom location of |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've seen a few requests from people asking about using Nginx Poxy Manager (NPM) rather than the supplied proxy when running Inventree in Docker. Which is understandable, as running another proxy seems unnecessary, and a proxy in front of another proxy is just another layer of complication (although it does appear to work).
Warning
This is NOT a solution supported by the developers, and if you have issues with it, please DO NOT ask them for support.
Ask for support on this discussion and I or someone else may be able to help.
Now the disclaimer is out of the way, below is a guide on how to make it all work, and when I say work, I mean it seems to be working for me, but I'm not an Nginx expert so YMMV. If nothing else, this may provide some inspiration or guidance.
Prerequisites
inventree-servercontainerNPM Compose Modifications
The Inventree Proxy doesn't just proxy requests to the Inventree Server, it also serves static files. Therefore, you need to add a volume to the NPM Compose file so that NPM can be configured to serve the files.
Add a line under the
volumessection to mount the Inventree data files inside NPM:The example above maps
/docker/inventreeon the host to/inventree-datain the NPM container. Note that host path is the same as the Inventree environment variableINVENTREE_EXT_VOLUME. If you change the location of the Inventree data inside the NPM container, you will have to modify the NPM advanced configuration shown later.Inventree Compose Modifications
Comment out all of the
inventree-proxysections:Configure NPM
Create a new proxy in NPM.
Details Tab
httpwith a forward hostname ofinventree-serveron a port of8000WebsocketsCustom locations Tab
/that forwards to a scheme ofhttpwith a forward hostname ofinventree-serveron a port of8000Note: The Inventree Nginx config has other headers set, but NPM provides that config by default so it isn't required.
SSL Tab
Force SSLAdvanced Tab
Beta Was this translation helpful? Give feedback.
All reactions