Ubuntu Server Operating System: Setup and Benefits

Introduction

Linux Ubuntu Server is a popular choice for businesses and individuals seeking a reliable, secure, and flexible operating system. This comprehensive guide will walk you through the basics of Ubuntu Server, its benefits, and how to set it up on a Contabo VPS, VDS, or Dedicated Server. Whether you’re new to Linux or an experienced user, you’ll find valuable information to help you make the most of Ubuntu Server for your projects and applications.

What is Ubuntu Server?

Ubuntu Server is a variant of the Ubuntu operating system designed specifically for server environments. Built on the Linux kernel, it provides a stable platform for hosting websites, running applications, and managing network services. Unlike the desktop version, Ubuntu Server doesn’t include a graphical user interface by default, making it lighter and more efficient for server use.

Key features of Ubuntu Server include:

  • Command-line interface for efficient remote management
  • Lower resource requirements compared to desktop versions
  • Built-in security features and regular security updates
  • Support for a wide range of server applications and services
  • Scalability to meet growing business needs
Ubuntu Server vs. Ubuntu Desktop: Comparison of Key Features

Ubuntu Meaning and History

The name “Ubuntu” comes from an African philosophy meaning “humanity to others” or “I am what I am because of who we all are.” This reflects the collaborative nature of the open-source community behind Ubuntu. Canonical, the company founded by South African entrepreneur Mark Shuttleworth, released the first version of Ubuntu in 2004.

Since its inception, Ubuntu has grown to become one of the most widely used Linux distributions. The server edition was introduced to cater to the growing demand for a reliable, easy-to-use server operating system. Ubuntu’s commitment to regular releases and long-term support has made it a favorite among system administrators and developers alike.

Benefits of Using Linux Ubuntu Server

Ubuntu Server offers several advantages that make it a top choice for many organizations looking to run a Linux VPS:

  • Free and open-source: Use and modify Ubuntu Server without licensing costs, reducing overall IT expenses.
  • Regular updates: Long-term support (LTS) versions receive security updates for five years, ensuring your server remains protected.
  • Large community: A vast user base means plenty of resources, forums, and documentation for support and troubleshooting.
  • Compatibility: Works well with a wide range of hardware and software, making it versatile for various server setups.
  • Security: Regular updates and built-in security features protect your server from vulnerabilities and threats.
  • Customizability: Tailor Ubuntu Server to your specific needs by installing only the packages and services you require.
  • Cloud-ready: Easily deploy Ubuntu Server in cloud environments like AWS, Azure, or Google Cloud Platform.
  • Container support: Built-in support for technologies like Docker and Kubernetes for modern application deployment.

Minimum Hardware Requirements for Ubuntu Server 24

Ubuntu Server 24.04 LTS (the latest version at the time of writing) has modest hardware requirements, making it suitable for a wide range of systems:

  • CPU: 1 GHz or better (x86-64 processor)
  • RAM: 1 GB (2 GB recommended for comfortable use)
  • Storage: 2.5 GB for minimal installation (10 GB or more recommended for most use cases)
  • Network: Ethernet adapter (for network installation)

For running Ubuntu Server 24 on VMware or other virtualization platforms, similar requirements apply. However, you may want to allocate more resources depending on your specific use case and the applications you plan to run.

How to Download Ubuntu Server

To download the Ubuntu Server ISO:

  1. Visit the official Ubuntu website (ubuntu.com/download/server)
  2. Choose the latest LTS version
  3. Select your preferred installer (e.g., traditional server installer)
  4. Click “Download Ubuntu Server”

You’ll get an Ubuntu ISO file that you can use to install Ubuntu Server on your machine or virtual environment. This ISO file contains all the necessary components to boot and install Ubuntu Server on your target system.

Setting Up Ubuntu Server on Contabo VPS

Contabo offers Virtual Private Servers (VPS) that are perfect for running Ubuntu Server. Here’s a detailed guide on how to set it up:

  1. Order a VPS from Contabo. Choose the plan that best fits your needs in terms of CPU, RAM, and storage.
  2. During the order process, select Ubuntu Server as your operating system. Contabo typically offers the latest LTS version.
  3. Once your VPS is ready, you’ll receive an email with your server’s IP address, root username, and password.
  4. Use SSH to connect to your server:
    ssh root@your_server_ip

    When prompted, enter the password provided by Contabo.


  5. Upon first login, you’ll be asked to change the root password. Choose a strong, unique password.
  6. Update your system to ensure you have the latest security patches:
    sudo apt update && sudo apt upgrade -y

  7. Set up a non-root user for added security:
    adduser your_username
    usermod -aG sudo your_username

    Replace ‘your_username’ with your desired username.


  8. Configure SSH key-based authentication for enhanced security:
    ssh-copy-id your_username@your_server_ip

    This assumes you have an SSH key on your local machine. If not, generate one first with ssh-keygen.


  9. Disable root login and password authentication in SSH:
    sudo nano /etc/ssh/sshd_config

    Set the following options:


    PermitRootLogin no
    PasswordAuthentication no

    Save the file and restart the SSH service:


    sudo systemctl restart ssh

  10. Set up a basic firewall:
    sudo ufw allow OpenSSH
    sudo ufw enable

Remember to configure your firewall to allow any additional services you plan to run on your server.

Essential Ubuntu Server Commands

Familiarize yourself with these key commands for managing your Ubuntu Server:

Check Ubuntu Version:

To check your Ubuntu version, use:

lsb_release -a

or

cat /etc/os-release

Disk Management:

To check disk usage:

df -h

To resize a partition (be cautious with this command):

sudo resize2fs /dev/sdXY

Other Useful Commands:

CommandDescription
sudo apt updateUpdate package lists
sudo apt upgradeUpgrade installed packages
uname -aDisplay system information
topView running processes
ps auxList all running processes
netstat -tulnShow active network connections
sudo systemctl start/stop/restart service_nameManage system services

Installing Key Software on Ubuntu Server

Install SSH Server on Ubuntu:

Ubuntu Server typically comes with SSH pre-installed. If not, you can install it:

sudo apt update
sudo apt install openssh-server
sudo systemctl start ssh
sudo systemctl enable ssh

Install Docker on Ubuntu Server 24:

Docker is a popular platform for containerizing applications. Here’s how to install it:

sudo apt update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER

Log out and back in for the group changes to take effect.

NGINX Download for Ubuntu Server:

NGINX is a high-performance web server. To install it:

sudo apt update
sudo apt install nginx
sudo systemctl start nginx
sudo systemctl enable nginx

After installation, you can access the default NGINX page by navigating to your server’s IP address in a web browser.

Setting Up an Ubuntu VNC Server

While Ubuntu Server doesn’t come with a GUI by default, you can set up a VNC server for remote graphical access. Here’s a step-by-step guide:

  1. Install a desktop environment (e.g., XFCE4):
    sudo apt update
    sudo apt install xfce4 xfce4-goodies

  2. Install TightVNC server:
    sudo apt install tightvncserver

  3. Set a VNC password:
    vncserver

    You’ll be prompted to enter and verify a password.


  4. Create a startup script for your VNC server:
    nano ~/.vnc/xstartup

    Add the following content:


    #!/bin/bash
    xrdb $HOME/.Xresources
    startxfce4 &

    Save and exit the file.


  5. Make the startup script executable:
    chmod +x ~/.vnc/xstartup

  6. Start the VNC server:
    vncserver :1 -geometry 1280x800 -depth 24

Remember to secure your VNC connection, preferably by using an SSH tunnel. To connect to your VNC server, you’ll need a VNC client on your local machine.

Troubleshooting Common Ubuntu Server Issues

Even with proper setup, you might encounter issues. Here are some common problems and their solutions:

  • Package manager errors: If you receive errors when trying to install or update packages, try running:
    sudo apt update
    sudo apt clean
    sudo apt autoremove

    This will refresh the package lists and remove unnecessary packages.


  • Disk space issues: If you encounter low disk space warnings, check usage with:
    df -h

    To find large files or directories consuming space, you can use:


    du -sh * | sort -h

  • Service not starting: If a service (like NGINX or Docker) won’t start, check its logs for errors. You can view logs with:
    journalctl -u service_name

    Replace service_name with the name of the service you are troubleshooting.


  • Network connectivity issues: If your server cannot connect to the internet or other servers, verify your network configuration. Use:
    ping google.com
    traceroute google.com

    This can help identify where the connection is failing.


  • Firewall blocking traffic: If you can’t access your server from outside, check your firewall settings with:
    sudo ufw status

    Ensure that ports for services (like HTTP/HTTPS) are allowed.


  • SSH connection issues: If unable to connect via SSH, check that the SSH service is running:
    sudo systemctl status ssh

    Also, ensure your firewall allows SSH traffic.


  • Kernel issues after updates: After a kernel update, if the system won’t boot properly, try rebooting from an older kernel version provided in the GRUB menu. You may need to update your GRUB configuration:
    sudo update-grub

Remember, most issues can be resolved by carefully reading error messages, checking logs (usually located in the /var/log/ folder), and searching the Ubuntu forums or official documentation for similar problems and solutions.

Conclusion

Ubuntu Server offers a powerful, flexible, and cost-effective solution for your server needs. By embracing the features and tools available, you can build and manage a stable server environment that adapts to your growing requirements. Whether you’re hosting a website, running applications, or managing network services, using Ubuntu Server on a Contabo VPS provides you with a solid foundation.

Scroll to Top