I’m using a VM running yunohost at home besides my yunohost server.
I have set up a fake domain called ‘home.up’ in the yunohost administration.
In all my computers and smartphones I added a line to the hosts file like this
192.168.1.200 home.up
And I have added a subdomain ‘r.home.up’ to the domains of yunohost and added another line to the hosts file
192.168.1.200 r.home.up
It’s working.
You can test it.
Yunohost already includes a dnsmasq, that can be used as a DNS resolver.
If you plug an antenna on your server, you can install hotspot_ynh and the local resolver will be used on this wifi. You might need to run yunohost tools regenconf dnsmasq after plugging the antenna.
If you want to access the resolver through ethernet, you should add interface=eth0 (or the good interface name) to /etc/dnsmasq.conf and open the firewall on 53 port. BE SURE TO NOT OPEN 53 ON YOUR ROUTER. WIth this technique you can next configure this resolver (the ip of your server, to make your router distribute it with DHCP. Howevere, if your server is broken, your domain name resolution will be broken on all your network.
In /etc/dnsmasq.d/ all the domain you added to yunohost should be correctly configured.
Note: with this setup you won’t be able to generate Let’s Encrypt certificate thanks to yunohost.