0% found this document useful (0 votes)
175 views

Building An Ubuntu Home Server

The document summarizes how to set up a home server using Ubuntu Server. It provides instructions on hardware requirements, installation, initial configuration including networking and remote access via SSH, basic administration tasks, security recommendations, and expanding storage. Key steps include installing Ubuntu Server on the system, configuring a static IP address through the router's DHCP settings, enabling remote access via SSH, installing unattended upgrades to keep the system updated automatically, and using a firewall like ufw.

Uploaded by

Aldin Selić
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
175 views

Building An Ubuntu Home Server

The document summarizes how to set up a home server using Ubuntu Server. It provides instructions on hardware requirements, installation, initial configuration including networking and remote access via SSH, basic administration tasks, security recommendations, and expanding storage. Key steps include installing Ubuntu Server on the system, configuring a static IP address through the router's DHCP settings, enabling remote access via SSH, installing unattended upgrades to keep the system updated automatically, and using a firewall like ufw.

Uploaded by

Aldin Selić
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

The server being used:

- Intel NUC
- 8 GB RAM
- 32 GB SSD

Home server hardware and setup:


- small form-factor machines
- existing PC hardware
- laptop not recommended for server
- search for model and Linux
- possible troubleshooting

Setup recommendations
- server must be connected with the Ethernet
- consider buying UPS for untinterruptable power supply
- when choosing hardware, consider what your server needs to do
- 8GB of RAM or more, SSD
- keep the server in a cool and clean place

Ubuntu:
- server - usage we need for server environment, it can be connected through
SSH
- core - designed for IoT and specialized for smaller things
- desktop - desktop version of Ubuntu, regular OS

Ubuntu releases:
- 16.10 Yakkety Yak 2016 Standard
- 16.04 Xenial Xerus 2016 LTS
- 15.10 Wily Werewolf 2015 Standard
- 15.04 Vivid Vervet 2015 Standard
- 14.10 Utopic Unicorn 2014 Standard

1. Download .iso of Ubuntu server


- .iso means optical disc image

2.Create installer using Widnows with RUFUS and USB


- click start

3. Create installer using Linux and USB


- we have downloadable .iso image in our folder
- $sudo umount /dev/sdb1
- $ sudo dd if=ubuntu-server.iso of=/dev/sdb bs=4M
- image is restored on the drive

4. Installing server on machine


- Enter to the BIOS
- start the system from USB boot - make the USB come first
- select language, and continue with installation
- click Install Ubuntu Server
- primary network interface: select Ethernet port
- enter hostname
- create user and password
- encrypt home directory? Yes
- Partition disk: the installer has detected that the following disk have
mounted partitions /dev/sdX
- Guided - use entire disk and set up LVM
- Select disk to partition: select disk to partition (beyond this point, disk
will be erased)
- select SSH to be installed
- GRUB? Yes
- select drive to be bootable

5. Configure the network for your server:


- Server needs an IP address:
- Dynamic IP can change
- Static IP stays the same ! (Better)
- Configure static IP address:
- set manually in /etc/network/interfaces
- set a reservation by MAC address on the DHCP server (Better option
that the one above)
- In router settings page, find DHCP reservation settings
- MAC address (enter your MAC address)
- enter static IP address for system to reserve
- description, type ubuntu server or something
- click ADD
- restart router
- We can check and see if the IP changed, type ip addr in terminal and if not
restart router

6. Access the server from another computer (SSH):


- $ sudo apt install openssh-server
- $ sudo vi /etc/ssh/sshd_config
- find PermitBootLogin and type from prohibit-password to no
- find Port 22, and since its home server, we can leave it at 22
- exit vi
- $ sudo systemctl restart ssh
- $ sudo systemctl status ssh

Remote Access: Putty, terminal,...

$ ssh [email protected]
- type yes
- password:

7. Tips and tricks:


- customize the bash prompt:
- change coloring, spacing, visible information
- bashrcgenerator.com is website that edits bash for you inside bashrc. file

8. Upload and download files from the web


- Download files from the command link
- wget
$ wget URL

- Transfer files using SSH


- sftp
- Using filezilla.org, login and you can transfer files
- scp
- $scp ubuntu-16.04.02-server.iso [email protected]
- $password:
- copying begins

9. Listening conneted ports


- view what ports are listening and connected
- tool we are going to use is ss (socket statistics)
- man ss
- ss -ant (-a all connections, -n shows port numbers, -t shows the TCP
sockets, -u shows UDP sockets)
$ss -ant

10. Adding storage:


- media files can be large
- separate files from OS
- add external or internal storage

$ sudo fdisk -l
- shows all disk info on system
- after we install and plug new HDD type again same command and configrm
server added it
- disk is electrically connected, but it cannot use files

11 Security and maintenance of your server


Three things to consider related to security:
- remote access
- disable root login via SSH
- use a key rather than a password
- software updates
- provides fixes, patches, updates
$ sudo apt update
$ sudo apt upgrade

Automatic updates:
$ sudo apt install unattended-upgrade
$ sudo dpkg-reconfigure unattended-upgrade
Yes,
Ok
- firewall settings
- enable the firewall on systems
- ufw enable / ufw disable
- ufw (uncomplicated firewall)
- if firewall enabled, create rule to allow access on ports you
use (SSH for example)

- sudo ufw

You might also like