This guide provides a comprehensive walkthrough for installing Ubuntu Server, a robust and versatile operating system ideal for a wide range of server applications. Whether you’re setting up a web server, a database server, a file server, or a development environment, Ubuntu Server offers a stable and feature-rich platform. We’ll cover the entire process, from preparing your installation media to post-installation configuration.
Preparing for Installation
Before embarking on the installation process, proper preparation is crucial to ensure a smooth and successful deployment. This involves selecting the correct Ubuntu Server version, acquiring the installation media, and understanding basic server hardware requirements.

Choosing the Right Ubuntu Server Version
Ubuntu offers Long Term Support (LTS) releases, which are recommended for production environments due to their extended support periods (typically five years). These releases receive security updates and bug fixes for an extended duration, providing greater stability and predictability. Non-LTS releases offer newer features but have shorter support cycles. For most server deployments, opting for the latest LTS version is the most sensible choice. Visit the official Ubuntu website to download the most recent LTS ISO image.
Creating Bootable Installation Media
Once you have downloaded the Ubuntu Server ISO image, you need to create bootable installation media. This can be done using a USB flash drive or a DVD.
Using a USB Flash Drive (Recommended):
This is the most common and convenient method.
- Download a USB creator tool: Popular options include Rufus (for Windows), balenaEtcher (cross-platform), or the
ddcommand (for Linux/macOS). - Select the Ubuntu Server ISO: Point the tool to the downloaded ISO file.
- Choose your USB drive: Ensure you select the correct USB drive, as all data on it will be erased.
- Start the process: The tool will write the ISO image to the USB drive, making it bootable.
Using a DVD:
If your server lacks USB boot capabilities or you prefer using optical media:
- Burn the ISO to a DVD: Use your operating system’s built-in disc burning tools or third-party software to burn the Ubuntu Server ISO image to a blank DVD. Ensure you select the option to “burn image” rather than just copying the file.
Server Hardware Considerations
While Ubuntu Server is known for its efficiency and ability to run on modest hardware, certain considerations can optimize performance and stability:
- Processor: A modern multi-core processor is recommended for better multitasking and performance.
- RAM: At least 2GB of RAM is the minimum, but 4GB or more is highly recommended for smoother operation, especially with more demanding applications.
- Storage: Adequate storage space is essential. The minimum requirement is around 10GB, but for practical use with data and applications, 20GB or more is advisable. Solid-State Drives (SSDs) offer significant performance improvements over traditional Hard Disk Drives (HDDs).
- Network Interface Card (NIC): A reliable network connection is paramount. Ensure your server has at least one functioning Ethernet port.
The Installation Process
With your bootable media ready and hardware prepared, you can now proceed with the Ubuntu Server installation. The installer is text-based but remarkably user-friendly.
Booting from Installation Media
- Insert the bootable media: Plug in your USB drive or insert the DVD into the server.
- Access the BIOS/UEFI: Restart the server and immediately press the appropriate key to enter the BIOS or UEFI settings. This key varies by manufacturer but is often
Del,F2,F10, orF12. - Change the boot order: Navigate to the boot settings and prioritize booting from your USB drive or DVD drive.
- Save and exit: Save your changes and exit the BIOS/UEFI. The server will reboot and should now boot from your Ubuntu installation media.
Initial Setup and Language Selection
Upon booting from the installation media, you will be presented with the Ubuntu Server installer menu.
- Select Language: Choose your preferred language for the installation process and the resulting system.
- Keyboard Layout: Select your keyboard layout. You can test it to ensure it’s configured correctly.
Network Configuration
The installer will attempt to configure your network interfaces automatically using DHCP.
- DHCP: If your network has a DHCP server, the network interface should receive an IP address, subnet mask, gateway, and DNS servers.
- Manual Configuration: If you need to set a static IP address, select “Manual” and provide the necessary IP address, subnet mask, gateway, and DNS server details.
Proxy Configuration (Optional)
If your network requires a proxy server to access the internet, you can enter the proxy details here. Otherwise, leave this field blank.
Ubuntu Archive Mirror
This step involves selecting an Ubuntu archive mirror, which is a server from which your system will download packages. Choosing a mirror geographically close to you can speed up the installation process. The installer usually suggests a default mirror; you can accept it or choose another from the list.
Storage Configuration
This is a critical step where you define how your server’s storage will be partitioned.
Guided Storage Configuration:
- Use an entire disk: This option erases the entire selected disk and sets up partitions automatically. It’s suitable for dedicated servers where data on the disk is not needed.
- Use an entire disk and set up LVM (Logical Volume Management): LVM provides flexibility in managing storage, allowing you to resize partitions easily later. This is a recommended option for most users.
- Set up LVM: If you want to use LVM but retain existing data on the disk (advanced), this option allows for more granular control.
- Manual: For experienced users who want full control over partitioning, the manual option allows you to create, delete, and modify partitions as needed. You’ll need to define mount points (e.g.,
/,/home,swap).
Important Considerations for Partitioning:
- Root Partition (
/): This is where the operating system files will reside. - Swap Partition: This acts as virtual RAM. A general rule of thumb is to allocate RAM equivalent to your system’s RAM, or slightly more if you anticipate heavy memory usage or hibernation.
- Home Partition (
/home): Separating user data onto its own partition can simplify backups and system upgrades.

Confirmation: After selecting your storage configuration, the installer will present a summary of the changes it will make. Carefully review this before proceeding, as it will modify your disk.
User Setup
This section involves creating the initial user account for your server.
- Your Name: Enter your full name.
- Server’s Name: Choose a hostname for your server. This is how it will be identified on the network.
- Username: Create a username for your primary account.
- Password: Set a strong password for your account and confirm it.
SSH Setup
It is highly recommended to install the OpenSSH server. This will allow you to connect to your server remotely via SSH, which is essential for server administration.
- Install OpenSSH server: Select this option to include SSH in the installation.
Featured Server Snaps (Optional)
Ubuntu Server offers the option to install popular server applications as “snaps” during the installation. These can include Docker, Nextcloud, and others. You can select any that are relevant to your needs or skip this step and install them later.
Installation Progress
The installer will now proceed to download and install packages onto your server. This process can take some time, depending on your internet connection speed and the selected options.
Rebooting the Server
Once the installation is complete, you will be prompted to reboot your server. Remove the USB drive or DVD before the server restarts to ensure it boots from the newly installed Ubuntu system.
Post-Installation Configuration
After the initial reboot, your Ubuntu Server will be up and running. However, several post-installation steps are crucial for securing and optimizing your server.
First Login and System Updates
- Login: You will be presented with a login prompt. Enter the username and password you created during the installation.
- Update System Packages: It’s imperative to update your system with the latest security patches and software updates. Run the following commands:
bash
sudo apt update
sudo apt upgrade
sudo apt updaterefreshes the list of available packages, andsudo apt upgradeinstalls any available updates. You will be prompted to confirm the upgrade, usually by typing ‘Y’.
Essential Server Configuration
Firewall Setup (UFW)
Uncomplicated Firewall (UFW) is a user-friendly front-end for managing your server’s firewall. It’s highly recommended to enable and configure it.
- Enable UFW:
bash
sudo ufw enable
- Allow SSH: Before enabling the firewall, ensure you allow SSH access, otherwise, you’ll lock yourself out if you’re connected remotely.
bash
sudo ufw allow ssh
If you’re not using the default SSH port (22), replacesshwith the port number. - Allow Other Services: As you install and configure services (e.g., HTTP for web servers on port 80, HTTPS on port 443), you’ll need to allow them through the firewall:
bash
sudo ufw allow http
sudo ufw allow https
- Check Status:
bash
sudo ufw status
Time Synchronization (NTP)
Accurate timekeeping is vital for logging, security, and inter-server communication. Ubuntu Server typically includes chrony or ntp for time synchronization.
- Check Status:
bash
timedatectl status
- Configure NTP (if needed): If time synchronization is not active, you may need to install and configure an NTP client.
chronyis often the default.
bash
sudo apt install chrony
sudo systemctl enable chrony
sudo systemctl start chrony
User Management and Permissions
While you’ve created an initial user, understanding user and group management is key for multi-user environments and fine-grained access control.
- Adding New Users:
bash
sudo adduser newusername
- Granting Sudo Privileges: To allow a new user to run commands with administrative privileges:
bash
sudo usermod -aG sudo newusername
- Managing Groups:
bash
sudo addgroup newgroupname
sudo usermod -aG newgroupname username
SSH Security Hardening
To enhance the security of your SSH access:
- Disable Root Login: Edit the SSH configuration file (
/etc/ssh/sshd_config) and setPermitRootLogin no. - Change Default Port: Consider changing the default SSH port (22) to a non-standard port to reduce automated attack attempts. Update
Port 22to your chosen port number insshd_config. Remember to update your firewall rules accordingly. - Use SSH Keys: Implement SSH key-based authentication instead of passwords for enhanced security.

Installing and Configuring Services
The real power of Ubuntu Server lies in its ability to host a wide array of services. Common examples include:
- Web Server (Apache/Nginx):
bash
sudo apt install apache2 # For Apache
sudo apt install nginx # For Nginx
- Database Server (MySQL/PostgreSQL):
bash
sudo apt install mysql-server # For MySQL/MariaDB
sudo apt install postgresql postgresql-contrib # For PostgreSQL
- File Server (Samba/NFS):
bash
sudo apt install samba # For Samba (Windows file sharing)
sudo apt install nfs-kernel-server # For NFS (Linux/Unix file sharing)
- Docker:
bash
sudo apt install docker.io
Remember to consult the specific documentation for each service you install for detailed configuration instructions.
By following these steps, you will have a securely installed and configured Ubuntu Server ready to host your applications and services. Regular maintenance, including system updates and security audits, is crucial for long-term server health and performance.
