With the hardware sorted (bar some jiggery-pokery to get the ODD to SSD bay converter to fit properly), I set about deciding what I want this box to do.
The list I came up with looks like this:
- Media serving to my Kodi devices (2 Raspberry Pi systems, my android tablet, and a new Ubuntu PC Iâ€™m putting together for retro gaming with my kids)
- FTP â€“ I like to use my NAS like my own personal cloud. My tablet can mount an FTP in its file browser just like any other folder. No sFTP support, though, unfortunately (and I donâ€™t like any of the file browsers I tried which do).
- Transmission (or Deluge) â€“ the main reason for swapping the 4GB of RAM out for 16GB
- SSH (obviously!)
- Dropbox and Google Drive â€“ for when various apps and things integrate well with these mobile apps.
- Backup â€“ the WD My Cloud EX4â€™s backup options are very poor.
- General file sharing with Windows and Ubuntu â€“ Samba & NFS, naturally.
- Hosting & tinkering with other bits I might want to try & learn about â€“ a website (for practise, not for public viewing), a gitâ€¦ who knows.
Being basically completely unfamiliar with most of this stuff, I was undecided between Ubuntu Desktop or Server for quite a while. Desktop obviously just has so much of this stuff already ready to go, it mounts things automatically, I can use the GUI as a fallback if something isnâ€™t right, its just more like what Iâ€™m accustomed to. On the other hand, having the GUI running all the time will just use up unnecessary RAMÂ â€“ granted I probably donâ€™t have a shortage of that, but stillâ€¦
In the end I installed both onto VMs on my Windows machine, made copies (so I had a clean version always ready to go without having to reinstall again), and started playing.
First up I wanted to sort how I was going to deal with my media backend. On my current setup I use the Kodi client on one of my PCs to manage a central SQL database. While it works, its a bit slow and rather inneficient, so I went looking for either a headless Kodi backend, or just a way to run it without the GUI. I found all sorts of ideas, builds and code , none of which I understand or feel like I could implement. After a discussion with a linux guru (one of my Uni lecturers) it was clear that my plan was probably not going to work; he had pointed out that he just runs his on DLNA, and that Plex seems to be quite good too. More research, and a question in /r/Kodi later, I had been pointed in the direction of Emby, a backend for Kodi without many of the limitations of Plex and DLNA. Installation was simple enough, but accessing the Web UI wasnâ€™t. When I had setup the VMs I had just left their network settings as NAT; this, it turns out, makes accessing the network from the VM possible, but not accessing the VM from elsewhere on the network (includingother VMs on the same system). I did try to just change the settings in the VM to add a bridged adapter, but it didnâ€™t work. Not knowing enough about networking on linux to fix this, I just went ahead and reinstalled, this time setting up the VM with two network adapters â€“ one NAT and another bridged. This worked a treat, and after adding a few media files and installing Kodi on the Desktop VM, I was able to play videos no problem.
Next, for no particular reason, was getting NFS working. I found guides, forums, blogs etc (my Google-fu is pretty strong) and set about trying. I was sure it should be working, Iâ€™d installed nfs-kernel-server, added the entry into /etc/exports, setup the permissions, but I just couldnâ€™t mount it in the Desktop VM â€“ even though I could watch them through Kodi. I ended up having to ask Redditâ€™s linux4noobs sub. Simple answerâ€¦ sudo /etc/init.d/nfs-kernel-server start â€¦ and instantly it mounted no problem. Turns out that Kodi was actually watching a transcoded stream from Emby, until I had NFS working. Thankfully Samba took less time and hassle to get working (surprisingly), and pretty soon I could access files across both linux and Windows. And there was much rejoycing.
At this point I was getting impatient (plus this microserver is taking up a chunk of space on my desk where I really ought to be doing uni work), so I quickly checked I knew how to setup a static IP, and turned my attention to the real thing.
Booting up The Box
Installing, reinstalling and shenanigans