Why run your own private cloud
If you are tired of monthly cloud storage fees and want full control over your files, self-hosting can be very empowering. In the video I walk through a beginner-friendly Nextcloud setup on Ubuntu Server 24.04 using [Docker Compose](/blog/i-replaced-my-docker-stack-with-this-cosmos-server-tested). This article follows that same path and focuses on the practical choices, tradeoffs, and the skills you build along the way - Linux, Docker, networking, storage, backups, and security.
This is not about flipping the switch and canceling every cloud service overnight. It is about taking control one step at a time while learning how these systems work.
The tradeoffs - convenience versus control
Public cloud services are convenient. They handle uptime, backups, security, and device syncing for you. Self-hosting swaps those conveniences for control. You decide how your data is stored, where it lives, and who can access it. But that control comes with responsibilities - maintenance, monitoring, and planning for redundancy and backups.
If you value privacy, customization, and learning, self-hosting is a great path. If you need near-zero maintenance and guaranteed support, public cloud may still be the right choice for some of your needs. Many people take a hybrid approach - keep critical items in a paid cloud and self-host the rest.
What you need to get started
Based on the setup demonstrated in the video, here are the core requirements:
- Ubuntu Server 24.04 as the host operating system. This is the distribution I used and recommend for beginners following this walkthrough.
- Docker and Docker Compose. These make deploying and managing Nextcloud and its supporting services much easier than manual installs.
- A machine or VM to run the server. It can be a small home server, an old PC repurposed, or a VM on existing hardware. The exact resources you need depend on how many users and how much data you plan to host.
- Basic comfort with the Linux command line. You do not need to be an expert, but familiarity with installing packages, editing config files, and using systemctl will help.
- A plan for storage and backups. More on that below.
Starting Nextcloud with Docker Compose - high level
The video shows a beginner-friendly Nextcloud deployment using Docker Compose. The important high-level pieces you will configure are:
- A Nextcloud container to run the application itself.
- A database container. Nextcloud needs persistent storage for its metadata and settings.
- A persistent volume or bind mount for Nextcloud file storage so your data survives container rebuilds.
Docker Compose helps you define and run all of those pieces together, making updates and reboots simpler. I intentionally keep this walkthrough approachable for newcomers, focusing on good defaults and minimal initial complexity.
Note - I do not include specific commands or a Compose file here. The video walks through using Docker Compose on Ubuntu Server 24.04 and shows how to get the stack running. Follow those steps in the video for the exact commands and YAML examples.
Creating the Nextcloud admin account
Once the containers are running you will create an admin account inside Nextcloud. This is a standard web-based setup step. A couple of tips:
- Use a strong, unique password for your admin account. If your server is exposed to the internet you must assume it will see automated login attempts.
- Consider creating a separate, limited user for daily file syncs and reserve the admin account for maintenance tasks only.
Syncing files across devices
Nextcloud offers clients for desktop and mobile to keep files in sync across your devices. In practice you will typically:
- Install the Nextcloud client on each device you want to sync.
- Configure the client to sync specific folders rather than everything by default. This helps control local disk usage and upload bandwidth.
- Use selective sync for large media libraries and consider keeping high-value, frequently accessed data on sync while archival data can remain on the server only.
Remember - syncing large amounts of data over a residential connection can be slow. If you plan to sync many gigabytes or more, factor in network speed and data caps.
Backups and the 3-2-1 rule
Self-hosting means you are responsible for backups. A good rule to follow is the 3-2-1 rule:
- Keep at least 3 copies of your data.
- Store those copies on 2 different media types. For example local disk plus an external drive or NAS.
- Keep 1 copy off-site. That could be an external backup, an encrypted drive stored elsewhere, or a paid cloud backup for disaster recovery.
Backups should include both the Nextcloud file storage and the database. Simply copying files without backing up the database can leave you with incomplete or inconsistent restores. Automate backups, verify them regularly, and test restores so you know they work.
Common self-hosting mistakes - concrete gotchas to avoid
Here are practical mistakes I see beginners make. Avoid these if you want a reliable private cloud.
-
Skipping backups. People assume their storage is safe until hardware fails. It will fail. Set up automated backups from day one and test restores.
-
Exposing services to the internet without TLS and proper firewall rules. If you make your Nextcloud instance accessible from the internet, encrypt traffic and restrict access. An unencrypted or unprotected server is an easy target for abuse.
-
Using the admin account for daily syncing. Using the same account for admin tasks and everyday file sync increases risk. Create a limited user for syncing and keep the admin account locked down.
-
Ignoring updates. Updates patch security issues and improve stability. Make a plan for applying updates regularly, and test them in a controlled way so you avoid surprises.
-
Assuming cheap hardware can handle large loads. An older machine is fine for a personal instance, but understand its limitations and plan accordingly for growth.
A recommended gradual approach
You do not need to quit your paid cloud provider in one go. A safer route is:
- Start by self-hosting non-critical files and backups. Get comfortable with the stack and your maintenance routine.
- Test syncing and restores thoroughly before moving anything you cannot replace.
- Keep a paid cloud copy of critical data until you have proven backups and a recovery plan.
This reduces risk while you build confidence and skills.
Final thoughts
Running your own Nextcloud on Ubuntu Server 24.04 with Docker Compose is a fantastic learning experience. You will pick up practical Linux and Docker skills while gaining more control over your data. Be honest about the tradeoffs - self-hosting gives you control but also requires responsibility for backups, security, and maintenance. Start small, focus on backups and security from day one, and grow your setup as you become more comfortable.
If you followed the video you should now have a clear, practical path to begin building your private cloud. Keep experimenting, automate the boring parts like backups, and remember that this is a marathon not a sprint.
Thanks for watching and happy self-hosting.
Josh / KeepItTechie
~ KeepItTechie

