Building My Homelab: Day 1 - From Zero to Nextcloud
Introduction
This isn’t my first time building a homelab, I did it before, more than 2 years ago and I loved it. That kind of homelab was far from perfect, but it was my playground for learning and getting hands dirty with Linux and containerization. I should have spent more time building proper homelab, but I set it up to the point where I could have Plex running as a docker container. I didn’t also had too much free time in that period of my life.
Even that basic setup gave me enough pleasure, as that was the starting point for my introduction to Docker which I used both for hobbies and professionally.
The whole setup did the thing for me, I could watch the movies and shows from my server. That kind of liberty felt good, but I always knew I wasn’t doing it properly. Among different missing things, I never wrote any documentation, files or configs. The biggest issue was lacking real Linux knowledge. I was also aware of that, but was too lazy to learn it. Two years in advance, I got some Linux fundamentals, I use Fedora OS daily. Now I want to do it properly and blog about it. I have a lot of plans, but they will probably change along the way, so there is no point in revealing them as I’ll probably find better solutions as I learn.
I’m currently working as a researcher, before I worked as a backend engineer in .NET and Azure. In my free time, I want to pursue building homelab from zero to hero.
The Hardware
I’m starting simple with what I have:
- Old Lenovo Y520 laptop (i5-7300HQ, 16GB RAM)
- 256GB NVMe SSD for the hypervisor and VMs
- 1TB HDD for future media storage
- Proxmox VE as my hypervisor
Not fancy, but perfect for learning, in the future I want to build small cluster.
Day 1 Goals
My plan for the first day was straightforward:
- Set up the foundation (Proxmox, first VM)
- Deploy my first self-hosted service (Nextcloud)
- Start documenting everything in Git
What I Built
The Architecture
Proxmox Host (192.168.50.34)
└── VM 110: gandalf (192.168.50.110)
├── Ubuntu 24.04 LTS
├── Docker + Docker Compose
└── Nextcloud (port 8080)
Simple, but it works. I named my VM “gandalf” following a Lord of the Rings theme for my homelab to make it more personalized and put life into homelab.
I set up my main machine as Ubuntu Server, it’s simple and it works out of the box. I made my user, set the static IP address and also set up SSH from my main machine so I can log in easily without a password.
The idea was to track everything early. I knew what I needed to do and created the Github repo immediately. Every file will be written and source controlled.
Installing Docker
Even though I know the pain of all manual work, I decided to repeat the process I did multiple times. I won’t be automating yet, just installing it old school.
First challenge: Installing Docker on Ubuntu. I learned about:
- Adding GPG keys for repository verification
- Why we add third-party repositories (newer versions than Ubuntu’s defaults)
- The
docker
group and whyusermod -aG
matters
Even though I installed Docker a couple of times on different Linux machines, I would do that without too much wonder. I don’t know if I should question every command I type, but I will try. Here was a good opportunity to learn how GPG keys work and how to add third-party repos and where those repos are even written. If I remember correctly, they’re under /etc/apt/sources.list.d
Deploying Nextcloud
I chose Nextcloud as my first service because:
- It’s actually useful (personal cloud storage)
- Multi-container setup (app + database)
- Teaches Docker Compose basics
- Real-world application
My docker-compose.yml
:
- Nextcloud app container
- PostgreSQL 15 database
- Docker networks for isolation
- Named volumes for data persistence
Problems I Hit (And Solved)
Problem 1: Automation
I would usually spend a lot of time thinking about the best way, but decided to go with installing git
on homelab and then pull the changes every time I make them.
Problem 2: Secrets
I was also thinking about how to manage secrets, I would like to have that managed properly from day 1, but in the end, I just wanted to see Nextcloud running, so I wrote the whole config into .env file.
Problem 3: “Invalid Username or Password”
Nextcloud installed before I had my .env
file configured properly. The solution: docker compose down -v
to delete volumes and start fresh.
This taught me an important lesson: Docker volumes persist even when containers are removed. The -v
flag is critical for true clean reinstalls.
What I Learned
Docker Concepts
- Containers vs images
- Docker Compose for multi-container apps
- Environment variables and
.env
files - Volume management and persistence
- Container networking
Security Practices
- SSH key authentication (no more passwords!)
- Why
.env
files should NEVER be committed to Git - The importance of
.gitignore
The Win
After today, I have:
- ✅ My own cloud storage running
- ✅ Everything in Git (properly!)
- ✅ A working Docker Compose setup
Next Steps
Next steps I’m planning to:
- Set up virtual network
- Start working on pfSense for network segmentation
- Learn about VLANs and firewall rules
The goal is to build a production-grade homelab while learning:
- Advanced networking
- Infrastructure as Code (Ansible)
- CI/CD pipelines
- Kubernetes orchestration
Repository: github.com/mtikvica/homelab
Building in public, learning in public, failing in public. That’s how you grow.