Self Hosting 101 - A Beginner's Guide

July 15, 2024
setal@ente.io

What is Self-Hosting?

All the internet applications you use on a daily basis like TikTok, Google Photos, Netflix, etc. need servers to store and process data. These servers are either owned by these large companies, or rented out from other companies like Google, Amazon, Microsoft. When you use any of these applications, you share some data with them. This data is stored and processed by these servers.

Theoretically, these companies can access this data, and use them as they want - improve their algorithms, train their AI models or serve better advertisements. Moreover, basis the local laws, this data can also be shared with the government. There are 2 ways to ensure that your data cannot be accessed by anyone - a) applications that use verifiable end-to-end encryption ensures that even while your data is stored in such server farms, no-one except you can make any sense out of it; and b) self hosting your own server, which we will discuss in this post.

Self-hosting is the practice of running and maintaining your own server to host various services and applications, rather than relying on third-party services. In simpler terms, it's like having your own personal data center at home or in your office.

When you self-host, you're in charge of everything – from the hardware (like the computer or server) to the software (the programs and applications) that run on it. This gives you complete control over your data and services, but it also means you're responsible for keeping everything running smoothly.

Who is Self-Hosting For?

Self-hosting isn't just for tech experts. It's for anyone who wants control over their digital life and wants to put in the effort to learn, setup and maintain their systems. Some people who might be interested in self hosing -

  • Privacy-conscious individuals: If you're worried about big tech companies having access to your data, self-hosting allows you to keep your information under your control.
  • Tech enthusiasts: Self-hosting can be a fun hobby, if you love tinkering with technology and learning new things.
  • Small businesses: Companies that want to keep their data in-house, have specific needs that aren't met by off-the-shelf solutions, or want to save cost of subscriptions
  • Educators and students: Self-hosting is a great way to learn about networking, system administration, and various technologies like Docker
  • Creative professionals: Video Editors, photographers, musicians have a massive amount of raw files that need storage with a high amount of control - self hosting is typically the goto solution
  • Anyone looking to save money: While there can be upfront costs, self-hosting can sometimes be cheaper in the long run compared to paying for multiple cloud services.

Why Should You Consider Self-Hosting?

There are several reasons to consider self-hosting:

  • Independence: You're not reliant on third-party services that might change their terms, increase prices, or even decide to shut down.
  • Control: Self Hosting gives complete control over your the services you use and your data including who has access to your information.
  • Cost savings: While there may be upfront costs, self-hosting can be more economical in the long run, especially if you're currently paying for multiple cloud services.
  • Privacy: Your data stays on your own hardware, reducing the risk of it being accessed by third parties without your knowledge.
  • Customization: You can setup your system to serve your exact needs, installing and configuring software exactly how you want it.

What Can You Self-Host?

There are a large number of services that you can self host - whether its for personal use or for your business.

For You and Your Family

ServicesUseCaseBenefitsExamples
File Storage and SynchronizationCreate your personal cloud storageFull control over files, no storage limits except hardwareNextCloud, OwnCloud, Seafile, Syncthing
Email ServersHost your own email servicePrivacy, custom domain emails, no adsPoste.io, iRedMail, MailCow
Personal Photo ManagementManage you and your family’s photosFull control, no storage limitsImmich, PhotoPrism, Ente
Media ServersStream personal media collection to any deviceAccess media anywhere, no streaming service subscriptionsJellyfin, Emby, Plex
Password ManagersSecurely store and manage passwordsEnhanced security, no reliance on third-party servicesBitwarden, Passbolt
Virtual Private Networks (VPNs)Secure internet connection, access home network remotelyEnhanced privacy, no monthly VPN feesOpenVPN, Wireguard
Game ServersHost multiplayer games for friends or communitiesCustom rules, mods, no rental feesMinecraft, Valheim, Terraria servers
Home Automation SystemsControl and automate smart home devicesLocal control, enhanced privacy, no reliance on cloud servicesHome Assistant, OpenHAB
RSS Feed ReadersAggregate and read news from various sourcesNo algorithms deciding content, complete archive of feedsTiny Tiny RSS, FreshRSS
Note-Taking ApplicationsSecurely store and sync notes across devicesPrivacy, full control over dataJoplin, LogSeq
Personal Finance Management ToolsTrack expenses, manage budgets, monitor investmentsFinancial data privacy, customizable categories and reportsFirefly III, GnuCash
Learning Management SystemsCreate and manage online coursesFull control over course content and student dataMoodle, OpenEdX

For Your Business

ServicesUseCaseBenefitsExamples
Project Management ToolsManage personal or small business projectsCustomization, no per-user feesRedmine, Taiga, OpenProject
Chat and Communication ServersSecure, private messaging and team communicationEnd-to-end encryption, no data miningMatrix (with Element), Rocket.Chat, Mattermost
Wikis or Knowledge BasesOrganize personal or team knowledgeCustomization, privacy, no subscription feesDokuWiki, BookStack, MediaWiki
Analytics PlatformsTrack website visitors without compromising user privacyGDPR compliance, no data sharing with third partiesMatomo, Plausible Analytics
E-commerce PlatformsSet up your own online storeNo transaction fees (except payment processing), full customizationWooCommerce (with Wordpress), Presta

There are a bunch of other services that can be self hosted. You should do your own research to discover the ones that match your needs. There are a lot of communities on self hosting like r/selfhosted that can help you with the same as well.

We should also point out that there are a lot of services that cannot be self hosted - atleast not without significant drop in quality

  • Global Scale Social Networks like Facebook, Twitter, Tiktok, Instagram, etc.
  • Search Engines like Google that require massive amount of data and sophisticated algorithms
  • App Stores like Google Play Stores, Apple App Stores, Steam, etc. which requires a large developer ecosystem
  • Video Streaming Services like Netflix, Youtube which requires a massive library of content
  • Marketplaces like Uber, Doordash which require an ecosystem of drives, restaurants or other suppliers

While you can't self-host these large-scale services, remember that there are often smaller, self-hosted alternatives that can meet similar needs for individuals or small groups. The key is to identify which services are most important to you and find suitable self-hosted options for those.

How to Start Self-Hosting?

Setting up self hosting can sound very intimidating to begin. However, starting small with a few core services that you need would help you learn, improve and then start hosting more and more services over time. This guide should help you get started

  • Assess Your Needs and Skills:
    • Before starting, consider what services you want to self-host and evaluate your technical skills. Start with simpler projects if you're a beginner, and gradually work your way up to more complex setups.
  • Choose Your Hardware:
    • You have several options for self-hosting hardware:
      • Repurposed PC: An old computer can be an excellent starting point.
      • Single-board computer: Devices like Raspberry Pi are popular for small-scale hosting.
      • Network Attached Storage (NAS): Purpose-built for file storage and often supports additional services.
      • Dedicated server: For more demanding applications or if you need more power.
  • Select an Operating System:
    • Linux distributions are popular for self-hosting due to their stability and free, open-source nature. Some options include:
      • Ubuntu Server: User-friendly and widely supported.
      • Debian: Known for its stability and security.
      • Proxmox: Allows you to run multiple virtual machines and containers.
  • Set Up Your Network:
    • Configure your router to allow port forwarding for services you want to access outside your home network.
    • Consider setting up a Dynamic DNS service to easily access your server from the internet.
    • Implement a reverse proxy (like Nginx Proxy Manager or Traefik) to manage access to multiple services.
  • Implement Security Measures:
    • Use strong passwords and consider setting up SSH key authentication.
    • Keep your system and applications updated.
    • Use a firewall to control incoming and outgoing traffic.
    • Consider setting up a VPN for secure remote access.
  • Choose and Install Your Services:
    • Start with one or two services and gradually expand. Some beginner-friendly options include:
      • Nextcloud for file storage and synchronization
      • Jellyfin for media streaming
      • Bitwarden for password management
  • Use Container Technologies:
    • Docker and Docker Compose can simplify the process of installing and managing services. They allow you to:
      • Easily deploy applications without worrying about dependencies
      • Quickly update services
      • Isolate applications from each other for better security
  • Set Up Backups:
    • Implement a robust backup strategy to protect your data:
      • Use the 3-2-1 backup rule: 3 copies of your data, on 2 different media, with 1 copy off-site
      • Consider automated backup solutions like Duplicati or Borg Backup
  • Monitor Your Services:
    • Set up monitoring to keep track of your server's health and performance:
      • Use tools like Prometheus and Grafana for detailed monitoring
      • Set up alerts to notify you of any issues
  • Join Self-Hosting Communities:
    • Connect with other self-hosters to learn, share experiences, and get help:
    • Join subreddits like r/selfhosted
    • Participate in forums dedicated to the specific software you're using
  • Learning and Improvement:
    • Experiment with new services and technologies
    • Stay updated on best practices for security and performance
    • Consider donating or contributing to open-source projects you use

Self-hosting is a learning process. Start small, be patient, and ask for help whenever you need it. With experience, you'll be able to handle more complex projects and over time create a self-hosted environment that perfectly suits your needs.

A Word of Caution

Like any technology choice, self-hosting comes with its own set of pros and cons. While we have talked about the value of self hosting, its only fair to call out the risks and challenges

  • Technical complexity: Setting up and maintaining a self-hosted system requires technical knowledge and can be challenging for beginners. Though this is also a learning opportunity.
  • Time investment: Self-hosting requires maintenance, updates, and troubleshooting, which can be time-consuming.
  • Upfront costs: There would be initial expenses for hardware and potentially for software licenses, depending on what you're hosting.
  • Security: You're in charge of keeping your system secure, which includes setting up the right security configuration, regular updates, and regular monitoring for potential threats.
  • Data loss: You risk losing your data if something goes wrong with your hardware or software, unless proper backup strategies are implemented
  • Support: Unlike commercial services, you won't have a dedicated support team to help you if something goes wrong. Though there should be an active community where you might find answers
  • Power and internet requirements: Your self-hosted services need a stable power supply and internet connection to be accessible from outside your network. If your internet or power goes down, you might lose access to your services when you're away from home.
  • Scalability: Home internet connections and consumer-grade hardware may struggle with high traffic or resource-intensive applications

Ente

Ente is an end-to-end encrypted, private home for your photos and videos. While our clients (where most of the work happens) has been open source for quite some time, we recently made our entire codebase open source. For a product claiming privacy, it was important that our code is available to everyone for scrutiny. This also attracted the self hosting community to Ente, and while our primary product is cloud based, we have now also made it easier to self host Ente. Given Ente is E2EE, self hosting would lead to even stronger protections, as even the system admin wouldnt be able to view your photos and videos - making it one of the most privacy friendly system, whether its on the cloud or self hosted.