10 Simple and Useful Projects Anyone Can Build with Ubuntu Server

Are you looking to learn more about servers but don’t know where to start? Ubuntu Server provides the perfect foundation for beginners and experienced users alike. With its reliability, security features, and extensive community support, Ubuntu Server makes it easy to create useful projects that enhance your home network or provide valuable skills for your career.

In this guide, I’ll walk you through 10 practical projects that anyone can set up using Ubuntu Server. Each project requires minimal hardware and provides real-world benefits. Let’s get started!

1. Network-Attached Storage (NAS) Server

What it is: A centralized location to store and access your files from any device on your network.

Why Ubuntu Server is perfect: Ubuntu’s stability ensures your data remains safe, while its lightweight nature means even older hardware can serve as a reliable NAS.

Setup overview:

  1. Install Ubuntu Server on your hardware
  2. Install and configure Samba for file sharing:
sudo apt update
sudo apt install samba -y
  1. Create a directory for your shared files:
sudo mkdir -p /media/nas
sudo chmod 777 /media/nas
  1. Configure Samba by editing its configuration file:
sudo nano /etc/samba/smb.conf
  1. Add the following at the end of the file:
[NASShare]
path = /media/nas
browseable = yes
read only = no
force create mode = 0660
force directory mode = 2770
valid users = @users
  1. Set a Samba password for your user:
sudo smbpasswd -a yourusername
  1. Restart Samba:
sudo systemctl restart smbd

Benefits: Access your files from any device, centralize your backups, and stream media throughout your home.

2. Personal Cloud Storage (NextCloud)

What it is: Your own personal cloud storage solution similar to Dropbox or Google Drive but hosted on your own hardware.

Why Ubuntu Server is perfect: Ubuntu’s package management makes installing dependencies straightforward, while LTS releases ensure long-term stability.

Setup overview:

  1. Install LAMP stack:
sudo apt update
sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip -y
  1. Secure your MariaDB installation:
sudo mysql_secure_installation
  1. Create a database:
sudo mysql -u root -p
CREATE DATABASE nextcloud;
CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextclouduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
  1. Download and install NextCloud:
cd /tmp
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
sudo mv nextcloud /var/www/html/
sudo chown -R www-data:www-data /var/www/html/nextcloud/
  1. Configure Apache:
sudo nano /etc/apache2/sites-available/nextcloud.conf
  1. Add the following configuration:
<VirtualHost *:80>
    DocumentRoot /var/www/html/nextcloud/
    ServerName your_domain_or_IP

    <Directory /var/www/html/nextcloud/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
  1. Enable the site and required modules:
sudo a2ensite nextcloud.conf
sudo a2enmod rewrite headers env dir mime
sudo systemctl restart apache2
  1. Access NextCloud through your browser at http://your_server_IP_or_domain and complete the setup wizard.

Benefits: Maintain control over your data, avoid subscription fees, and get unlimited storage based on your hardware.

3. Media Server with Plex

What it is: A powerful media server that organizes your movies, TV shows, music, and photos, making them accessible from anywhere.

Why Ubuntu Server is perfect: Ubuntu’s efficiency means more resources are available for transcoding media, and its compatibility with Plex is excellent.

Setup overview:

  1. Add the Plex repository:
sudo apt update
sudo apt install apt-transport-https curl -y
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
  1. Install Plex Media Server:
sudo apt update
sudo apt install plexmediaserver -y
  1. Create directories for your media:
sudo mkdir -p /opt/plexmedia/{movies,tv,music,photos}
sudo chown -R plex:plex /opt/plexmedia
  1. Access the Plex web interface at http://your_server_IP:32400/web and follow the setup wizard
  2. Add your media libraries pointing to the directories you created

Benefits: Stream your media collection to any device, automatic metadata fetching, and smart organization of your content.

4. Home Automation Server with Home Assistant

What it is: A central hub to control and automate your smart home devices.

Why Ubuntu Server is perfect: Ubuntu’s reliability ensures your home automation stays running, while its hardware compatibility supports various IoT devices.

Setup overview:

  1. Install Docker (the easiest way to run Home Assistant):
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce -y
  1. Install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. Create a Docker Compose file:
mkdir ~/homeassistant
cd ~/homeassistant
nano docker-compose.yml
  1. Add the following content:
version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: ghcr.io/home-assistant/home-assistant:stable
    volumes:
      - ./config:/config
    environment:
      - TZ=YOUR_TIME_ZONE
    restart: always
    network_mode: host
  1. Start Home Assistant:
sudo docker-compose up -d
  1. Access Home Assistant through your browser at http://your_server_IP:8123

Benefits: Centralized control of all smart devices, powerful automation capabilities, and reduced dependence on cloud services.

5. Personal VPN Server with WireGuard

What it is: Your own VPN server that allows secure remote access to your home network and protects your privacy when using public Wi-Fi.

Why Ubuntu Server is perfect: Ubuntu’s security focus makes it ideal for VPN services, and recent kernels include built-in WireGuard support.

Setup overview:

  1. Install WireGuard:
sudo apt update
sudo apt install wireguard -y
  1. Generate private and public keys:
wg genkey | sudo tee /etc/wireguard/private.key
sudo chmod 600 /etc/wireguard/private.key
sudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key
  1. Create a WireGuard configuration:
sudo nano /etc/wireguard/wg0.conf
  1. Add the following (substituting your own values):
[Interface]
PrivateKey = YOUR_SERVER_PRIVATE_KEY
Address = 10.0.0.1/24
ListenPort = 51820
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

# Client configuration example
[Peer]
PublicKey = CLIENT_PUBLIC_KEY
AllowedIPs = 10.0.0.2/32
  1. Enable IP forwarding:
echo "net.ipv4.ip_forward=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
  1. Start and enable the WireGuard service:
sudo systemctl enable wg-quick@wg0
sudo systemctl start wg-quick@wg0
  1. Generate configurations for your clients and distribute them securely

Benefits: Secure remote access to your home network, enhanced privacy on public networks, and better control over your internet connection.

6. Web Server for Hosting Your Own Website

What it is: A server to host your personal website, blog, or web application.

Why Ubuntu Server is perfect: Ubuntu’s robust LAMP stack support makes it the go-to choice for web hosting environments.

Setup overview:

  1. Install LAMP stack:
sudo apt update
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql -y
  1. Secure MariaDB:
sudo mysql_secure_installation
  1. Create a website directory:
sudo mkdir -p /var/www/yourwebsite
sudo chown -R $USER:$USER /var/www/yourwebsite
  1. Create a simple index.php file:
echo '<?php phpinfo(); ?>' > /var/www/yourwebsite/index.php
  1. Configure Apache virtual host:
sudo nano /etc/apache2/sites-available/yourwebsite.conf
  1. Add the following configuration:
<VirtualHost *:80>
    ServerName yourwebsite.local
    ServerAlias www.yourwebsite.local
    DocumentRoot /var/www/yourwebsite
    ErrorLog ${APACHE_LOG_DIR}/yourwebsite_error.log
    CustomLog ${APACHE_LOG_DIR}/yourwebsite_access.log combined
</VirtualHost>
  1. Enable the site and restart Apache:
sudo a2ensite yourwebsite.conf
sudo systemctl restart apache2

Benefits: Full control over your web presence, no monthly hosting fees, and valuable skills for web development.

7. Pi-hole Ad Blocker

What it is: A network-wide ad blocker that improves browsing speed and privacy by blocking ads at the DNS level.

Why Ubuntu Server is perfect: Ubuntu’s efficiency means Pi-hole can run alongside other services without issues, making it a perfect addition to any home server.

Setup overview:

  1. Install required packages:
sudo apt update
sudo apt install curl -y
  1. Run the Pi-hole installer:
curl -sSL https://install.pi-hole.net | bash
  1. Follow the on-screen instructions (accept most defaults)
  2. Note your admin password at the end of installation
  3. Configure your router to use your Ubuntu Server as the DNS server, or configure individual devices
  4. Access the Pi-hole admin interface at http://your_server_IP/admin

Benefits: Faster browsing, reduced bandwidth usage, enhanced privacy, and protection from malicious domains.

8. Git Server with Gitea

What it is: A lightweight, self-hosted Git service similar to GitHub but running on your own hardware.

Why Ubuntu Server is perfect: Ubuntu’s package management and system resource efficiency make it ideal for hosting developer tools like Git services.

Setup overview:

  1. Install required packages:
sudo apt update
sudo apt install git curl sqlite3 -y
  1. Create a user for Gitea:
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/git git
  1. Download and install Gitea:
VERSION=$(curl -s https://api.github.com/repos/go-gitea/gitea/releases/latest | grep tag_name | cut -d '"' -f 4)
sudo wget -O /tmp/gitea https://dl.gitea.io/gitea/${VERSION}/gitea-${VERSION}-linux-amd64
sudo chmod +x /tmp/gitea
sudo mv /tmp/gitea /usr/local/bin/gitea
  1. Create required directories:
sudo mkdir -p /var/lib/gitea/{custom,data,log}
sudo chown -R git:git /var/lib/gitea
sudo chmod -R 750 /var/lib/gitea
sudo mkdir /etc/gitea
sudo chown root:git /etc/gitea
sudo chmod 770 /etc/gitea
  1. Create a systemd service:
sudo nano /etc/systemd/system/gitea.service
  1. Add the following content:
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target

[Service]
RestartSec=2s
Type=simple
User=git
Group=git
WorkingDirectory=/var/lib/gitea
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
Restart=always
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea

[Install]
WantedBy=multi-user.target
  1. Start and enable Gitea:
sudo systemctl daemon-reload
sudo systemctl enable --now gitea
  1. Access Gitea through your browser at http://your_server_IP:3000 and complete the initial setup

Benefits: Full control over your code repositories, no limitations on private repositories, and integrated issue tracking.

9. Game Server Host

What it is: A dedicated server for hosting multiplayer games like Minecraft, Terraria, or Counter-Strike.

Why Ubuntu Server is perfect: Ubuntu’s stability and resource efficiency allow game servers to run smoothly and consistently, even on modest hardware.

Setup overview for Minecraft Server:

  1. Install required packages:
sudo apt update
sudo apt install openjdk-17-jre-headless screen -y
  1. Create a minecraft user:
sudo adduser --system --home /opt/minecraft-server minecraft
sudo addgroup --system minecraft
sudo adduser minecraft minecraft
  1. Switch to the minecraft user:
sudo su - minecraft
  1. Download the Minecraft server:
mkdir -p ~/server
cd ~/server
wget https://piston-data.mojang.com/v1/objects/8f3112a1049751cc472ec13e397eade5336ca7ae/server.jar -O minecraft_server.jar
  1. Accept the EULA:
echo "eula=true" > eula.txt
  1. Create a start script:
echo '#!/bin/sh
cd /opt/minecraft-server/server
java -Xmx2G -Xms1G -jar minecraft_server.jar nogui' > start.sh
chmod +x start.sh
  1. Exit the minecraft user and create a systemd service:
exit
sudo nano /etc/systemd/system/minecraft.service
  1. Add the following content:
[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=minecraft
Nice=5
KillMode=none
SuccessExitStatus=0 1
InaccessibleDirectories=/root /sys /srv /media -/lost+found
NoNewPrivileges=true
WorkingDirectory=/opt/minecraft-server/server
ReadWriteDirectories=/opt/minecraft-server/server
ExecStart=/opt/minecraft-server/server/start.sh
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS. SAVING ALL MAPS..."\015'
ExecStop=/bin/sleep 10
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "save-all"\015'
ExecStop=/usr/bin/screen -p 0 -S minecraft -X eval 'stuff "stop"\015'

[Install]
WantedBy=multi-user.target
  1. Enable and start the service:
sudo systemctl enable minecraft.service
sudo systemctl start minecraft.service

Benefits: Host your favorite games with friends without subscription fees, customize server settings, and install mods freely.

10. Docker Host for Containerized Applications

What it is: A platform for running containerized applications, making it easy to deploy and manage various services.

Why Ubuntu Server is perfect: Ubuntu has excellent Docker support, regular updates, and a well-maintained Docker repository.

Setup overview:

  1. Install Docker:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce -y
  1. Install Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. Add your user to the Docker group (to avoid using sudo with Docker commands):
sudo usermod -aG docker $USER
  1. Log out and back in for the changes to take effect
  2. Test Docker:
docker run hello-world
  1. Create a sample Docker Compose project:
mkdir ~/docker-test
cd ~/docker-test
nano docker-compose.yml
  1. Add the following content for a simple web server:
version: '3'
services:
  web:
    image: nginx:latest
    ports:
      - "8080:80"
    volumes:
      - ./html:/usr/share/nginx/html
    restart: always
  1. Create a test HTML file:
mkdir -p html
echo "<html><body><h1>My Docker Container is Working!</h1></body></html>" > html/index.html
  1. Start the container:
docker-compose up -d
  1. Access your test site at http://your_server_IP:8080

Benefits: Easily deploy complex applications, maintain isolated environments, and simplify updates and maintenance.

Why Ubuntu Server is the Perfect Choice

Throughout these projects, Ubuntu Server demonstrates its incredible versatility and power. Here’s why Ubuntu Server stands out from other options:

  1. Stability: Ubuntu Server LTS releases are supported for 5 years, ensuring long-term reliability
  2. Security: Regular security updates keep your server and data protected
  3. Huge Community: Extensive documentation and community support make troubleshooting easy
  4. Package Management: The APT package system simplifies software installation and updates
  5. Resource Efficiency: Works well even on older or limited hardware
  6. No License Fees: Completely free to use, even in commercial environments
  7. Regular Updates: Stay current with the latest technologies and improvements

Getting Started with Ubuntu Server

Ready to begin? Here’s how to get started:

  1. Download Ubuntu Server from ubuntu.com/download/server
  2. Install it on your preferred hardware (old PC, Raspberry Pi, or virtual machine)
  3. Choose one of the projects above and follow the step-by-step instructions
  4. Join the Ubuntu community for support and to share your experiences

Remember, these projects are just the beginning. As you become more comfortable with Ubuntu Server, you’ll discover countless more possibilities for creating valuable services for your home or small business.

Have you built any interesting projects with Ubuntu Server? Share your experiences in the comments below!


This guide was created to help newcomers explore the capabilities of Ubuntu Server. For enterprise environments, consider Ubuntu’s commercial support options.

Post Comment

You May Have Missed