Back to services

Self Host Blocks

Modular server management based on NixOS modules and focused on best practices.

View alternatives to Self Host Blocks
Suggest edit
Open source
Self-hostable
AGPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: We couldn't fetch the official site (the GitHub repository page), so the following was written from existing knowledge of the project. For details such as the license, the exact list of supported services and version requirements, please refer to the GitHub repository.

Introduction

Self Host Blocks is an open-source project hosted on GitHub (ibizaman/selfhostblocks) that provides a set of self-hosting modules on top of NixOS. It turns the foundational features that come up again and again in self-hosting into reusable "blocks", such as HTTPS certificates, a reverse proxy, backups, LDAP and single sign-on, and monitoring, and then combines these blocks with popular self-hosted applications. With just a few lines of declarations in your Nix configuration, you can deploy a fully configured, well-integrated service.

Key Features

  • Foundational blocks: Common modules for SSL/TLS certificates, a reverse proxy, databases, backups, a user directory (LDAP), single sign-on (SSO) and monitoring.
  • Pre-integrated services: Ready-to-use modules for common self-hosted applications, such as file storage and collaboration apps, password management and media servers, which are automatically wired into HTTPS, backups and the login system.
  • Contracts: A unified interface describes how modules work together, for example "needs a certificate" or "needs a backup", making it easy to swap out the concrete implementation of a block.
  • Declarative and reproducible: All configuration is written in Nix code, inheriting NixOS's reproducibility and rollback capabilities.
  • Testing: The project uses the NixOS testing framework to verify module behavior, reducing the risk of upgrades breaking things.

Target Users and Use Cases

  • Self-hosting enthusiasts who already use or plan to use NixOS and want to quickly deploy a set of services on a home server or VPS.
  • Users who don't want to research reverse proxy, certificate, backup and login integration separately for every service.
  • Operators who want their entire server configuration under version control, reproducible and easy to migrate.

Core Strengths

  • A single module sets up a service together with its surrounding infrastructure (HTTPS, SSO, backups, monitoring), saving a lot of manual integration work.
  • Thanks to Nix's atomic upgrades and rollbacks, you can go back to the previous system generation if something goes wrong.
  • Its modular design lets you use only the blocks you need instead of adopting all of them.

Deployment

You typically add Self Host Blocks as a Nix flake input, import its modules in your NixOS configuration, enable the services you need, and then apply the configuration to the target machine with nixos-rebuild or a deployment tool such as colmena or deploy-rs. For detailed steps and examples, see the documentation in the repository.

Technical Requirements

  • The target server must run NixOS.
  • A basic understanding of the Nix language and the NixOS module system is required.
  • To serve HTTPS to the outside world, you need a domain name and DNS configured.

Notable Characteristics

The project emphasizes being "ready to use and integrated with each other": rather than just packaging individual applications, it connects every service to a common authentication, backup and monitoring system by default, which suits users who want to build an all-in-one home server with NixOS.