Connecting multiple servers with dashdot/Reverse Proxying with nginx
Hello! Can I set Homarr to display stats about my unRaid server , cpu/ram/network/storage/ect?
I have three servers at my house running unRaid, I have installed Homarr on the server I have that runs all of my web apps and web server, can I install Homarr on the other two and link them together somehow? essentially allowing Homarr to display stats and info for all three?
I have three servers at my house running unRaid, I have installed Homarr on the server I have that runs all of my web apps and web server, can I install Homarr on the other two and link them together somehow? essentially allowing Homarr to display stats and info for all three?
206 Replies
Yes, you can do that using the Dash. widget. Due to the complexity and millions of possible hardware combinations, we use Dash. for it and didn't make our own solution.
Therefore, you'll have to setup Dash as well.
yes, i just found it, I'll get to working on that
alright, follow up question, ive got Dash. running on one of my servers, i can either point homarr to dash. via http://192.168.1.98 (internal static IP of the server running dash.) or use https, if I use https I cant get graphs to show up, if I use http then I cant get any of it to show up, is there something I can change from Homarr end, or is it an issue with Dash.?
Dash. is running http, but homarr is being reverse proxied with nginx and is running https
Websites, that run on HTTPS, do not allow any embeds with HTTP. Therefore, your site must have the same protocol as Homarr.
the rest of my dashboard appears to be working fine, running under https, I just cannot get my graphs to show up, how do I know if homarr is actually running https or if its just being made to https with nginx
Homarr itself does not support HTTPS due to a limitation of the framework in use. We'll eventually implement a workaround, but we haven't had the time for that yet.
You can check the protocol in your browser. The prefix indicates the protocol
its using https, so if i set nginx reverse proxy config back to HTTP only, it should be fine and I should get the graphs?
Yes
Or you can connect directly to Homarr.
Note that HTTP will not encrypt your traffic. Therefore, we highly encourage you to use HTTPS
I currently have very poor network connection. Sorry if any of my responses are delayed
no worries!
currently i have a subdomain pointing to my house, nginx then reverse proxies that subdomain to my homarr instance, which im then connecting to the dash. instance with
ive got https set with nginx and a certbot certificate, should I try removing that?
if I connect locally then I can view the graphs using http, but my goal here is to be able to view the graphs from outside of my network, i.e. at work or school
If you want them outside your network, proxy them like you do with Honarr
Or, you could not expose them at all and use a VPN with unencrypted HTTP
I use the second variant myself
true, so I would just reverse proxy the dash. instances with nginx as well?
Yes, that is one possible way of doing it
only reason I don't use a VPN is its blocked on computers at school, however my domains arent
Makes sense ๐
they have forced network settings, we cant change them except to connect to wifi networks at our houses lol
okay, thank you for your help! ill let you know if I have any other issues
Sure! No problem
Let me know if you need help
if I was able to use a vpn I wouldnt have to have monitoring available outside my house I would just use the unraid dashboard pages, but id wrather not expose the servers directly to the outside lol
also this looks cooler ๐
Even after you out both homarr and dash behind nginx you might get problems with the graphs, ir you use different subdomains on them, I had
no reason i cant use the same subdomains
Yes, I just pointed that because I used different ones
gotcha
I setup dash.domain and homarr.domain
If you don't do that you should be fine
Oh, that is not expected. Can you DM me a domain example?
Yes I can
Thanks.
Can you also open an issue on GitHub and tag me? As long as the Domain both are the same protocol, there should be no problem.
Yes I'll do it later ๐
@brunotco can you help me out with reverse proxying? i have dashboard.domain.us/romeo/ proxy passed to the interal ip and port of dashdot instance, but when i visit the url in my browser, it says "cannot GET /romeo/" and dashdot cant find the instance
I'll try ๐
This is inside Homarr right?
And this is on the browser at /romeo/
the first ss is my nginx reverse proxy config, the 2nd is in homarr, and the third is my browser
Ok
But you can get to dash. with ip:3001?
its reverse proxied so i dont have the port facing outward, lemme forward the port rq hang on
internally tho, yes i can
if i type in http://192.168.1.98:3001 i get my dashdot dashboard
Ok
and yes the same if i use my external ip
192.168.1.98 is your container IP or host IP?
thats the ip of the host running it
in this case, the unraid server
And the nginx is in the same host?
nginx is in a vm on a different server
the unraid server ^
Can you check if the VM can reach the .98 host?
sure one sec
all good
Hum...
yeah its stumping me, theoretically it should all work
That's so strange
Yeah xD
Can you see on the browser when accessing /romeo/ if you get any log on the develop window?
404 not found
interesting
On the proxypass to .98
Add / after port number
And try again
ight, back to where i started
ive got the storage and network text, no graphs
That's normal
XD
in console
ok, so how can I get the graphs to show up?
Go to the widget settings
in homarr or dashdot?
Homarr
ighty
The dash widget in homarr you named Romeo
Yes
there ya go
Storage open it
And uncheck the option of text compact
okay,
still no graphs are showing up tho
Can you print the widget now?
Hum I think the widget is there because of the blank space
should I forward those extra ports too?
or proxy i should say
But you're getting 404 errors
mhm
No problem not ports
the dashboard. domain as itself only forwards to the homarr instance running
the dashdot instance is another machine
if its trying to get a port from the dashdot instance for the graphs but it doesnt exist because its not being proxied back
I think it uses iframes so that's not the problem
Try this to check
On Homarr add a widget - iframe
ight
what should i use for the url?
Yes, it does use iframes
Your https://fullurl/romeo/?graphs=cpu
Sorry graph and not graphs
It should show you the CPU graph from dash.
blank white page
what dashdot shows:
on homarr:
I use it like that and have this
strange
Ok so it looks like it could be some kind of CORS problem or something...
On the browser logs any error?
Do me a favor go to Network tab
And refresh the browser
Than print it please
if i visit this in my browser heres the console for that
using graph tho not graphs
if thats any help
Yeah
Your getting 404 on the dash. requests
should i try to port forward dash. directly to outside and use that?
You can try it
Oh wait
Do you have internal DNS? Pointing your domain to the reverse proxy?
when i do that the graph boxes change to (external ip) sent an invalid response
domain is registered with cloudflare
lemme check
readacted my external ip but its just forwarding the domain
Ok I think the problem could be your Homarr container can't point the dashboar.domain to the reverseproxy
okay, but in homarr if i use my external ip and the dashdot port instead i get invalid response
With this what do you have in the browser logs?
Did you refresh Homarr after changed to external IP?
yes
it didnt safve hang on
i forgot to save it
Ok
Worked with external?
thats the iframe, and the same thing in the graphs
https://ip:port/?graphs=cpu
Does it give you the CPU graph?
invalid response
Change it to http
Instead of https
blank white
it doesnt like not being over https
Yeah it will not work with http it was just to test it out
sooo
You have to get it working with the proxy
yeaha
i can try dropping the dashboard page itself to http, dropping using certbot and all that stuff
Let's recap
okay
With /romeo/ you can access the dash. page right?
no, blank white screen
Oh I thought it was working
nah
And if you add info
i can get dashdot using the internal ip
or using the external ip
/romeo/info?
but not the fqdn
gives me that
Ok so it is reachable
Then why the hell you get that white screen at /romeo/? XD
this is interesting, connectiong to homarr using its internal ip, i can see the dashdot page
in the iframe
with the iframe set to the external ip and port of my house
but if i use the fqdn to access homarr, i get a white screen in the iframe
Yeah
is that expected?
Because your using dash with http so accessing homarr with ip gives you the graph
ah
i still couldnt connect to dashdot using the integration tho
The problem you're having is in dash. behind the reverse proxy
yeah
It's reachable because /info works
yeah
But for some reason the main page is not loading
yerp
In /romeo/ do you have any browser logs errors?
with or without the info
with the info, no errors
without the info, yes
Yeah some problem there
That's the errors you were getting on homarr
yeah
404 not found for some reason
is it something id have to change with dashdot?
I'm not really sure now ๐
lol its alright
If the problem is with the iframes
You could try what I did
Add to /romeo/ add Content Security Policy header
whats that?
ive got like very basic understanding of this stuff lol
But it's accessing directly to /romeo/ so don't think it would do much difference
You can try it
On nginx
what should i add to the cfg?
add_header Content-Security-Policy "frame-ancestors 'self' 'domain.com';";
Change the domain.com for your domain
And give it a try ๐
so add_header Content-Security-Policy "frame-ancestors 'self' 'dashboard.kinglego.us';";
?
if its located at dashboard.kinglego.us?
Yeah xD not really making much sense xD
It works for me because of the subdomains and I pass a subdomain there
yeah same errors
the tab changes to dash.
but still a blank white page
I'll try to see something about dashdot reverse proxy
kk
hers what i get from homar
๐ Dash. | Homarr Docs
The Dash. widget will integrate your existing Dash. instance into Homarr. The graphs will be integrated using iframe.
@brunotco thats all ive been able to find
i didnt even find anything on the dashdot page to suggest reverse proxy
I tried searching and also didn't find anything relevant on it
I can try to simulate your environment and see what happens
Ok so I kinda got the problem
the https://domain/romeo/ is ok but it gives 404 errors because it's trying to load resources from https://domain/assets and not https://domain/romeo/assets
Wait, I have to quickly ask here. I didn't read your conversation above, but are you trying to use Homarr at a path (eg. domain/homarr )?
no
Ah okay. Because Homarr is not compatible with subpaths
so, would putting dashdot behind its own subdomains work?
attempting to connect to dashdot using subpaths that are reverse proxied
because i cant just forward /domain/assets to the one dashdot instance because eventually im going to have multiple running
yes
and that is the problem
what I tested was accessing /romeo/
that points to dashdot
I get 404 errors
and one of them is
http://dash.test.local/assets/logo192.png
can't find this image, it's the dashdot tab icon
and it's normal because it's really inside /romeo/assets
so if i instead point it to something.domain.com instead of domain/something it would work?
and it's like you say, can't /assets to /romeo/assets cause if you get another that as assets in /assets you gonna have problems
yes
it's my setup
alrighty, and its gonna have to be a subdomain for each?
dash.domain.com and homarr.domain.com
gotcha
thanks!
for you
ill try that when i get the chance and let you know
you can have just a subdomain on dashdot
and leave homarr as it is
yep
instead of using domain.com/romeo use romeo.domain.com
try it and then give your feedback ๐
will do, im travelling today but ill have times to work on it, thanks so much!
no problem
in the meantime
I'm a little stubborn xD
I got it to work with the setup you wanted ๐
got it working on /dot/
and iframe shows on homarr
how
I added a rule on nginx
when you have a request that's from /dot/
that's the referer
rewrite the request to add /dot/
so the wrong request for domain/assets/icon is changed to domain/dot/assets/icon
basically all asked from inside /dot/ stays inside /dot/ and doesn't move to the / (root)
ah
okay
try it when you can
That seems to be working beautifully, thank you so much!
im gonna go ahead and start rolling it to other servers as well, ill let you know if i get any issues!
but thank you again, i know this is a strange case
@manicraft1001 is there a way some of this can be added to the docs on the homarr site? i can summarize what ive done here, i cant imagine im the only one who has this setup
Yes, absolutely. On each documentation page, there is an edit link at the bottom. Click on that and then edit the text. You need a GitHub account for that. Please add it to the Proxies & Certificates page ๐
Good work everyone here for the awesome collaboration
will do
Awesome. Thanks for finding out a solution
Let us know if you have questions with the documentation
We'll review the content once you submit a pull request.
That would be really awesome thank you so much
alrighty, got a chance to write out a draft real quick, what do yall think?
if yall think it looks good, ill add in the examples and submit the fork
or whatever its called idk i dont work with git much lol
Looks fine. Would be nice if you could do a PR for this, so we can see the full text
i will when I get the chance to add in examples
u didnt see that
I did ๐
Sadly, we have logs of deleted messages xD
shh
ugh
Anyhow, I don't mind lmao
Just do the pull request ๐
ill have to write the examples to
up*
@manicraft1001 sorry it took so long, ive had a bunch of stuff come up, but I just committed a pr (i think, never done it before) lmk if i need to update/modify it at all
GitHub
Comparing master...KingLego2006---Add-nginx-reverse-proxy-info-for-...
The documentation of Homarr. Contribute to KingLego2006/homarr-docs development by creating an account on GitHub.
Wow, I really appreciate that you didn't forget about it
Can you open a pull request to the Homarr Docs repository? I quickly glanced over it and it looked really good so far
Thanks โค๏ธ
GitHub
Update dashdot-widget.md by KingLego2006 ยท Pull Request #72 ยท ajnar...
Thank you for contributing to Homarr! So that your Pull Request can be handled effectively, please populate the following fields (delete sections that are not applicable)
Category
One of: Bugfix /...
did i do it correctly?