How to make the user interface reachable within the home network without Internet access?

, , ,

My YunoHost server:

Hardware: Newer x86 machine
YunoHost version: 4.1.5 (stable).
I have access to my server : Yes
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : No, I use the yunohost dyndns service

Why is only the admin but not the user interface reachable within the home network as soon as the provider puts me offline? That means: Can I change my system so that without internet access I’m able to use the apps installed locally?

To clarify what you’re saying…

When your internet is down, you can only reach the admin interface of Yunohost, not the user SSO?

ie. not working, but is working

I know I made my installation work better on the local network by defining my Yunohost server’s IP address in my hosts file (/etc/hosts).

1 Like

Thanks for your reply.

  1. Yes

  2. I guess yes but haven’t tried that, should I to clarify?

  3. Thats beyond my IT knowledge - but it sounds like a possible solution. Should I add the local IP adress of the server in a specific file?

Yes, indeed.

Yunohost (or actually, nginx, the webserver) will recognize what address you typed in the address bar of your browser, and bring you to the right website.

If the address is not recognized or it is an IP, you will be sent to the admin page.

Normally your computer will use DNS to lookup the name associated with an IP address. Without active internet, the external DNS is not available and no IP is returned when you type the name of your site. When you use the IP instead, you’ll end up on the admin site.

The workaround suggested by @arkadi is to let your computer know the IP address associated with a hostname in the ‘oldfashioned’ way, with a hosts file.

Depending on the operating system on your computer/telephone, the hosts file can be found on one or another location. In Linux it is in /etc/hosts, for Android, Windows or Apple you’d have to look it up on the internet.

In the file you have to enter the IP of your server (the local IP, usually starting with 192…) and the domain name as you created in Yunohost.


I added at the end of my hosts file (on the x86 machine where yunohost is installed) the following:

“local-ip of the machine” (without the quotes of course)

on the next line:” (without the quotes of course)

rebooted the system, unconnected the internet.

No access from another machine via local IP to the SSO.

What do I do wrong?

EDIT: I changed it, so that all is on one line:
“local-ip of the machine” “” (without the quotes of course)
Now it works

EDIT 2: No, still doesn’t work. It only loaded the SSO login page once from the cache.

Or do I have to add this on the machines I want to access the server from?

Edit: No, that doesn’t seem to be the problem

Edit2: Tried it first on an Android device which not worked, after the next post I tried it on a linux computer and it worked.

Yes, indeed :slight_smile:

So, if you’re using a browser on your laptop, and your server is on a Raspberry Pi for example, than you have to change the hosts file on your laptop.

For myself I have commented out my domain (with #), so that I can easily change the file when I need to access the server. The file on my desktop looks like:

$ cat /etc/hosts       localhost.localdomain localhost

When I made a mistake with DNS (for example), and I can not reach the server at that moment, I can enable that line on my desktop. After that I type the normal address of the website in my browser, the computer sends it (via the hosts file) to the right address, the browser gives the name of the website to the server, and the server recognizes the address and gives the right website.

1 Like

Thanks for your support!

I don’t always I get the support here for my level of IT knowledge.

Edit: I tried to send this message personally, but it asked for a “language_tag” when writing a personal message which was not available to add - so excuse me for the offtopic words here.

1 Like

It works now? Great!

Thank you for your kind words, glad I could help you :slight_smile:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.