How to host your server with OpenBSD ?
You are about to dive into the world of self-hosting. This document is written to help you host at home or on a dedicated (rented) server some services unfortunately too often entrusted to third parties. The main goal is to keep things as simple as possible while learning gradually. Of course, compromises have been made. If you feel you want to learn more after reading this, that's great! đ
Why OpenBSD?
In order to keep things simple, but secure, we describe OpenBSD OS in its last stable version. It is known to be safe. It is also, in my opinion, easy to configure because the same syntax is shared by different included tools.
Some says OpenBSD documentation is great. How this documentation can be useful to me?
It is for sure! Manpages are amazing, use them as a reference. I see this documentation as an entry point, not a replacement. Some fundamentals will be explained with a few tips. Anyway, manpages are great and you should read them too.
You'll see, hosting your server isn't that difficult and is mostly text-edition. Everyone should be able to do it.
Ready ?
Self-hosting : what is it? Pros and cons.
Most website you're used to read -- emails, social networks... -- are hosted on computers somewhere in the world. They are only used to serve contents to other computers, so we call them "servers". The biggest difference from most people point of view is that "they don't have a screen".
When you want to read your mails, a client (a webmail, Thunderbird...) is asking the server to retrieve your messages. A copy of them is then downloaded on your computer. In "real life", that would look like this :
Hey, mailman, do you have anything for me?
Yes, a postcard from your mom. I give it to you as soon as the copier finish to print it.
Of course, you can ask the post office to delete the message. But how can you be sure ALL copy have been deleted?
Better become you own post office, don't you think? đ
At first, everyone was supposed to make a part of the web. Now, most of us depend on private companies that disrespect privacy.
Pros
- Data stays home. You keep control on it. You can be confident : your document aren't forgotten on a hard drive trashed after Google docs renew its hardware, or worse, sold to someone else.
- Your privacy is safe. Your mails aren't scanned to suggest targeted advertisement in your browser.
- You can have services that suits your needs.
- You can use low-powered hardware and be more environmentally friendly.
- Self-hosting is fun and rewarding.
Arguing that you don't care about the right to privacy because you have nothing to hide is no different than saying you don't care about free speech because you have nothing to say. -- E. Snowden
Read about the argument "Nothing to hide"
Cons
- It's time consuming.
- Bandwidth of your internet acces might not be enough depending what you want to host. Without optical fiber, movies and big data transfer could be tricky, though not impossible. No problem for mails.
- You have to take care of security. Fortunately, we use OpenBSD.
About this document
In this document, we assume that:
- You use OpenBSD
- Make sure to understand that commands beginning with "#" means "run as root or superuser" and those beginning with "$" are executed as regular user.
- Sometimes, we'll use "*". This means it must be replaced by anything that match your needs. As example, "John D*" can mean "John Doe" or "John Deer", depending on the situation. Actually, it means both đ
Understand that your reference should always be the official FAQ.
About and license
This documentation is published under CC-BY license, using gemtext files (plain text), converted with "gmi2xhtml.awk" and a Makefile. It was written by an OpenBSD enthusiast (and contributors) who wondered "If I can, others too". Please tell me if you share this document somewhere else, just to know. Thanks. đ
If you find any mistake, whish to contribute or need help, feel free to contact me.
There is no ad or tracking scripts on this site.
Only your contributions help me to pay hosting and time given to this project.
If you want and can, you can donate to help me. Thank you! âĨ
Do not hesitate to print this documentation on paper or on PDF đŗ. CSS is ready for a nice print rendering đ.
What about the official FAQ?
This document is not a duplicate of the official OpenBSD's FAQ. You should ALWAYS refer to official documentation and manpages when available.
For those who need to read the FAQ offline, I keep an up-to-date archive downloadable from my server.
openbsd-faq.tgz : download and extract to read it offline.