Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Digital Independence

License: MIT Docker GitHub Issues Shell Script Maintenance

Take back control of your digital life, one container at a time.

πŸ“Œ Overview

Digital Independence is a collection of ready-to-use Docker Compose configurations for running various self-hosted services on your own infrastructure. This project empowers individuals and small organizations to:

  • πŸ“Š Eliminate third-party access and data mining
  • πŸ”’ Keep everything within your infrastructure
  • πŸ”„ Enjoy freedom to switch, modify, or replace services
  • πŸ’° Eliminate recurring subscription fees
  • 🎯 Build valuable DevOps and system administration skills

✨ Available Services

Icon Service Name Directory Path Port License Brief Description
πŸ”‘ Authentik authentik/ 9000, 9443 LICENSE Flexible open-source Identity Provider (SSO, LDAP, OAuth2, SAML).
πŸ“Š Dashdot dashdot/ 3001 LICENSE Lightweight and informative system dashboard.
πŸ’¬ Element Web element-web/ 8009 LICENSE Modern web client for the Matrix communication protocol.
πŸ—‚οΈ Homarr homarr/ 7575 LICENSE Modular dashboard to manage all your services.
πŸ–ΌοΈ Immich immich-app/ 2283 LICENSE Self-hosted photo and video management solution (Google Photos alternative).
πŸŽ₯ Jellyfin jellyfin/ 8096, 8920 LICENSE Open-source media server for streaming movies, music, and TV.
🌐 LibreTranslate libretranslate/ 5001 LICENSE Offline translation engine that respects privacy.
πŸ”— LinkStack linkstack/ 8003 LICENSE Self-hosted open-source link sharing platform (Linktree alternative).
🐘 Mastodon mastodon/ 4000, 4001 LICENSE Federated social networking server (Twitter/X alternative).
🎡 Navidrome navidrome/ 4533 LICENSE Modern music streaming server with Subsonic support.
☁️ Nextcloud nextcloud/ 5000 LICENSE Complete cloud storage and collaboration platform.
πŸ”” ntfy ntfy/ 8010 LICENSE Simple push notifications via HTTP, ideal for script integration.
πŸ€– Open WebUI + Ollama open-webui/ 3000, 11434 Open WebUI, Ollama Intuitive LLM interface, supports Ollama and OpenAI API.
πŸ›‘οΈ Pi-hole pi-hole/ 53, 8080 LICENSE DNS-level ad and tracker filtering for your entire network.
🐳 Portainer portainer/ 9443 LICENSE Docker container management via web interface.
πŸ” SearXNG searxng/ 8888 LICENSE Privacy-respecting metasearch engine.
πŸ“¨ Synapse synapse/ 8008, 8448 LICENSE Reference server for the Matrix communication network.
⏱️ Uptime Kuma uptime-kuma/ 9442 LICENSE Service status monitoring with real-time notifications.
πŸ” Vaultwarden vaultwarden/ 8000 LICENSE Bitwarden-compatible password management server, lightweight version.
πŸ“š MediaWiki wiki/ 8002 LICENSE Wiki platform used by Wikipedia.
πŸ”— YOURLS yourls/ 8001 LICENSE Self-hosted URL shortening service.

Ports listed are the default ports on the host. Some services are only bound to 127.0.0.1 (localhost) for security reasons. Modify the configuration in each service's docker-compose.yml to bind to 0.0.0.0 or change the port.

Additional Synapse Services (Bridges)

  • synapse:mautrix-telegram – Telegram bridge
  • synapse:mautrix-whatsapp – WhatsApp bridge

πŸ“‹ Prerequisites

Before starting, ensure your system meets the following requirements:

Requirement Minimum Version Notes
Docker Engine 29.4+ Required for all container operations
Docker Compose v2.0+ Included with Docker Engine 29.4+
Git Latest For cloning the repository
Operating System Linux / macOS / WSL2 Windows WSL2 recommended

Optional Dependencies

  • whiptail or dialog – For interactive menu
  • curl / wget – For downloading dependencies

πŸš€ Getting Started

1. Clone the Repository

cd ~/
git clone https://github.com/ricalnet/digital-independence.git
cd digital-independence

2. Install Docker Engine

If Docker is not already installed, use the provided installation scripts:

For Debian:

./install-docker-engine-on-debian.sh

For Ubuntu:

./install-docker-engine-on-ubuntu.sh

3. Prepare Environment Files

Some services require .env configuration files:

# Example for Immich
cp immich-app/.env.example immich-app/.env
nano immich-app/.env   # adjust as needed

4. Manage Services

Use the sovereign.sh script to start, stop, and manage all services (see next section).

βš™οΈ Using sovereign.sh

sovereign.sh is a powerful command-line tool designed to simplify management of all services in one command.

Interactive Menu (Easiest for Beginners)

./sovereign.sh -i

Or simply run without arguments:

./sovereign.sh

Quick Command Examples

Purpose Command
Start a single service ./sovereign.sh portainer
Start all services ./sovereign.sh -a up
Stop a service ./sovereign.sh -d portainer
Restart services ./sovereign.sh -r portainer vaultwarden
Update images and restart ./sovereign.sh recycle synapse
Update without downtime ./sovereign.sh update immich
Simulate commands (dry-run) ./sovereign.sh -n up portainer
View service logs ./sovereign.sh logs portainer
Check service status ./sovereign.sh ps

For Synapse sub-services, use synapse:mautrix-telegram or synapse:mautrix-whatsapp.

Full Help Guide

./sovereign.sh -h
πŸ“˜ Click to expand full help guide
Digital Independence by Ricalnet
SOVEREIGN.SH v2.0.0

USAGE:
    ./sovereign.sh [OPTIONS] [ACTION] [SERVICE...]

OPTIONS:
    -h, --help              Show this help message
    -l, --list              List all available services
    -a, --all               Run action on all services
    -d, --down              Stop and remove containers (ACTION)
    -r, --restart           Restart services (ACTION)
    -p, --pull              Pull latest images before action
    -b, --build             Build images before action
    -v, --verbose           Show detailed output
    -i, --interactive       Interactive checkbox menu
    -n, --dry-run           Show what would be executed (no changes)
    -s, --sudo              Use sudo for docker commands
    --no-color              Disable colored output

ACTIONS:
    up                      Start services (default)
    down                    Stop and remove services
    restart                 Restart services
    logs                    Show logs (last 50 lines)
    ps                      Show container status
    prune                   Clean up unused resources

COMBINED ACTIONS:
    recycle                 PULL β†’ DOWN β†’ UP (full refresh with new images)
    update                  PULL β†’ UP (update without downtime)
    fresh                   DOWN β†’ UP (recreate without pull)

EXAMPLES:
    ./sovereign.sh portainer                                    # Start portainer
    ./sovereign.sh -a up                                        # Start all services
    ./sovereign.sh -d portainer                                 # Stop portainer
    ./sovereign.sh -r portainer vaultwarden                     # Restart services
    ./sovereign.sh --pull --all up                              # Update all services
    ./sovereign.sh recycle synapse                              # Full refresh synapse
    ./sovereign.sh recycle synapse synapse:mautrix-telegram     # Refresh synapse + bridges
    ./sovereign.sh fresh immich                                 # Recreate immich only
    ./sovereign.sh -n up portainer                              # Dry run
    ./sovereign.sh -i                                           # Interactive mode

SERVICE NAMING:
    β€’ Main services: use service name directly
    β€’ Synapse sub-services: synapse:mautrix-telegram, synapse:mautrix-whatsapp

RECYCLE SEQUENCE:
    1. PULL  β†’ Download latest images (container still running)
    2. DOWN  β†’ Stop and remove old container
    3. UP    β†’ Start new container with fresh image and config

🌐 Exposing Services to the Internet

By default, services are only accessible from localhost. To access them securely from the internet, this repository supports two approaches:

πŸ§… Tor Hidden Service (.onion)

Anonymous access through the Tor network, ideal for maximum privacy.

☁️ Cloudflare Tunnel

Access through Cloudflare without opening firewall ports.

πŸ” Security & Maintenance Guidelines

To keep your system secure and stable, follow these recommendations:

Initial Setup

  • πŸ”‘ Change all default passwords immediately in .env files
  • πŸ”’ Use strong, unique secrets for each service
  • 🌐 Bind to localhost (127.0.0.1) unless you need external access
  • πŸ“ Set proper file permissions: chmod 600 .env for sensitive files

Ongoing Maintenance

  • πŸ“¦ Container data is stored in local directories or Docker volumes
  • ⬆️ Use --pull option to get security patches and updates
  • πŸ“° Read upstream changelogs before major version upgrades
  • πŸ” Monitor logs for suspicious activity: ./sovereign.sh logs [service]
  • πŸ“Š Enable health checks and monitoring with Uptime Kuma

πŸ’Ύ Backup & Recovery

Protect your data with a robust backup solution using Chantik – a ChaCha20-Authenticated Backup Protection tool designed specifically for Docker environments.

πŸ€– Automation Scripts

This repository includes automation scripts for scheduled maintenance. The scripts are located in automation-scripts/ and can be configured via cron jobs.

πŸ“… Weekly Updates

Automatically pulls latest images and updates services without downtime.

# Copy and configure the config file
cp automation-scripts/weekly-updates/weekly_updates.conf.example automation-scripts/weekly-updates/weekly_updates.conf
nano automation-scripts/weekly-updates/weekly_updates.conf

πŸ”„ Monthly Recycle

Performs a full refresh (pull β†’ down β†’ up) on selected services to ensure fresh containers.

# Copy and configure the config file
cp automation-scripts/monthly-recycle/monthly_recycle.conf.example automation-scripts/monthly-recycle/monthly_recycle.conf
nano automation-scripts/monthly-recycle/monthly_recycle.conf

⏰ Setting Up Cron Jobs

Add these entries to your crontab for automated maintenance:

sudo crontab -e
# Weekly updates - every Sunday at 3 AM
0 3 * * 0 /path/to/digital-independence/automation-scripts/weekly-updates/weekly_updates.sh

# Monthly recycle - every 1st day of the month at 6 AM
0 6 1 * * /path/to/digital-independence/automation-scripts/monthly-recycle/monthly_recycle.sh

Replace /path/to/digital-independence/ with the actual path where you cloned the repository.

Script Configuration

Script Config File Purpose
weekly_updates.sh weekly_updates.conf List of services to update weekly
monthly_recycle.sh monthly_recycle.conf List of services to recycle monthly

The scripts automatically log their output to logs/ directory for monitoring and troubleshooting.

🀝 Contributing

Here are some areas where you can help:

  • Adding configurations for new services
  • Fixing bugs or improving features in sovereign.sh
  • Completing or improving documentation

Please open an Issue or submit a Pull Request.

πŸ“œ License

This repository uses the MIT License. However, each included service has its own license. Please comply with the license terms of each upstream project.

About

Digital Sovereignty. Docker Compose configurations + encrypted backup + management script for 20+ self-hosted services (AI, Cloud, Encrypted Communication, etc.). Take control of your data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages