Skip to content

🐡 Shell script for self-hosting cloud, email, and git services

License

Notifications You must be signed in to change notification settings

cristianzsh/openbsd-selfhosted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenBSD self-hosted

This is the script I use to deploy my self-hosted services on top of OpenBSD. You are free to use and modify it according to your needs. Contributions are also welcome!

Tested on OpenBSD 6.7

Prerequisites

  1. This script assumes you are running a fresh OpenBSD system on a public server (e.g., a VPS).
  2. You must have a domain name pointing to your server's IP and subdomains (www, git, cloud, and mail).

Goals

  1. Self-hosting my most used services for privacy reasons.
  2. Being able to customize my setup and add more features whenever I want.

Software

OpenBSD base system:

  • acme-client(1): for managing Let's Encrypt certificates.
  • httpd(8): nice and simple web server.
  • smtpd(8): for managing mails.

Ports:

  • dovecot: for IMAP access.
  • Git and cgit: for managing source code repositories.
  • PHP: for running RainLoop and Nextcloud.
  • PostgreSQL: data storage for Nextcloud.
  • rspamd: spam filtering system.

Web systems:

  • RainLoop: a nice UI for the email system.
  • Nextcloud: a safe place for all your files.

Please remember to always check the source and not just run some random code on your machine.

Installation

Just run the following commands as root:

chmod +x setup.sh && ./setup.sh

You will be prompt for some basic information required for the configuration files.

What you will get after installation:

A fully functional self-hosted server for your git repositories, files, and mails.