Install Ubuntu Server on a regular PC

Note: Ubuntu 16.04 and 16.10 are out. If you want to use the latest version, the ISO download links are here. Otherwise, the install is completely the same as Ubuntu Server 15.04

Whether you have an old computer from 2004, or a brand-new custom machine, it can be turned into a powerful server for files, streaming, hosting gameservers, or much more. But, before we begin doing anything, let me answer a few questions: (skip ahead)

Why Ubuntu Server?

Good question. I use Ubuntu Server because I like it. For me at least, it is very easy to use, easy to install packages, it uses memory efficiently, and it is supported by all the applications/servers I’ve needed to install. Also, it’s completely free and open source, and like most Linux Distributions, I rarely have to install drivers. If you have a different preference, feel free to comment down below. I will also be creating a tutorial for Windows Server 2012.

Will this erase my data that’s already on this computer?

Yes. It will. Unless you want to put the Ubuntu server in a separate partition and dual boot it, you should take off the files you’ll need/want later.

Windows won’t boot on my old computer. Will it still work with Ubuntu Server?

Most probably. Since it’ll format the hard drive and start fresh, Ubuntu Server will probably work perfectly fine on the old computer.

Does this work for laptops?

Absolutely! Laptops are commonly quieter than desktops so they often make better silent home servers! Just make sure you follow this tutorial to keep it running when you close the lid.

Will I need to learn any code?

Nope! There are commands that you’ll have to learn since there is no GUI or Desktop with Ubuntu Server. You can just use this WikiHow to learn the basics.

Do I have to run this 24/7?

Nope. If you don’t need it up all the time, you can just turn it off when you’re done using it with “sudo shutdown -P 0” or the power button. Then when you need it again, you can turn it on and you don’t have to login to access it remotely.

Do I need to connect the server via Ethernet or can it be connected through WiFi?

While Ethernet is recommended if possible, your servers can run fine off of your WiFi access point.

Will people be able to access my server outside my network?

Not unless you port forward. Then you have to be connected to your network to access the server in any way.

What do I do once I install Ubuntu Server?

There are other tutorials all over the place, including My Closet Tech on different projects or services you can deploy. Here are a few examples:

  • OwnCloud (Host/manage your own Dropbox or Google Drive with your Hard Drives)
  • McMyAdmin (Host/manage your own Minecraft servers)
  • Vesta (Host/manage your own websites, emails, and databases)

More links and tutorials coming soon.

My computer is really old. Can it even run Ubuntu Server?

According to help.ubuntu.com, these are the minimum recommended hardware requirements for the server. You may want to check the requirements for the packages/applications you want to install down the road as well.

  • 300 MHz x86 processor
  • 192 MiB of system memory (RAM)
  • 1 GB of disk space
  • Graphics card and monitor capable of 640×480
  • CD drive (or USB will actually work)

Alright, let’s get started!

So, if you’re doing this on an old computer, you may want to open up the computer and clean some of the components inside. You’ll be surprised to see how much dust and gunk collects inside. Follow this video by LinusTechTips or this tutorial on WikiHowThis will actually improve performance.

What you need:

  • An old computer (with a way to connect to the Internet) Maybe a USB WiFi Adapter?
  • A computer connected to the Internet with a DVD drive (OPTIONAL)
  • Any USB Flash Drive or DVD over 4gb
  • A monitor and keyboard that can connect to the old computer.

Procedure

  1. Head over to the official Ubuntu mirror download page on a separate computer. (Not the one you are turning into a server)
  2. Make sure you are under the “Server Install Image” section and download either the 32-bit or 64-bit version of Ubuntu Server. screencapture-mirror-pnl-gov-releases-15-10-1460327665167A rule of thumb: If your computer has over 2gb of RAM, the 64 bit version will work fine. You can also check to see if your processor is a 64-bit processor. Most made within the last 8 years are fine. If not, use the 32 bit version which will be slower, but it works with almost all machines.
  3. (WINDOWS ONLY) Once downloaded, you burn the Ubuntu Server image file to either a USB drive or a CD
    • Download Rufus to write the iso file to a USB drive.
      • In Rufus, leave everything as is except change “Create bootable disk using” to “Iso Image” and click the disk icon to select the Ubuntu Server image you downloaded. Click Start to begin writing the image. Agree to all downloads and press OK if a dialog pops up.
    • Download ImgBurn to burn the iso file to a DVD.
      • After going through the installation wizard, open ImgBurn and File > Open the Ubuntu Server iso file. Make sure you have the right drive selected, and click the big button on the bottom to burn to the DVD.
  4. (LINUX ONLY) If you are running Linux, you should already know what you’re doing… Just use dd or Brasero to burn the image.
  5. (OSX ONLY) Use Disk Utility to burn to a DVD.
  6. Now that you have you have the Ubuntu Disk on your USB drive or DVD, safely eject from your computer.
  7. Plug in the computer, monitor, the keyboard (and the USB drive) to back side of the the old computer. Often the USB drive cannot boot when in the front USB ports.
  8. Turn on the computer. When it first turns on, a screen should flash that will give you a key to press to enter into the BIOS/startup menu. Some common keys are ESC, F2, F3, F10, F12. Repeatedly press the keys to enter the BIOS. For help, go here.20160411_020309
  9. Locate boot options on your BIOS using the arrow keys and ENTER, then navigate to Boot Options/Boot Order/Boot Sequence. Also, insert your DVD into the drive at this point.
  10. Put the DVD drive or USB device before the hard drive in the boot order.20160411_020611
    • Often times, you have to go to extra lengths to enable the USB boot. Look for “Hard Drive Boot Sequence” or “Enable USB Drive Boot” or something similar. If you have no luck booting from a USB device, switch to DVD.
    • Also, if you see the option for legacy boot, enable it.
  11. Usually somewhere on the screen (mostly the bottom) it will give you instructions on how to Save and Exit.20160411_021543 20160411_021752
  12. After saving your changes, the computer will probably restart and boot into Ubuntu this time!
  13. Select your language then click “Install Ubuntu Server”. Then select your language & country again. Note: Your mouse will not work, you have to use your keyboard, the arrow keys, and TAB to navigate.Screenshot from 2016-04-10 19-28-32
  14. Choose “No” for configure keyboard layout unless you have a unique keyboard. Then, proceed to select the details for your keyboard. Probably English, United States.Screenshot from 2016-04-10 19-31-50
  15. If you are not connected via Ethernet, you will have issues connecting to the internet. Just press “Continue” when it says “Network autoconfiguration failed”. We will set up WiFi later.
  16. Now, it will ask you to pick a hostname. This isn’t too important, but it is what the server shows up as to other computers in the network. I chose “bens-ubuntu-server”.Screenshot from 2016-04-10 19-42-45
  17. Then it will ask for Full Name, Username, and Password. You will need to remember both the username and password for whenever you login to the machine.
  18. Then, you get the choice to encrypt your home directory. If you don’t want your documents or files to be accessed, you should chose “Yes”. I went with “No” because I’m not worried about anyone getting access to my files. Note: This does not encrypt everything. Just files stored in /home/ on the server.
  19. Configure the timezone. It should auto detect if you have a network connection.
  20. Now, you will choose how you install Ubuntu on your hard drive. I chose “Guided – use entire disk and set up LVM” because LVM can make it easier down the road to modify partitions. You may be given the option to dual boot with an existing OS on the hard drive. If not, I would not recommend partitioning it unless you know what you’re doing or you’re following another tutorial.Screenshot from 2016-04-10 19-50-43
  21. Then select the hard drive to install to. Make sure it is the same one you configured in the BIOS boot order.
  22. Select “Yes” to write changes to the disk. Then, it will take you through guided partitioning. If you’re using the entire disk, the best idea is to do what it recommends. My hard drive is so small because I am using a virtual hard drive.Screenshot from 2016-04-10 19-53-40
  23. Then press “Yes” again to write changes to disks. Unlike windows, Linux drives are labeled “dev/sda”, “dev/sdb”, “dev.sdc”, etc. Windows drives systems are labeled “C:/”, “D:/”, “E:/”, etc.
  24. Let the installer finish partitioning and installing the system. This will take a while.
  25. Unless you know what you’re doing, just press continue for the HTTP proxy and leave it blank.
  26. I opted in for automatic updates. Again, it’s up to you.Screenshot from 2016-04-10 20-05-54
  27. Okay be careful at this part. You want to install the OpenSSH server so that you can access the server remotely, but you don’t press ENTER to select it. Use the SPACE key to select “OpenSSH” server. I’ve messed up on this countless times, but it’s no big deal if you do the same thing. Once you have Ubuntu Server installed just type “sudo apt-get install openssh-server”.  Screenshot from 2016-04-10 20-11-45 Then, press ENTER to continue.
  28. Let the software and packages install, this takes a while.
  29. Click Yes to install the Grub Boot loader on the master record. Screenshot from 2016-04-10 20-23-44
  30. After that is done installing, you should have successfully installed Ubuntu server! Press Continue and remove the DVD or USB drive. You will now boot into Ubuntu Server.
  31. You will see a lot of stuff happening when you first boot up. This is not an issue, this is just all the processes, services, and devices starting up and being detected.Screenshot from 2016-04-10 20-26-57
  32. Now, the login screen will appear. This will be plain white text on a black background. Type in your username and press enter. Screenshot from 2016-04-10 20-29-22
  33. Type in your password and press enter. You will not see it as you type, but it is being recorded. Both the username and password are case sensitive.
  34. You have successfully installed Ubuntu Server! If you are attempting to connect via WiFi, use this tutorial. I will be making one soon as well.
  35. To test your network connection, type ping google.com. If you get a response, you have internet.
  36. The first thing when you get a new PC or server is to update it. Type the command “sudo apt-get update & sudo apt-get upgrade -y” to update all of your packages. That’s the great thing about Linux! Everything updates together.

You’ve installed Ubuntu Server! Now you can install so many other useful tools such as OwnCloud, Webmin, Vesta, etc.