How to host your server with OpenBSD ? Table of content

1) Prerequisite

How to host your server with OpenBSD ?

What hardware should I use ?

OpenBSD install

Someone can host OpenBSD for me ?

Survival guide: which commands must I know?

What sould you do after first boot ?

Network addresses

Configure your router and redirect ports

Get a domain name

DNS records

2) Manage your server

Daily reports

The Firewall (pf)

SSH: administer remotely

Keep the system up to date

Backup

SFTP : Secure file transfer

3) An on-time server

Keep your server on time (ntpd)

4) Host websites

Host a website (httpd)

Simple static website

Get a SSL certificate

PHP

A few tips for httpd

How to set permission for website files ?

Relayd and headers

Databases

Webapps you can host

5) Host your emails

About hosting emails

DNS configuration for an email server

Get certificates

A mail server in 10 minutes

Full mail server with virtual users

Manage multiple domains

Redirecting mails

How to configure you mail client ?

DNS record for clients (facultative)

Do not loose mails : MX fields and backup

Do not be considered as a spam (SPF, DKIM...)

Blocking ISP : use external SMTP

Avoid receiving spam : senderscore filter

Avoid receiving spams : spamassassin

Avoid receiving spams : rspamd

Manage spams with dovecot

Fight against spams before receiving one : OpenBSD's spamd

Check everything works well

What if smtp server doesn't work as expected?

6) Domain name server

Domain name server : fundamentals

Validating DNS resolver : unwind

Authoritative name server : nsd

Check your zone works as expected

Complete and free example with nic.eu.org

7) Virtualization

Virtualization

How to virtualize OpenBSD ?

Virtualize debian

Virtualize Alpine Linux

8) VPN

What is a VPN?

Wireguard

VPN with OpenIKED

Get a static IP thanks to a VPN

Get an IPv6 thanks to a VPN

9) Various services

Gemini with vger

Gopher

mlmmj : Mailing List

Monitoring

Webradio

Seedbox

Syncthing

TOR : relay and hidden services

XMPP

10) Tips, FAQ, comments...

About apu2

Check file checksum

How to change password

Periodic tasks (cron)

Disk Partitioning

How to find my network interface ?

Logs

Check for improvements with lynis

How to deal with power loss ? Where my mails are going ?

I have a problem, what can I do ?

Generate good random passwords

Split and reassemble files

How to add/delete users?

SSH Tunnel : Proxy or VPN

11) Configuration examples

/etc/dovecot/local.conf

/etc/httpd.conf

/etc/monitrc

/var/nsd/etc/nsd.conf

/etc/pf.conf

/etc/relayd.conf

/etc/mail/smtpd.conf

/etc/mail/spamd.conf

/etc/webalizer.conf

Notes

Printable version / PDF

Contributing

Thanks