Help configuring out file server + HTPC (Kodi)

lehtv

Elite Member
Dec 8, 2010
11,900
74
91
Here's what I want to do: set up an Ubuntu HTPC with Kodi, doubling as a NAS or file server. Need advice from someone who's done sth like this.

The biggest unknowns for me:
1. is it possible to have it function as a server not just for media files, but any files? I know Kodi can do media server, but I want to use it for backup or random storage too.
2. file server needs to be simple to access from Windows 7 and 10 (possibly from Android as well; not a priority). I guess OSX compatibility is pretty much guaranteed since it's Unix
3. easy/hard? Never done something like this before
4. should I use Kodibuntu or just Ubuntu and install Kodi on top of that?

Would FreeNAS work with Kodi?

It'd be powered on 24/7. Ideally, it'd be just standing by for HTPC duties whenever needed, with the file server running in the background. The less I have to manage things after setting it up, the better. For instance, it'd be nice to have transferred media files automatically added to Kodi's library.

I don't want to have to install Kodi on other devices, I just want to be able to transfer whatever files I want to/from the network storage. Possible?

p.s. Hardware will be Pentium G4400, B150 board, 4GB DDR4, 120GB SSD, some storage drive(s).

Thanks :thumbsup:
 
Last edited:

LoveMachine

Senior member
May 8, 2012
491
3
81
I'm not a NAS/Linux expert by any means, but I'm doing what you are describing with my setup. I have an i3 Chromebox running KodiBuntu (HugeGreenBug's modified version better suited to the Chromebox), updated the kernel to 4.4.1, installed Mythbuntu Control Centre (not mythbuntu itself a *buntu build, just the packages that allow PVR functionality but also sets up Samba and NFS file sharing, and a MySQL database). It's my primary HTPC in the den for all serious movie/TV watching, but also serves as a central library for an OpenElec Kodi client upstairs with a syncronized library. Kodi has a UPnP/DLNA server, so I listen to music on my phone using that as a streamer, and my Windows machine can use it as a media source as well as direct file access through Samba shares. I leave it in a standalone Kodi mode 24/7, never turning it off so the family can just push ON and start playing. All the server functionality is still running in the background. Meanwhile, as they are watching a movie, I can fiddle on the Windows machine and copy files/folders from one machine to the other. There are some apps like LuckyBackup that allow you to syncronize folders between Ubuntu/Win machines automatically as well, so anything I do to one machine (e.g. copy pics from the camera onto the Win machine) gets backed up to the KodiBuntu machine.

Getting the base OS up and running is easy, configuring Samba/NFS isn't hard (the Kodi wiki entries provide a simple start). The hardest part for me was the PVR arena (MythTV is notoriously finicky but the Googles help).

As far as using other distros, I played with a few like Xubuntu and even a full MythBuntu install, and they are better for general functionality, with more pre-configured apps etc., but getting Kodi up to it's full potential is tricky (PulseAudio vs. ALSA etc. for DTS-HD bitstreaming etc.). Whereas KodiBuntu has already taken care of all the Audio/Visual tweaks for you, it's better for HTPC duties. Then getting the NAS-type stuff configured is relatively simple after that.

Your hardware is plenty, btw.
 
Last edited:

lehtv

Elite Member
Dec 8, 2010
11,900
74
91
Thanks for the reply. Your setup sounds a little more complicated than what I want to do, which is a good thing because it means my setup isn't really all that complicated. :D

I posted a thread to Kodi community forums and got some helpful answers there. I'm probably going to go with Ubuntu 16.04 which apparently supports Skylake more fully. Then I'll just install Kodi and Samba, and keep it simple. NFS would be nice but it has no Windows 10 support, I need to be able to read from and write to the file server from my main Windows rig. Although... running Linux in VM just for the purpose of accessing the NFS might be a fun thing to try. Maybe later once I got the basics figured out and everything up and running :)
 

LoveMachine

Senior member
May 8, 2012
491
3
81
Thanks for the reply. Your setup sounds a little more complicated than what I want to do, which is a good thing because it means my setup isn't really all that complicated. :D

I posted a thread to Kodi community forums and got some helpful answers there. I'm probably going to go with Ubuntu 16.04 which apparently supports Skylake more fully. Then I'll just install Kodi and Samba, and keep it simple. NFS would be nice but it has no Windows 10 support, I need to be able to read from and write to the file server from my main Windows rig. Although... running Linux in VM just for the purpose of accessing the NFS might be a fun thing to try. Maybe later once I got the basics figured out and everything up and running :)

I was going to say, if you can wait a couple of months for 16.04, that's probably the way to go. Also, running Samba for Win7/10 and NFS for linux/OSX side by side isn't a problem. I can be fiddling with the Win machine, copying stuff to the Kodibuntu NAS with Samba while the OpenELEC client upstairs is talking to the Kodibuntu NAS with NFS. It's all seamless once you modify the proper config files.
 

lehtv

Elite Member
Dec 8, 2010
11,900
74
91
Can't I just install 16.04 beta and upgrade it to final stable release a month later?

Yeah I know I can still use NFS alongside Samba, I'm just skeptical about whether it's worth the hassle. Traffic between OS X and Ubuntu is going to be pretty minimal, and for the moment the HTPC will be the only Linux system in the house.

I'm also hoping to use Samba with Android phones and tablets.
 

LoveMachine

Senior member
May 8, 2012
491
3
81
Can't I just install 16.04 beta and upgrade it to final stable release a month later?

Yeah I know I can still use NFS alongside Samba, I'm just skeptical about whether it's worth the hassle. Traffic between OS X and Ubuntu is going to be pretty minimal, and for the moment the HTPC will be the only Linux system in the house.

I'm also hoping to use Samba with Android phones and tablets.

I suppose, but beta is beta. I tried 15.10 (the immediate precursor to the upcoming 16.06) and had several problems getting both Samba and MySQL to start up and when back to 14.04 LTS. You can always try it and see what happens. It's fairly simple to install, and askubuntu and the Kodi wiki are probably all you need to get everything running for your needs.
 
Feb 25, 2011
16,790
1,472
126
Here's what I want to do: set up an Ubuntu HTPC with Kodi, doubling as a NAS or file server. Need advice from someone who's done sth like this.

The biggest unknowns for me:
1. is it possible to have it function as a server not just for media files, but any files? I know Kodi can do media server, but I want to use it for backup or random storage too.

Yes, although you would configure it separately. (Install Ubuntu, install Kodi server application/services, install samba and set up SMB/CIFS shares.

2. file server needs to be simple to access from Windows 7 and 10 (possibly from Android as well; not a priority). I guess OSX compatibility is pretty much guaranteed since it's Unix

Samba does that. OS X? Meh, about the same level of difficulty vs. Windows. The only caveat being that if you wanted to use it for Time Machine backups, there's more configuration involved and you have to install netatalk.

3. easy/hard? Never done something like this before

Probably a 6/10 - there are a LOT of tutorials on this particular use case, that you shouldn't have any trouble following if you're reasonably familiar with Linux.

4. should I use Kodibuntu or just Ubuntu and install Kodi on top of that?

Theoretically, either, but I prefer using a vanilla base OS whenever possible.

Would FreeNAS work with Kodi?

There are a few ways I can think of to get it working, one way or the other the answer is yes. But the more general-purpose you want your server to be (and HTPC duties is getting there) the less I want to recommend FreeNAS. Heck, if nothing else, FreeNAS doesn't have a console GUI, so you'd need some other way to play stuff back if your Kodi box is also your set-top.

It'd be powered on 24/7. Ideally, it'd be just standing by for HTPC duties whenever needed, with the file server running in the background. The less I have to manage things after setting it up, the better. For instance, it'd be nice to have transferred media files automatically added to Kodi's library.

That's how it works, basically. I'm not familiar with Kodi (I use Plex) but having it keep a watch on certain directories shouldn't be a problem... that's a pretty basic feature, I'd be shocked if they didn't have it.

I don't want to have to install Kodi on other devices, I just want to be able to transfer whatever files I want to/from the network storage. Possible?

Yup. Just make sure your media directory is also a Samba share.

p.s. Hardware will be Pentium G4400, B150 board, 4GB DDR4, 120GB SSD, some storage drive(s).

Shouldn't be an issue, although the low-end non-server hardware is a good reason not to use FreeNAS.
 
Feb 25, 2011
16,790
1,472
126
Can't I just install 16.04 beta and upgrade it to final stable release a month later?

Yes, but there are some hoops you have to just through to get switched from the dev update channel to the LTS/release update channel (manually editing a config file, basically.)

Yeah I know I can still use NFS alongside Samba, I'm just skeptical about whether it's worth the hassle. Traffic between OS X and Ubuntu is going to be pretty minimal, and for the moment the HTPC will be the only Linux system in the house.

I'm also hoping to use Samba with Android phones and tablets.
NFS is a bit faster than Samba, particularly to/from OS X, but Samba/CIFS is fine. (Easiest way to set up a single file sharing protocol and have it work across the board on all your clients.)