setup homarr with nginx
hi everyone newbie here on deploying homarr....
i deployed homarr with docker compose as told on the guide but i want to use homarr with nginx can someone guide me how to do it ?
thanks in advance
73 Replies
Hello,
@amirulandalib .
First off, we need some context what you want to do.
We can't help you if we don't know your goal.
Can you explain it to us? (example: I want to expose Homarr to XYZ using XYZ)
sure
i want to expose homarr to the domain radarr.amirulandalib.eu.org
by default i am running homarr on docker on port 4426
now it is 0.0.0.0:4426
In this case, you only need a simple proxy host with certificate then
Setup with Homarr will be no different compared to your other services
huh?
i want to configure nginx with homarr and other apps which will be redirected with homarr and ask for authentication
eg:
homarr.amirulandalib.eu.org/qbittorrent/
homarr.amirulandalib.eu.org/plex
homarr.amirulandalib.eu.org/radarr
etc
i can manage certificate
but how to configure with nginx if you kindly guide me
nginx currently running on port 80
But you didn't tell me that before ๐
If you want authentication, you can either use the password environment variable of Homarr or use an authentication proxy like Authelia
So you want me to tell you, how you need to configure your proxy, so you can host your Homarr unrelated apps?
no no
how to configure like this
.
the homepage is homarr.amirulandalib.eu.org
other apps from the dashboard when tapped on eg qbittorrent will go to homarr.amirulandalib.eu.org/qbittorrent
Ok. So when
homarr.amirulandalib.eu.org
is already going to Homarr, then you need to overwrite your desired routes.
Example:
So homarr.amirulandalib.eu.org/qbittorrent
will trigger the location selector and homarr.amirulandalib.eu.org/plex
will trigger the second selectorbut how to put homarr to the config
i just told you my plan but dont know how to put it to conf
If
homarr.amirulandalib.eu.org
should go to Homarr, then your location is /
Example:
i have to port local server ip and port
for redirection
i can share you ssh conn
No. Never do that
need help dude
i suffered a lot from swizzin
You seem to lack general knowledge about reverse proxies.
I'd recommend you to read a guide for initial configuration.
I think you're asking for
proxy_pass
, but I'm not sure.
Also note, that authentication will make your setup more complex and requires some additional knowledge
You can use proxy_pass like this: proxy_pass 192.168.5.XXX
http://150.136.251.212:8081/ (currently it is like this)
Then you need
proxy_pass http://150.136.251.212:8081/
something like this
GitHub
reverse-proxy-confs/dashy.subdomain.conf.sample at master ยท linuxse...
These confs are pulled into our SWAG image: https://github.com/linuxserver/docker-swag - reverse-proxy-confs/dashy.subdomain.conf.sample at master ยท linuxserver/reverse-proxy-confs
@manicraft1001
If we go of this configuration, you simply add
something like this for homarr
.
Yes. I saw your link
If you look at the configuration there, it is even documented what I just told you
what about asking for basic auth credentials when directly accessing
There is even configuration for Authelia
Look at the config you sent me 2 minutes ago. Basic Auth is already present there for other routes
this is copypasted from swizzin docs
i dont have much knowledge about nginx
Restricting Access with HTTP Basic Authentication
Control access using HTTP Basic authentication, and optionally in combination with IP address-based access control.
It is clearly documented there with easy and quick explanation what you need to do
Instead of doing it for
/api
though, do it for /
i still dont get it ๐ฆ
sorry
1st step is to configure to route 0.0.0.0:8081 to homarr.amirulandalib.eu.org with nginx
What do you not get?
Creating a file doesn't seem like a hard task
to which dir
?
Whatever dir you like. The file will simply store your credentials
If you use docker, it's advised that you use a mounted directory - otherwise, you'll loose your passwords after a restart
not docker
Then, simply create it where you normally create such files?
aight
let me try
You seem to lack quite basic knowledge about some important stuff. Perhaps it would make sense to choose a more basic and easy approach?
Running nginx directly can be quite demanding. Have you heard of https://nginxproxymanager.com/ ? It uses nginx under the hood but it offers a comprehensive web interface for configuration and is much easier to use, if you don't know nginx.
Nginx Proxy Manager
Docker container and built in Web Application for managing Nginx proxy hosts with a simple, powerful interface, providing free SSL support via Let's Encrypt
It is important to understand what's going on and how your actions affect your system. Nginx can have a steep learning curve for some and maybe this would be better for you?
thanks
btw, this is an example config for what you've requested:
I hope this clears it up a bit. I highly recommend you to watch / read a few basic tutorials about Nginx so you understand what's going on.
thanks a lot
for now i exposed the ip http://150.136.251.212:8081/ but it will be then it will redirect to http://150.136.251.212 right?
then i will add A name to cloudflares connected domain
and use letsencrypt
If Homarr is running on the same machine as Nginx and runs on port
8081
, yes.yep same machine
shall i remove nginx from local
local?
yes
apt remove nginx -y ?
then run the nginx manager on docker compose?
Uhmm
I'm not sure about removing Nginx
ok lemme test
Just adhere to the documentation
There should be an uninstallation guide as well
Yes, sounds good
ok
@manicraft1001 u there?
Yes?
i am having a small prob
it doesnt work
tried the followings
bruh
i am tired
- Your IP is probably incorrect. You told me that Homarr is running on http://150.136.251.212:8081/ but you have an entire different subnet there.
- I'm not sure how Nginx Proxy Manager will react to IPs in your "Domain names" field. I'd recommend to do some research there
that is external public ip
i am using interal ip
Bad Gateway
generally means, that the proxy cannot proxy your request to the target, because the target is either invalid or rejects your request
You need to figure this out yourself. This has nothing to do anymore with Homarr ๐
Just don't give up. Networking can often be quite tiring but it will be worth the effort!bruh
how many ips will i try
0.0.0.0 localhost internal ip 127.0.0.1 whatelse?
You probably should avoid 127.0.0.1
I don't know Oracle - I never had good experience with their products
Are you using virtual networks?
its nothing to do with oracle
vcn?
Probably not. I'm just saying that I have no experience with it lol
since its a docker to docker app
help plsssss
lol
even tried nmap and tuln
same shit
ports and open and working
I told you already, that I will not help you with networking. For a proper investigation, there is too much context missing. Please try to investigate the problem yourself.
This server only focuses on support for our product - Homarr. If you have any questions about proxies, that relate with Homarr, I'll do my best to help you out.
anyone pro here?
lol what a funny thing
?
this was hard to find atleast
works now
it looks for docker names to connect to ports
lmao
Yes, this works as long as Docker runs on the same machine as the proxy
is this ok @manicraft1001
How should I know??
i mean for routing through i will use this option right?