SOLVED: Amahi DHCP and DNS, and do I even need it?

nixel
Posts: 26
Joined: Sat Oct 22, 2016 10:19 am

SOLVED: Amahi DHCP and DNS, and do I even need it?

Postby nixel » Sun Oct 23, 2016 12:20 pm

Okay, I've read these:

https://www.amahi.org/faq/is-dhcp-server-required
viewtopic.php?t=1446
https://www.amahi.org/faq/can-i-disable ... -amahi-hda

And I even installed Amahi (Fedora 23, and I guess Amahi 9, the latest available) , and checked a few things. File sharing works, web UI works, Fedora 24 works... But I noticed that it was clearly messing up with my network setup, then I read that I have to turn off my router's DHCP... Or turn of Amahi's DHCP but then there are limitations... So this brought me to this topic.

I have some questions. And things to clarify.

First of all, what I want to use my NAS\Amahi\Home Server for:
  • File sharing. I want it just to sit there, and I want to be able to browse to it from other Windows, Linux machines and preferably Android\Windows phones and tablets. Ideally I want to just browse through Network. Right now I have an HDD attached to my ASUS AC66-U Router, and it's enough in terms of how I use it. I just want a much bigger and faster space than a USB drive, and a RAID for data protection, to securely store a lot of data there, including both work stuff and family archive and media. Being able to access it from the net like a cloud is nice too, but not required. If required I can write a simple online file browser with python and flask.
  • Home assistant server, HASS + Voice Assistant. I plan to integrate some smart home solutions, using python Home-Assistant running from Raspberry Pi, and I want to use this Amahi server (or not amahi :) ) to run my own voice assistant. Sort of like Amazon Echo, but of my own development, with internal processing of commands, some of which require more horsepower for faster replies than Raspberry can provide. From simple commands of contacting HomeAssistant to turn lights on and off, turning and browsing music with voice, to searching and downloading books by their names, generating charts of some stuff, tracking faces from a few video cams... 
  • SVN, Perforce server. I have a few projects, and I need to run SVN or Perforce server for them, for me and a team of a few people. 
  • Music server. The voice assistant UI is web based, it sends commands to the flask server, python code processes it and does something. In this case - turning on\off music. It would be nice to run some music server, which could either turn music from the server's own speakers (thus - some main speakers connected to it), or stream music through a web-player or DLNA to other devices. Actually I think DLNA could be better... Or making it like a local online radio, streaming same music simultaneously on multiple devices, to allow to have same music in different rooms, by just turning the local player on\off..
  • Movie server. Nothing fancy for this, just network-access to video files from VLC or something is enough.
I don't need a 'pretty' name for it. It's just a server for a small family, we can remember the required internal ip address, and I can also just make a redirection from my site's sub domain to external ip, thats quite enough for me. 
 
Now, the server is pretty big itself, it can overheat and make it's fan go really loud, right now I don't want to spend a lot of money on some silent solution. I want to be able to safely turn server machine on and off at any time, I don't necessarily need it to run 24\7, thus I don't want to move all DHCP serving on it. I want to let my router do what it does best - being a router, it's a fairly good one, ASUS AC66-U, so far it's working perfectly for quite a lot of devices.  And replacing small silent router with a huge (comparatively, it's just an old ATX size desktop PC) loud Amahi server... Well, does not sound good to me either way.

So, what features will I lose if I turn off DHCP? What about DNS?

And the main question is: taking everything above in account, it's required functionality and desire to turn off Amahi's DHCP and DNS - would there really be any benefit from using Amahi over just installing Fedora or Ubuntu (since HASS will run from Raspbian, which is also Debian, I think Ubuntu might also be a better choice here, I think...), and installing Samba, some cloud sharing server, some music\DLNA server and library (Mopidy or something), etc.

Thank you very much, I really hope to get an answer here, and I'm sorry if there is too much information, or if it's all available somewhere. I was browsing Amahi's site and wiki for a few days now, and most of the detail I need are very vague or scattered. I do have some experience with Linux, but I'm only starting to work with it. But I'm fairly good with Python, and I am actually interested in learning a bit more (but not going hacker-crazy, it think) about Linux and how it works. So I am actually not even scared about setting up my own servers, so far Amahi looks more like a blackbox to me, and with such home server I don't really want a black box, i'd just buy some prebuilt NAS in that case...

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Amahi DHCP and DNS, and do I even need it?

Postby cpg » Sun Oct 23, 2016 12:51 pm

Well, that is a lot of text. The very FAQ question you link to answers the tradeoffs in not having DHCP or DNS. It comes down to understanding what DNS and DHCP do.

DNS maps names in the network like "hda" or "mysqladmin" to an IP and that helps when having even a couple of webapps. You can achieve that mapping with some other DNS server, just not automatically upon installing new apps (Amahi does that for you), so you would have to update your DNS server (or local DNS mapping, if you know what that is) by hand. Search for tutorials about DNS to learn more.

The Amahi DHCP server hands networking leases with the DNS server for Amahi already set automatically in them. You can do similarly with other DHCP servers if you configure them by hand once. The tradeoffs are listed in the second point in the faq item. Amahi also can provide automatic netbooting with some apps. That would not work without it enabled. If you disable DHCP, it helps to keep DNS still running in Amahi (and does not interfere with anything, in fact it helps to resolve names internally in the HDA). Again, search for DHCP tutorials to understand what it does.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

nixel
Posts: 26
Joined: Sat Oct 22, 2016 10:19 am

Re: Amahi DHCP and DNS, and do I even need it?

Postby nixel » Sun Oct 23, 2016 2:03 pm

Thanks for the answer, and sorry again for a wall of text. I'm just trying to wrap my head around some things, and thought that the more info I give, the easier it would be to understand my question. I will read about DHCP and DNS more as soon as I can. In the mean time, a few more quick (this time) questions :)

Anyway it all comes down to me not being able or wanting to run the Amahi server up 24/7. Do I understand correctly, that if it goes down, I lose connection with other PCs or new wi fi connections can't be established until router picks up DHCP managing? Or am I imagining things?

If I turn off DHCP and\or DNS in Amahi, will I still be able to use Amahi as an easy way to setup the things listed in the first post: files sharing, music server, media library, svn, etc?

I am worried because of this note: 

  1. No change in DHCP or DNS in your router: You can use the desktop in your HDA and do most every features on your Amahi HDA, as the HDA will use its own DNS server. Other machines in the network will not take advantage of most features in the the Amahi HDA. They will probably see the file server in the HDA, though it may only be accessible with an IP address, not a name. The AmahiiTunes server and UPnP server may be visible to clients, however, this is not tested/supported.
The 'probably' and 'only with an IP address' does not sound good.

Many thanks again.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Amahi DHCP and DNS, and do I even need it?

Postby cpg » Sun Oct 23, 2016 3:31 pm

We don't have the means or staff to check every possible client device/os. Samba _should_ work without DNS, at least on windows (because it has its own name service), but maybe other devices need it. There are thousands of apps (Kodi, etc.) that may or may not work with file service without DNS.

As I said, only turn off DHCP. Do not turn off DNS, as that is used internally and some things may stop working well without it being on. It does not affect the network if left on.

If your HDA is turned off while DHCP (and/or DNS) is used, the internet may appear in accessible (depending on what configuration you have in your clients, strictly speaking), then all you have to do is turn on the DHCP in your router. I do that every so often, so I have a bookmark for the router page that enables/disables DHCP.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

nixel
Posts: 26
Joined: Sat Oct 22, 2016 10:19 am

Re: Amahi DHCP and DNS, and do I even need it?

Postby nixel » Sun Oct 23, 2016 3:43 pm

Thanks again, that cleared some things.
I'll give Amahi without DHCP but with DNS a try then. I'd like Ubuntu version, that'd give me some consistency with Raspian, but thats fine  :D

Yes, I tried to launch it with DHCP working on my router and Amahi, it was a bit of a mess, internet just turned off after a while. Then I turned off Amahi PC and had to restart the router for it to pick things up again.  Turning it on and off, well, I can do that, but I don't want to spend time on it, or teach my wife how to do it. 

And yes, I was still going to use Samba even if without Amahi. Unless there is a better solution...

Thanks.

nixel
Posts: 26
Joined: Sat Oct 22, 2016 10:19 am

Re: Amahi DHCP and DNS, and do I even need it?

Postby nixel » Tue Oct 25, 2016 11:01 am

Well, right now test-driving the setup, turned off DHCP and pointed router to hda as DNS server. I had to restart router twice and once the Amahi machine. But seems to be working now. Local domain names work, internet works, testing other things...

Still can't leave my DIY NAS running 24\7, yet at least... 

But all that said, I think this theme can be marked as solved, not sure how to do this.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Amahi DHCP and DNS, and do I even need it?

Postby bigfoot65 » Tue Oct 25, 2016 3:59 pm

Glad to hear all is working.

I will mark this one as closed.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 9 guests