How It Works

Three containers, one Docker network, zero exposed services.

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Internet โ”‚ โ”‚ Ports 80, 443, 8448, 3478, 5349 โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Caddy (Reverse โ”‚ โ† Auto HTTPS & TLS โ”‚ Proxy) โ”‚ โ† Routes all traffic โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Conduit (Matrix โ”‚ โ† No ports exposed! โ”‚ Homeserver) โ”‚ โ† Internal network only โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Coturn (TURN/ โ”‚ โ† Voice/video relay โ”‚ STUN server) โ”‚ โ† NAT traversal โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Port Table

PortProtocolServicePurpose
80TCPCaddyHTTP โ†’ HTTPS redirect
443TCPCaddyHTTPS (Client-Server API)
443UDPCoturn (redirected)UDP redirect to port 5349 via firewalld forward-port โ€” allows clients to reach TURN on standard port
8448TCPCaddyMatrix federation (S2S)
3478UDPCoturnSTUN (NAT discovery)
5349TCP/UDPCoturnTURNS (encrypted relay)

Docker Compose Setup

Everything lives in /opt/conduit/ โ€” one folder, easy to find:

/opt/conduit/
โ”œโ”€โ”€ docker-compose.yml  # All 3 containers, networks, volumes, ports
โ”œโ”€โ”€ .env                # Your config: domain, secrets, IP
โ”œโ”€โ”€ Caddyfile           # Reverse proxy + TLS (auto-generated)
โ”œโ”€โ”€ turnserver.conf     # TURN/STUN for voice/video calls
โ”œโ”€โ”€ conduit.toml        # Media retention settings
โ”œโ”€โ”€ CREDENTIALS.txt     # Your registration token (delete after saving!)
โ”œโ”€โ”€ certs/              # TLS certificates for Coturn
โ”‚   โ”œโ”€โ”€ turn.crt
โ”‚   โ””โ”€โ”€ turn.key
โ””โ”€โ”€ .image-versions    # Pinned Docker image digests (created by backup)

/opt/conduit-backups/   # Backups (separate folder, survives uninstall)
โ””โ”€โ”€ conduit-backup-2025-03-15-020000.tar.gz

Common Docker Compose commands (run from /opt/conduit/):

sudo docker compose up -d       # Start all containers
sudo docker compose down         # Stop all containers
sudo docker compose restart      # Restart all containers
sudo docker compose logs -f      # View live logs
sudo docker compose pull         # Pull latest images (update)
sudo docker compose ps           # Show container status
sudo docker stats --no-stream    # Show CPU/RAM usage

System Requirements

ComponentMinimumRecommended
CPU1 core (ARM or x86)2+ cores
RAM1 GB (tested)2+ GB for heavy use
Disk2GB10GB+ (media)
OSLinux (Docker)Debian 13 (tested). Other Debian/Ubuntu may work but untested.
NetworkPublic IP + domainStatic IP preferred
๐Ÿงช
Tested on: DigitalOcean $6/mo Droplet (1 GB RAM, 1 CPU, 25 GB SSD, Debian 13). Not tested on other platforms or providers.

What the Script Installs

The script will automatically install any missing packages. Here's exactly what gets added to your system:

PackageWhat it doesWhy it's needed
DockerContainer runtimeRuns Conduit, Caddy, and Coturn in isolated containers
firewalldFirewallBlocks unauthorized access, opens only needed ports
Fail2banBrute-force protectionAutomatically bans IPs that try too many failed logins
unattended-upgradesOS security patchesDownloads and installs security fixes automatically. No auto-reboot โ€” you decide when to restart.
firewalld forward-portFirewall rulefirewalld forward-port rule (UDP 443โ†’5349)

System utilities (installed if missing):

CommandPackageUsed for
curlcurlDownloading files, API calls, connectivity checks
opensslopensslGenerating secure tokens and secrets
digdnsutilsDNS verification before install
ssiproute2Checking if ports are available
tartarCreating and restoring backups
freeprocpsChecking available RAM
awkgawkText processing (parsing outputs)
๐Ÿ“‹
Most of these are already pre-installed on Debian. The script checks each one and only installs what's missing. Nothing is installed without showing you first.