A self-hosted homelab built on Debian, managed with Ansible and Docker Compose. The goal is to create a secure, maintainable environment for hosting personal services while learning Linux administration, networking, automation, and infrastructure management.
| Component | Details |
|---|---|
| Server OS | Debian 13 (Trixie) |
| Hostname | homelab |
| Administration | SSH over Tailscale |
| Configuration management | Ansible |
| Container runtime | Docker Engine |
| Container orchestration | Docker Compose |
| Storage | 1 TB HDD, ext4 |
| Firewall | nftables |
| Service | Purpose | Deployment |
|---|---|---|
| Vaultwarden | Self-hosted Bitwarden-compatible password manager | Docker Compose |
| Tailscale | Private network access | Native Debian installation |
- Nextcloud - personal cloud storage and file synchronization
- Authentik - identity and authentication management
- Infisical - secrets management
- Gitea - self-hosted Git hosting
- Prometheus and Grafana - monitoring and dashboards
- Loki and Alloy - log collection and aggregation
- Tempo - distributed tracing
homelab/
├── ansible/
│ ├── files/
│ │ ├── vaultwarden-backup.sh
│ │ ├── vaultwarden-backup.service
│ │ └── vaultwarden-backup.timer
│ ├── inventory/
│ │ └── hosts.example.yml
│ ├── playbooks/
│ │ ├── bootstrap.yml
│ │ ├── docker.yml
│ │ ├── nftables.yml
│ │ ├── ssh-hardening.yml
│ │ ├── storage.yml
│ │ ├── tailscale.yml
│ │ ├── vaultwarden.yml
│ │ └── vaultwarden-backup.yml
│ └── ansible.cfg
├── docs/
│ ├── architecture.md
│ ├── installation.md
│ ├── backup-and-recovery.md
│ └── security.md
├── services/
│ └── vaultwarden/
│ ├── .env.example
│ └── compose.yml
├── .gitignore
└── README.md
Private configuration files such as ansible/inventory/hosts.yml and generated .env files are intentionally excluded from version control.
Ansible is run from the administration machine.
See Installation and Deployment for prerequisites, inventory configuration, and deployment instructions.
Once configured, run playbooks from the ansible/ directory:
cd ansibleRun a playbook:
ansible-playbook playbooks/<playbook>.yml --ask-become-passCheck connectivity:
ansible homelab -m pingValidate a playbook before running it:
ansible-playbook playbooks/<playbook>.yml --syntax-checkVaultwarden is deployed using Docker Compose and stores persistent data on the external HDD.
- Data directory:
/srv/data/appdata/vaultwarden - Compose directory:
/opt/homelab/vaultwarden - Access: Tailscale Serve over HTTPS
- Registration: Disabled after initial account creation
- Container image:
vaultwarden/server:1.34.3
Automated backups are managed by a systemd service and timer.
- Schedule: Daily at 3:00 AM, with up to 5 minutes of randomized delay
- Daily retention: 7 backups
- Weekly retention: 4 Sunday snapshots
- Database: SQLite backup with integrity verification
- Additional files: RSA key, attachments, sends, and Compose configuration
Backup location:
/srv/data/backups/vaultwarden/
See Backup and Recovery for backup details and restoration procedures.
- Configure an independent backup destination.
- Migrate existing Nextcloud data.
- Deploy monitoring and centralized logging.
- Improve secrets management.
- Explore lightweight Kubernetes deployment.