John's Musings

Yeah, Me Neither

Ubuntu Server

After much internal strife and debate with myself I opted to install Ubuntu Server on my headless server made from spare parts. There are a couple reasons for this. In EMBY media server which I want to install there is an option for a TV Tuner. My Hauppage 995Q USB Tuner only works on Linux Kernel 4.1 or higher or with a patched kernel. Debian server is based on 3.16 and I didn't want to patch, nor upgrade the kernel. Ubuntu server runs 4.40. Were it not for this I would stick with the ease and stability of Debian. Also the Debian minimal network install adds a graphical interface. Yeah you can disable it and change the boot level.......but why? No good reason.


Ubuntu 16.04.1 LTS (Xenial Xerus)

from here.

I went with the server version with no graphical interface. After determining that my USB installation stick was /dev/disk2 (don't foul this up) I issued the following command in mac to make the USB stick an Ubuntu installer then set the BIOS on the computer to boot from USB first.

sudo dd if=/Users/john/Downloads/ubuntu-16.04.1-server-amd64.iso of=/dev/rdisk2 bs=1m

While going through the install when it asks you what to items to install at a minimum select OPENSSH SERVER because without a graphical interface you have to be able to SSH into your box via your local network or you are tied for a while to a keyboard, monitor, and mouse until you can fix it.

I also chose DNS SERVER, SAMBA and LAMP SERVER. SAMBA is a file server and the LAMP SERVER is your web server and database (mysql). You may not think you need a database server but if you install a Cloud server, as I have below, it also uses mysql. Just install it.

Now once you ssh in for the first time (make sure and use YOUR IP ADDRESS and YOUR USER NAME)

ssh -l john (make sure to use the user name you set up during the installer routine)

password: thepasswordyousetupduringinstall

Now make sure your installation is updated.

sudo apt-get update

sudo apt-get dist-upgrade

Once we're all upgraded lets get a static IP address so we aren't always looking for it. Open /etc/network/interfaces and make it look like the pic below. Make sure the last two octets that I have covered match your network (i.e.

sudo nano /etc/network/interfaces

If you selected your LAMP Server you are already running a web server and you have just built a server! Hurray! You can test it by typing the IP address of your server into a browser. You should see the Apache2 test page if all went well.

Now if you want to be slick and have a graphical interface to control from a browser you'll want to install webmin. Follow the directions here. Basically the directions are this:

sudo nano /etc/apt/sources.list

Copy these lines in (then after editing hit CTL + X key and yes to save):

deb sarge contrib

Add the keys:

sudo apt-key add jcameron-key.asc


apt-get update

apt-get install webmin -y

When you log in webmin it will look like this (To log in type your server IP address into a browser bar with port 10000 i.e.

Now you don't have to be a command line hero. You can run almost every aspect of your server from this graphical interface.

SAMBA file sharing is easy. If you selected it then it is already installed. I just add my user from the command line.

sudo pdbedit -a john

Then type and repeat your password. Now go in webmin and set up a share. Yeah you can do it via command line and editing the smb.conf file but hey, we've got webmin, why not use it? I created a new directory in my home directory by typing:

mkdir ubuntuserver

Then went in webmin under Servers > Samba Servers and then created a new file share. Make sure the user and group is your login name. In my case both are "john". Also make sure to click the radio button to make the share writeable.

Scroll to the bottom of the page (not shown here) and click the restart samba button.

If you did it right you should see this:

Another cool aspect of having your own server is running a Cloud Server like Dropbox. Somewhere along the line you know someone is looking at your files to see if there is anything earth shattering there. Not so if you run your own Cloud Server. The defacto standard seems to be OwnCloud however it is not my defacto standard. I've never been a huge fan. There is too much going on in Owncloud. I found a Cloud Server that just serves files and has good security. Seafile. Seafile is a little geeky to install but I found the sea file manual which is great. Just go slow and follow the guide step by step and it works perfectly. The manual page is here. If you get it right this is what it looks like.

Now you're running your own Cloud server. How cool is that?

And while the server is just sitting there I downloaded and installed the latest Logitechmediaserver on to it so my clients can stream Spotify, Pandora, TuneIn, and Shoutcast. I can add locally stored music as well, I just haven't done it yet. I have an old TV I made into a Google calendar project for the kitchen and no reason for the TV speakers to go to waste. I use them to listen to Talk Radio while I'm cooking. My server might as well be a streaming music server too. Just one more cool capability this appliance has.

I'm really beginning to love the whole concept of this home server implementation. I should have done this years ago.