Personal Server Project

By B.E. Alejandro3 minutes read


Objective

This project consists of creating a personal server from a reused computer, implementing the FreeBSD operating system. By using jails (FreeBSD native containers) and binary compilation, all necessary instances have been installed to create a fully functional, secure, and efficient server for personal use.


Base System

FreeBSD is an advanced operating system used to power modern servers, desktops, and embedded platforms. It has been continuously developed by a large community for over thirty years. Its advanced networking, security, and storage features make it the platform of choice for many high-traffic websites and widely used embedded networking and storage devices.

Enabled Configurations


Implemented Services

Network and Access

ServiceDescriptionStatus
SSHSecure remote access with key authentication✅ Active
WireGuardVPN for secure access to server services✅ Active
CloudFlareReverse proxy and DDoS protection✅ Configured

Web Services

ServiceDescriptionStatus
NginxHigh-performance web server✅ Active
PostgreSQLDatabase management system✅ Active
NextcloudPersonal cloud storage✅ Active
Let’s EncryptFree HTTPS certificates✅ Configured
BitwardenPassword manager✅ Active
SynapseMatrix messaging server✅ Active
PHPDynamic processing for web applications✅ Active

Security

ServiceDescriptionStatus
pfAdvanced firewall✅ Configured
fail2banProtection against brute-force attacks✅ Active
ClamAVLightweight antivirus✅ Active

Administration Tools

ToolDescriptionStatus
portsBinary compilation system✅ Configured
htopInteractive process monitor✅ Installed
tmuxTerminal session manager✅ Configured
ZFS snapshotsIncremental backup system✅ Automated

Backup and Monitoring

ServiceDescriptionStatus
ResticEncrypted backup system✅ Configured
NetdataReal-time monitoring✅ Active

Containers and Virtualization

TechnologyDescriptionStatus
bastilleBSDJail manager (FreeBSD containers)✅ Configured
bhyveNative FreeBSD hypervisor✅ Installed

Important Notes

  • In FreeBSD, it is often better to compile software from ports for maximum customization.
  • Packages (pkg) are very fast and efficient for standard installations.
  • FreeBSD documentation is considered one of the best in the world: Official Documentation

System Architecture

                    +------------------+
                    |   Proxy Inverso  |
                    |     (Nginx)      |
                    +--------+---------+
                             |
           +----------------++-----------------+
           |                |                  |
+----------v------+ +-------v--------+ +-------v--------+
|   Nextcloud     | |    Synapse     | |   Bitwarden    |
| (Almacenamiento)| | (Mensajería)   | | (Contraseñas)  |
+----------+------+ +-------+--------+ +-------+--------+
           |                |                  |
           +----------------v------------------+
                            |
                    +-------v--------+
                    |   PostgreSQL   |
                    | (Base de datos)|
                    +----------------+

Implementation Checklist


Next Steps

  1. Performance Optimization
  1. Service Expansion
  1. Documentation

References and Resources