Introduction to selfhosting
Link to documentation of my homeserver
In this guide you will find easy-to-follow steps and explanations that will help you set up your own server at home using Linux, Docker, and either Port Forwarding or Cloudflare tunnels.
What is selfhosting?
Selfhosting may sound complicated at first, but in practice it simply means running your own services on hardware you control. In other words, it is the practice of hosting applications on your private server instead of relying on tools outside your administration.
The biggest benefit is control – you decide what software you run, how you secure it, and who has access. This gives you full ownership of your data, privacy, and network architecture. You might also save some money but that's a lie that all selfhosters tell themselves. More importantly, selfhosting will improve your skills in Linux, Docker, networking, web protocols, and many other areas.
Some popular examples of selfhosted services include:
- Cloud storage with Nextcloud instead of Google Drive or Dropbox
- Media server with Jellyfin instead of Netflix or Plex
- Git hosting with Gitea instead of GitHub
- Password manager with Vaultwarden instead of 1Password or LastPass
- Recipe manager with Mealie instead of paid meal planning apps
- Bookmark manager with Linkwarden instead of hosted solutions like Raindrop.io
- Monitoring with Uptime Kuma instead of commercial uptime monitoring tools
- Game server hosting providing full control and reduced recurring costs compared to commercial hosting
This is just a glimpse of what is possible. If a service exists in the cloud, there is often an open source alternative that you can selfhost.
Pros & Cons of Selfhosting
Everything has pros and cons. Selfhosting is no exception. It can be incredibly rewarding, but also frustrating if you are not prepared.
Pros
- Control: Your data is completely under your control. You decide how it is stored, encrypted, and backed up. Open source alternatives give you flexibility and freedom to customize your setup.
- Privacy: No hidden telemetry, data collection, or third-party tracking. You know exactly what runs on your server and you are the only one who decides who has access.
- Independence: You are less dependent on external companies that can shut down, change pricing, or remove features. With selfhosting there are no vendor lock-ins.
- Skill development: You will naturally learn a lot about Linux, containers, networking, DNS, SSL certificates, and web protocols. These are valuable skills both as a hobby and professionally.
- Potential cost savings: Some services like a Minecraft server or a password manager can be run at home with minimal cost compared to hosted solutions. While you will pay for electricity and hardware, you can avoid monthly subscription fees.
- Customization: You can configure services exactly the way you want. Want a different theme? Plugin? Custom domain? With your own server you are not limited.
Cons
- Responsibility: You are the system administrator. Updates, backups, troubleshooting, monitoring, security patches – all of this is your job. There is no support hotline to call.
- Security risks: Misconfigurations or outdated software can lead to vulnerabilities. You need to stay on top of updates and follow security best practices.
- Uptime challenges: Cloud providers have multiple datacenters, backup power, and redundancy. Your home server does not. Power outages, router restarts, or disk failures can make your services unavailable.
- Learning curve: It can feel overwhelming in the beginning. Linux commands, Docker syntax, DNS records, and SSL certificates can be a lot to absorb at once.
- Hardware limitations: Running many services requires more RAM and storage. Some setups might push your hardware to the limit and you may need to invest in better equipment.
What should you know before starting?
Before you dive into selfhosting, there are a few basics that will make your life much easier:
- Linux fundamentals: You do not need to be an expert, but you should know how to navigate the terminal, edit files, and manage services. Distributions like Ubuntu or Debian are beginner friendly.
- Networking basics: Understanding concepts like IP addresses, ports, DNS, and firewalls will help you configure your services correctly and avoid frustration.
- Docker basics: Most selfhosted apps today are shipped as Docker containers. Learn how to run, stop, and update containers, and how to read
docker-compose.yml
files. Tools like Portainer can make this easier. - Backups: Things will break sooner or later. Always make backups of important data (e.g. Nextcloud files, databases, configs).
- Security awareness: Exposing services to the internet without proper setup is dangerous. Use HTTPS, strong passwords, two-factor authentication, and keep everything updated.
If you feel comfortable with these basics, you are ready to start experimenting.
Okay, but how do I start?
If you are wondering how to begin in practice, here is a simple roadmap:
- Choose your hardware: Decide whether you want to repurpose an old PC, buy a business mini PC (like a Lenovo ThinkCentre, Dell OptiPlex, or HP EliteDesk), or start with a Raspberry Pi. Make sure it has enough RAM and storage for your needs.
- Install Linux: Pick a beginner friendly distribution like Ubuntu Server or Debian. Get comfortable with connecting to your server over SSH.
- Keep your system updated: Regular updates are essential for both stability and security.
- Install Docker and Docker Compose: Containers make running selfhosted apps much easier and reduce the risk of breaking your base system.
- Deploy your first service: Start with something useful and rewarding, such as Nextcloud for personal cloud storage or Jellyfin for streaming your media.
- Set up backups: Make sure you have a backup strategy in place for important data and configuration files.
- Expand gradually: Once you feel comfortable, try out new services like a password manager, a Git hosting platform, or a monitoring tool. Add them step by step instead of all at once.
Remember: it is better to have one reliable service running well than ten broken ones you never use.
Helpful resources
- r/selfhosted – main subreddit for discussions, tutorials, and questions.
- awesome-selfhosted – a massive list of selfhostable software.
- PoProstuWitold/homeserver – my personal guide and documentation of my setups (Cloudflare tunnels & port forwarding).
YouTube channels worth checking
- DB Tech – practical tutorials for Docker and selfhosting.
- TechHut – Linux, hardware, and privacy focused.
- Hardware Haven – hardware reviews and selfhosting builds.
Nobody paid me to recommend them. These are my honest recommendations.
Best practices
As you grow your selfhosting journey, here are some best practices to keep in mind:
- Use Docker or Podman: Containers make managing and updating services much easier.
- Automate backups: Keep at least one copy offsite – for example on another machine, an external drive, or encrypted in a cloud service.
- Use a domain name: It is much easier to remember
cloud.mydomain.com
than IP addresses. - Secure with HTTPS: Protect your services with free certificates from Let's Encrypt or use Cloudflare for TLS termination, DDoS protection, and DNS management.
- Monitor your system: Tools like Grafana, Prometheus, or Uptime Kuma help keep an eye on things.
- Document your setup: Write down commands, configs, and notes. Future you will thank you.
Conclusion
I believe that selfhosting is both a rewarding hobby and a valuable learning experience. While it can sometimes be challenging and requires patience, responsibility, and curiosity, the benefits far outweigh the effort. You gain privacy, control, and independence while also improving your technical skills in areas like Linux, Docker, networking, and security.
There will be moments of frustration, but there will also be moments of pride when your services run smoothly, when you share your own Minecraft world with friends, or when you realize you are no longer dependent on a big tech company to manage your data.
Embracing selfhosting means embracing both freedom and responsibility. It deepens your understanding of technology and gives you the unmatched satisfaction of building and maintaining systems that are truly your own.