← Back to Tony's Portfolio

Self-Hosted Ubuntu Server & Home Lab

I built a dedicated Ubuntu server at home as a platform for learning, testing, and running self-hosted services. What started as a relatively small environment for website staging and ERPNext testing gradually developed into a broader home lab running Docker services, shared storage, media systems, monitoring, backups, smart-home applications, and other experimental projects.

Problem

I originally wanted a flexible server environment where I could learn Linux, experiment with self-hosted software, test websites and ERP systems, and work with Docker without affecting live or production services.

As I started using the server for more projects, it also became useful for everyday services such as shared storage, backups, monitoring, media, photo management, and smart-home applications. This created a need for a setup that could run several different services reliably while keeping them organized and manageable.

Solution

I built the environment around an Ubuntu Linux server and use Docker and Docker Compose to keep most services separated, easier to manage, and simpler to expand without installing everything directly on the host system.

As the home lab grew, I added dedicated storage locations, network file sharing, scheduled backups, monitoring, media and photo services, smart-home applications, development and testing environments, and different methods for local and remote access. The server now acts as the central platform for several self-hosted systems rather than a single-purpose test machine.

Key Features

  • Ubuntu-based home lab running multiple self-hosted services
  • Docker and Docker Compose used to separate and manage applications
  • Dedicated storage for application data, shared files, media, and photos
  • Samba file sharing across the local network
  • Automated backup routines with historical retention
  • Local, private remote, and selected public access using different network methods
  • Monitoring, logging, and health checks across hosted services
  • Platform for smart-home, media, photo management, development, and testing projects
  • Continuously expanded and maintained as new services and experiments are added

Services & Containers

The server now hosts several services with different purposes. Most are containerized with Docker, allowing applications to be managed separately while still sharing the same underlying server, storage, and network.

  • Home Assistant for smart-home devices, cameras, dashboards, and automations
  • Immich for self-hosted photo and video management
  • Jellyfin for locally hosted media streaming
  • Uptime Kuma for monitoring services and availability
  • ERPNext environments for learning, configuration, and workflow testing
  • Website staging and other development or test services
  • Supporting containers and tools used for monitoring, administration, integrations, and experiments

Storage & File Sharing

The server uses multiple physical drives with different purposes rather than storing everything on the operating-system drive. Application data, shared files, media, photos, and other larger datasets can therefore be kept on storage suited to their role.

Selected folders are shared across the local network using Samba, allowing Windows computers and other devices to access central files and media while the same storage is also available to services running on the server.

  • Separate system, application, and bulk-storage locations
  • SSD storage used for frequently accessed files and application data
  • Larger HDD storage used for media, photos, and other high-capacity data
  • Samba network shares for access from Windows computers
  • Shared storage used by both household devices and self-hosted services

Backups & Reliability

As the server started holding more important files and running services that are used regularly, backup and reliability became a larger part of the project.

I created scheduled backup routines for shared files and hosted services, with historical copies retained so that older versions can be recovered if something is accidentally changed, deleted, or damaged.

  • Automated scheduled backups
  • Incremental backups of important shared files
  • Historical backup retention instead of keeping only the latest copy
  • Backups of selected self-hosted services and application data
  • Monitoring and service checks used to identify problems earlier

Networking & Remote Access

Most services are intended to stay on the local network, while selected systems can be accessed remotely when needed. I use different access methods depending on whether a service should remain private or be made publicly available.

SSH is used for server administration, Tailscale provides private remote access to the home network, and Cloudflare Tunnel can expose selected web services without requiring direct router port forwarding.

  • Local network access for internal services
  • SSH for remote administration and maintenance
  • Tailscale for private remote access to the server and home network
  • Cloudflare DNS and Cloudflare Tunnel for selected public web services
  • Public services kept separate from applications intended only for private access
  • Remote access without exposing every hosted service directly to the internet

Monitoring & Administration

As the number of hosted services increased, I needed better visibility into what was running and whether services were healthy. Monitoring is therefore used alongside normal Linux and Docker administration to make problems easier to identify and troubleshoot.

I use service monitoring, container logs, system information, and custom monitoring tools to follow availability and server behaviour. I have also experimented with lightweight API-based monitoring to collect and display historical server information.

  • Uptime Kuma for service availability and health monitoring
  • Docker and container health checks for hosted applications
  • Central access to container logs for troubleshooting
  • Linux system tools used to inspect resource usage, storage, processes, and services
  • Custom monitoring and API experiments for collecting historical server data
  • Ongoing troubleshooting and maintenance across multiple self-hosted services

Tools Used

Ubuntu Server Docker Docker Compose Samba rsync SSH / SCP Tailscale Cloudflare DNS / Tunnel Nginx Uptime Kuma Dozzle Home Assistant Immich Jellyfin ERPNext

Result

What started as a small testing environment has developed into a practical home lab that I use regularly for self-hosted services, storage, backups, media, smart-home systems, monitoring, development, and technical experiments. The project has given me hands-on experience with Linux, Docker, networking, storage, automation, troubleshooting, and maintaining multiple services on one server.