This guide provides step-by-step instructions to deploy and fine-tune your sovereign-stack v4.3.0.
Before starting, ensure you have:
- Hardware: Raspberry Pi 5 with an NVMe SSD (1TB recommended).
- OS: Raspberry Pi OS (64-bit) or any Debian-based distribution.
- Network: Static IP assigned to your Pi.
- Ports: Ensure the following ports are forwarded if using a public domain:
- 80/443 (HTTP/HTTPS)
- 5222/5269 (XMPP Federation/Client - for future-proofing communication services)
- Dependencies: Docker and Docker Compose (the INSTALL.sh script will check for system tools like openssl, msmtp, and wakeonlan).
The sovereign-stack is designed to run from a dedicated directory in your home folder. This ensures that security guards function correctly without requiring root privileges.
cd ~
git clone [https://github.com/your-username/sovereign-stack.git](https://github.com/your-username/sovereign-stack.git)
cd sovereign-stack
The wizard will create your local .env file and configure your security keys and DNS settings.
chmod +x INSTALL.sh
./INSTALL.sh
Before the stack can be started, you must populate the .env file with your specific credentials. The Sovereign Stack uses a mandatory validation gate to prevent unstable deployments.
- Edit your environment file: vi .env
- Verify the configuration: ./verify_env.sh
Note: The stack will refuse to start if any mandatory variables are missing or incorrectly formatted.
Version 4.3.0 introduces automated asset mapping. Before starting the full service suite, you must initialize your inventory management layer.
Copy the templates and configure your host mappings:
cp inventory.json.example inventory.json
cp credentials.json.example credentials.json
- Edit credentials.json with the SSH credentials for your target nodes.
- Edit inventory.json to map your hostnames to the correct NetBox Cluster IDs.
Execute the discovery suite to populate NetBox with your existing containers and VMs:
./run_task.sh python3 infra_scanner.py
./run_task.sh python3 import_inventory.py
To ensure the reliability and "Sovereign" nature of the stack, maintenance tasks must be automated via the user's crontab.
-
Open the following block (replace REPLACE_WITH_USER with your actual username):
0 3 * * * /home/REPLACE_WITH_USER/sovereign-stack/backup_stack.sh > /home/REPLACE_WITH_USER/sovereign-stack/logs/backup.log 2>&1
30 3 * * * /home/REPLACE_WITH_USER/sovereign-stack/monitor_backup.sh > /home/REPLACE_WITH_USER/sovereign-stack/logs/monitor.log 2>&1
0 4 * * * /home/REPLACE_WITH_USER/sovereign-stack/run_task.sh python3 /home/REPLACE_WITH_USER/sovereign-stack/infra_scanner.py && /home/REPLACE_WITH_USER/sovereign-stack/run_task.sh python3 /home/REPLACE_WITH_USER/sovereign-stack/import_inventory.py >> /home/REPLACE_WITH_USER/sovereign-stack/logs/discovery.log 2>&1
0 5 1 * * /home/REPLACE_WITH_USER/sovereign-stack/clean_stack.sh >> /home/REPLACE_WITH_USER/sovereign-stack/logs/clean.log 2>&1
After the initial installation, the stack enforces a strict permission model.
- Secure the environment file: chmod 600 .env
- Enforce surgical UID ownership: ./clean_stack.sh
Once the stack is running (docker compose up -d), services are accessible via the following internal endpoints. It is recommended to configure Homarr as your primary entry point.
| Service | Container Name | Internal URL | Official Source |
|---|---|---|---|
| Homarr | homarr | http://homarr:7575 | https://homarr.dev |
| Nextcloud | nextcloud-app | http://nextcloud:80 | https://nextcloud.com |
| Forgejo | forgejo | http://forgejo:3000 | https://forgejo.org |
| NetBox | netbox | http://netbox:8085 | https://netboxlabs.com |
| AdGuard Home | adguard-home | http://adguardhome:3000 | https://adguard.com/adguard-home.html |
| Home Assistant | home-assistant | http://homeassistant:8123 | https://home-assistant.io |
| Frigate | frigate | http://frigate:5000 | https://frigate.video |
| Nginx Proxy Manager | nginx-proxy-manager | http://npm:81 | https://nginxproxymanager.com |
After completing this guide, proceed to the First-Run Guide.md to configure SSL certificates, trust settings for Step-CA, and the Homarr dashboard layout.
This documentation is part of the Sovereign Stack project. Copyright (c) 2026 Henk van Hoek. Licensed under the GNU GPL-3.0.