H
Homarrโ€ข2y ago
Deleted User

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
Manicraft1001
Manicraft1001โ€ข2y ago
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)
Deleted User
Deleted Userโ€ข2y ago
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
Manicraft1001
Manicraft1001โ€ข2y ago
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
Deleted User
Deleted Userโ€ข2y ago
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
Manicraft1001
Manicraft1001โ€ข2y ago
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?
Deleted User
Deleted Userโ€ข2y ago
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
Manicraft1001
Manicraft1001โ€ข2y ago
Ok. So when homarr.amirulandalib.eu.org is already going to Homarr, then you need to overwrite your desired routes. Example:
server {
...
location /qbittorrent {
...
}
location /plex {
...
}
}
server {
...
location /qbittorrent {
...
}
location /plex {
...
}
}
So homarr.amirulandalib.eu.org/qbittorrent will trigger the location selector and homarr.amirulandalib.eu.org/plex will trigger the second selector
Deleted User
Deleted Userโ€ข2y ago
but how to put homarr to the config i just told you my plan but dont know how to put it to conf
Manicraft1001
Manicraft1001โ€ข2y ago
If homarr.amirulandalib.eu.org should go to Homarr, then your location is / Example:
// this is your Homarr
location / {

}
// this is your Homarr
location / {

}
Deleted User
Deleted Userโ€ข2y ago
i have to port local server ip and port for redirection i can share you ssh conn
Manicraft1001
Manicraft1001โ€ข2y ago
No. Never do that
Deleted User
Deleted Userโ€ข2y ago
need help dude i suffered a lot from swizzin
Manicraft1001
Manicraft1001โ€ข2y ago
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
Deleted User
Deleted Userโ€ข2y ago
http://150.136.251.212:8081/ (currently it is like this)
sudo nano /etc/nginx/apps/qbittorrent-vpn.conf
# /etc/nginx/apps/qbittorrent-vpn.conf

location /qbittorrentvpn {
return 301 /qbittorrentvpn/;
}

location /qbittorrentvpn/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
http2_push_preload on; # Enable http2 push
auth_basic "What's the password?";
auth_basic_user_file /etc/htpasswd.d/htpasswd.yourusername;
rewrite ^/qbittorrentvpn/(.*) /$1 break;
proxy_cookie_path / "/qbittorrentvpn/; Secure";
}
sudo nano /etc/nginx/apps/qbittorrent-vpn.conf
# /etc/nginx/apps/qbittorrent-vpn.conf

location /qbittorrentvpn {
return 301 /qbittorrentvpn/;
}

location /qbittorrentvpn/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
http2_push_preload on; # Enable http2 push
auth_basic "What's the password?";
auth_basic_user_file /etc/htpasswd.d/htpasswd.yourusername;
rewrite ^/qbittorrentvpn/(.*) /$1 break;
proxy_cookie_path / "/qbittorrentvpn/; Secure";
}
Manicraft1001
Manicraft1001โ€ข2y ago
Then you need proxy_pass http://150.136.251.212:8081/
Want results from more Discord servers?
Add your server