19 Step-by-Step Docker® Compose, OS, NAS & Hoster Guides

Deploy via Docker® Compose, Windows® Service (No Docker®), Linux®, NAS, Proxmox® & Major Hosters

Pick your exact platform: from ready-to-run Docker® Compose examples and a native Windows Server® Service without Docker® to Proxmox® VE, Raspberry Pi®, Synology®, ASUSTOR, UGREEN, TerraMaster, and Unraid, plus exact PTR & firewall setup on netcup, Hetzner, IONOS, ALL-INKL.COM, Hostinger, Strato, and OVHcloud.

One-Line Terminal Installers & Verified Native Packages v1.3.1 (.msi, .deb, .tar.gz)

Automatically verifies SHA-256 digests, interactively prompts for domain, hostname, admin & storage, or performs an in-place service update

v1.3.1 · SHA-256 Verified
# === Linux (Debian / Ubuntu / RHEL) & macOS - Interaktiver Installer & Updater (v1.3.1) ===
curl -fsSL https://nextxch.com/install.sh | sudo bash

# Späteres Update auf neue Release-Version mit einem Befehl:
curl -fsSL https://nextxch.com/install.sh | sudo bash -s -- --update

# === Windows Server (2019 / 2022 / 2025) - Lädt .msi, prüft SHA-256 & startet den Assistenten ===
irm https://nextxch.com/install.ps1 | iex

Docker® & Docker® Compose (Pinned v1.3.1 Release for Linux®, Windows®, macOS® & NAS)

Reproducible multi-arch OCI image (nextxch/server:1.3.1 · linux/amd64 & linux/arm64) with SQLite WAL or PostgreSQL® 18, CalDAV/CardDAV, S3 Object Lock & OpenTelemetry

OCI v1.3.1
Container Registry Note: We strictly recommend pinned release tags (1.3.1 rather than :latest) in production. Whenever public Docker® Hub mirroring is undergoing staged rollout, running install.sh --mode docker automatically verifies SHA256SUMS.txt from nextxch.com and builds nextxch/server:1.3.1 locally on your host.
  1. Option A: Compact Single-Container Compose (SQLite WAL + Zstandard): Ideal for up to thousands of mailboxes on a single VPS, dedicated server, or NAS with zero external database dependencies and ~40 MB idle RAM.
  2. Option B: Enterprise Production Compose (PostgreSQL® 18 + S3 WORM + OpenTelemetry): Horizontal scaling, GoBD-compliant S3 Object Lock, and OpenTelemetry OTLP traces, metrics & logs.
# === VARIANTE A: Kompakter Einzelcontainer-Stack (docker-compose.yml) ===
services:
  nextxch:
    image: nextxch/server:1.3.1
    container_name: nextxch
    hostname: mail.firma.de
    restart: unless-stopped
    ports:
      - "25:25"       # ESMTP-Eingang (MX)
      - "465:465"     # SMTPS-Einlieferung (Implicit TLS)
      - "587:587"     # SMTP-Einlieferung (STARTTLS)
      - "143:143"     # IMAP4rev2 (STARTTLS)
      - "993:993"     # IMAPS (Implicit TLS)
      - "4190:4190"   # ManageSieve (Filter & Abwesenheit)
      - "80:80"       # Let's Encrypt HTTP-01 & Autoconfig
      - "443:443"     # Admin-Cockpit, Webmail PWA, JMAP, CalDAV/CardDAV, Mobile Push (WBXML) & REST API
    environment:
      Urls: "http://0.0.0.0:80;https://0.0.0.0:443"
      Bootstrap__DefaultDomain: "firma.de"
      Bootstrap__AdminEmail: "admin@firma.de"
      Bootstrap__AdminPassword: "BitteSofortAendern!2026"
      Storage__Provider: "Sqlite"
      Storage__DataDirectory: "/var/lib/nextxch"
      Storage__BlobBackend: "FileSystem"
      Storage__Compression: "Zstd"
      Smtp__ServerHostName: "mail.firma.de"
      Imap__ServerHostName: "mail.firma.de"
      OpenTelemetry__Enabled: "true"
      OpenTelemetry__ServiceName: "nextxch"
    volumes:
      - ./nextxch-data:/var/lib/nextxch

# Starten (oder automatischer lokaler Image-Build via install.sh --mode docker):
# docker compose up -d && docker compose logs -f nextxch
# === VARIANTE B: Enterprise-Stack mit PostgreSQL 18, S3 Object Lock & OpenTelemetry ===
services:
  nextxch:
    image: nextxch/server:1.3.1
    restart: unless-stopped
    depends_on: [postgres, otel-collector]
    ports: ["25:25", "465:465", "587:587", "993:993", "4190:4190", "80:80", "443:443"]
    environment:
      Urls: "http://0.0.0.0:80;https://0.0.0.0:443"
      Storage__Provider: "Postgres"
      Storage__PostgresConnectionString: "Host=postgres;Database=nextxch;Username=nextxch;Password=${PG_PASSWORD}"
      Storage__BlobBackend: "Hybrid"
      Storage__Compression: "Zstd"
      Storage__S3Endpoint: "https://s3.eu-central-1.ionoscloud.com"
      Storage__S3Bucket: "firma-gobd-mail-archive"
      OpenTelemetry__Enabled: "true"
      OpenTelemetry__ServiceName: "nextxch-Prod"
      OpenTelemetry__OtlpEndpoint: "http://otel-collector:4317"
    volumes:
      - nextxch-nvme-cache:/var/lib/nextxch

  postgres:
    image: postgres:18-alpine
    restart: unless-stopped
    environment:
      POSTGRES_DB: nextxch
      POSTGRES_USER: nextxch
      POSTGRES_PASSWORD: "${PG_PASSWORD}"
    volumes:
      - pg-data:/var/lib/postgresql

  otel-collector:
    image: otel/opentelemetry-collector-contrib:0.112.0
    restart: unless-stopped
    ports: ["127.0.0.1:4317:4317"]

volumes:
  nextxch-nvme-cache:
  pg-data:

Windows Server® (2019 / 2022 / 2025) Native Windows® Service Without Docker®

True Windows® Service Control Manager (SCM) daemon with zero Docker®, Hyper-V, or WSL2 overhead

Native Windows® Service
  1. Recommended: Official Windows® .msi Wizard (v1.3.1): Prompts interactively on fresh install for Domain, MX Hostname, Admin login, SQLite WAL vs. Microsoft® SQL Server® (2019–2025 / Express / Azure® SQL) vs. PostgreSQL® 18, Let's Encrypt ACME, Windows® Firewall, and optional License Token. Running a newer .msi performs a 1-click in-place Windows® Service upgrade while preserving appsettings.Production.json and mail data.
  2. Unattended Silent CLI for Ansible, GPO & Microsoft® Intune: Pass any configuration property headlessly via msiexec.exe /qn.
# Variante A: Einzeiler in PowerShell (prüft SHA-256, lädt .msi & startet den Assistenten)
irm https://nextxch.com/install.ps1 | iex

# Variante B: Unbeaufsichtigte Installation / Dienst-Aktualisierung per msiexec.exe
curl.exe -fLO https://nextxch.com/downloads/Nextxch-Setup-win-x64.msi
msiexec.exe /i Nextxch-Setup-win-x64.msi /qn `
  DEFAULT_DOMAIN="firma.de" `
  MAIL_HOSTNAME="mail.firma.de" `
  ADMIN_EMAIL="admin@firma.de" `
  ADMIN_PASSWORD="BitteSofortAendern!2026" `
  STORAGE_PROVIDER="Sqlite" `
  DATA_DIR="C:\ProgramData\nextxch"

Linux® Native Daemon Without Docker® (systemd & .deb)

Debian® · Ubuntu® · Red Hat® · Rocky
  1. Dedicated non-root user: Runs non-root with CAP_NET_BIND_SERVICE for ports 25/443.
  2. Enable native Type=notify systemd unit: Integrates natively with journald and systemd readiness.
# Schnellweg für Debian 12 / Ubuntu 24.04 LTS:
curl -fLO https://nextxch.com/downloads/nextxch_1.3.1_amd64.deb
sudo dpkg -i nextxch_1.3.1_amd64.deb

# Alternativ für RHEL / Rocky / AlmaLinux via .tar.gz + systemd:
sudo useradd -r -s /usr/sbin/nologin -d /var/lib/nextxch nextxch
sudo mkdir -p /opt/nextxch /var/lib/nextxch
curl -fsSL https://nextxch.com/downloads/nextxch-linux-x64.tar.gz | sudo tar -xz -C /opt/nextxch
sudo chown -R nextxch:nextxch /var/lib/nextxch
sudo cp /opt/nextxch/nextxch.service /etc/systemd/system/
sudo systemctl enable --now nextxch

macOS® (Apple® Silicon M1–M4 & Intel)

macOS® · ARM64 · launchd
  1. Native Apple® Silicon ARM64: Ideal for office Mac mini® / Mac Studio® servers and local staging on MacBook Pro®.
  2. Run persistently via launchd: Starts automatically on boot with ~40 MB RAM usage.
sudo mkdir -p /usr/local/nextxch /usr/local/var/nextxch/logs
curl -fsSL https://nextxch.com/downloads/nextxch-osx-arm64.tar.gz | sudo tar -xz -C /usr/local/nextxch
sudo xattr -dr com.apple.quarantine /usr/local/nextxch
sudo bash /usr/local/nextxch/install-macos.sh

# Alternativ per OrbStack / Docker Desktop auf macOS:
docker run -d --name nextxch -p 2525:25 -p 2993:993 -p 8080:80 \
  -v ~/nextxch-data:/data \
  nextxch/server:1.3.1

Active-Active Kubernetes® Cluster (EKS, AKS, GKE, K3s, OpenShift®) & Rootless Podman

100% PostgreSQL® 18 · Zero Redis · Helm v3
  1. 100% PostgreSQL® 18 Cluster Engine (Zero Redis/Kafka): Replicas fan out IMAP IDLE and JMAP SSE real-time push in < 2 ms via PostgreSQL® LISTEN/NOTIFY, share ephemeral challenges/rate-limits via UNLOGGED tables, and elect ACME/Retention leaders via pg_try_advisory_lock.
  2. HAProxy PROXY Protocol v1/v2 & Stateless Sessions: Preserves real client IPs behind L4 LoadBalancers for accurate SPF/DMARC/CIDR checks; signed tokens enable zero-sticky-session HPA scaling.
  3. Cluster-Safe Ed25519 Licensing: One license token covers unlimited pods and syncs across all nodes automatically when activated in /admin/.
# Offizielles Helm v3 Chart installieren (gepinnter Release-Tag 1.3.1, skaliert per HPA auf 3 bis 12 Pods)
helm upgrade --install nextxch ./deploy/helm/nextxch -n nextxch --create-namespace \
  --set image.repository=nextxch/server \
  --set image.tag=1.3.1 \
  --set replicaCount=3 \
  --set cluster.enabled=true \
  --set cluster.enableProxyProtocol=true \
  --set storage.provider=Postgres \
  --set storage.blobBackend=S3 \
  --set service.externalTrafficPolicy=Local

# Oder direkt per Kustomize-Manifesten (/health/live & /health/ready + PDB + Anti-Affinity):
kubectl apply -k ./deploy/kubernetes/

# Alternativ: Rootless Podman (RHEL 9 / Fedora / AlmaLinux ohne Docker-Daemon)
podman run -d --name nextxch --restart=always \
  -p 25:25 -p 465:465 -p 587:587 -p 993:993 -p 4190:4190 -p 8443:443 \
  -v /var/lib/nextxch:/data:Z \
  nextxch/server:1.3.1
Virtualization, ARM64 & NAS Appliances

Installation on Proxmox®, Raspberry Pi®, Synology®, ASUSTOR, UGREEN, TerraMaster & Unraid

Proxmox® VE (LXC & KVM)

Proxmox® VE 8+ · ZFS / NVMe
  1. LXC-Container erstellen: Create an unprivileged Debian® 12 LXC container (2 vCPU, 1024 MB RAM) with a ZFS/NVMe mountpoint at /var/lib/nextxch.
  2. Direkt per .deb / systemd: Inside LXC, run the native .deb/systemd service for zero nested container overhead and instant Proxmox® Backup Server snapshots.
  3. Proxmox®-Firewall: Allow inbound TCP 25, 465, 587, 993, 4190, 80, 443 in Datacenter/CT Firewall.
# Auf dem Proxmox-Host (erstellt schlanken Debian-LXC CT 210 & installiert nativ):
pct create 210 local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst \
  --hostname mail --cores 2 --memory 1024 --net0 name=eth0,bridge=vmbr0,ip=dhcp \
  --storage local-zfs --rootfs local-zfs:32 --unprivileged 1 --start 1
pct exec 210 -- bash -c "curl -fsSL https://nextxch.com/install.sh | bash -s -- --mode native -y"

Raspberry Pi® 4 & Raspberry Pi® 5

linux/arm64 · ~40 MB RAM
  1. 64-Bit-System & NVMe statt SD-Karte: Use 64-bit Raspberry Pi® OS Lite and place /var/lib/nextxch on an M.2 NVMe HAT or USB 3 SSD rather than microSD.
  2. Heimanschluss-Tipp (Smarthost): On residential dynamic IPs, set Smtp__OutboundSmartHost to your ISP/hoster relay for reliable outbound delivery.
# Nativ per ARM64-.deb-Paket oder Container (v1.3.1) auf Raspberry Pi 4 / 5:
curl -fLO https://nextxch.com/downloads/nextxch_1.3.1_arm64.deb
sudo dpkg -i nextxch_1.3.1_arm64.deb

Synology® NAS (DSM 7.2+)

Container Manager · Btrfs
  1. Ordner in File Station erstellen: Create /volume1/docker/nextxch in File Station on your Btrfs/SSD volume.
  2. Portkonflikt vermeiden: Ensure Synology® MailPlus is stopped so ports 25, 465, 587, and 993 are free.
  3. Container Manager öffnen: Open Container Manager -> Project -> Create, select /volume1/docker/nextxch, and paste:
services:
  nextxch:
    image: nextxch/server:1.3.1
    container_name: nextxch
    restart: unless-stopped
    ports:
      - "25:25"
      - "465:465"
      - "587:587"
      - "993:993"
      - "4190:4190"
      - "8443:443"
    volumes:
      - /volume1/docker/nextxch:/data
    environment:
      Storage__Provider: "Sqlite"
      Storage__Compression: "Zstd"

ASUSTOR NAS (ADM 4.x)

App Central · Docker®-CE · Portainer
  1. Docker®-CE & Portainer CE installieren: Install Docker®-CE and Portainer CE from ADM App Central.
  2. Persistenter Ordner: Create /volume1/Docker/nextxch in ADM File Explorer.
  3. Stack bereitstellen: Deploy a Stack in Portainer mapping /volume1/Docker/nextxch:/data and allow mail ports in ADM Defender.
mkdir -p /volume1/Docker/nextxch
docker run -d --name nextxch --restart unless-stopped \
  -p 25:25 -p 465:465 -p 587:587 -p 993:993 -p 8443:443 \
  -v /volume1/Docker/nextxch:/data \
  nextxch/server:1.3.1

UGREEN NASync (UGOS Pro)

UGOS Pro · Docker®-Projekt
  1. NVMe-Speicherpool nutzen: On UGREEN NASync DXP models, place /volume1/docker/nextxch on your M.2 NVMe pool for instant search.
  2. UGOS Pro Docker®-App: Open UGOS Pro Docker® -> Project -> Create, paste the Compose file, and click Deploy.
# UGOS Pro -> Docker -> Projekt -> Compose-Konfiguration:
services:
  nextxch:
    image: nextxch/server:1.3.1
    restart: always
    ports: ["25:25", "465:465", "587:587", "993:993", "4190:4190", "8443:443"]
    volumes:
      - ./data:/data

TerraMaster NAS (TOS 5 / TOS 6)

TOS Docker® Manager
  1. Docker® Manager installieren: Install Docker® Manager from TOS App Center and create /Volume1/docker/nextxch.
  2. Projekt bereitstellen: In Docker® Manager -> Projects -> Add, paste the YAML stack and start.
volumes:
  - /Volume1/docker/nextxch:/data
# Admin-Cockpit nach Start: https://TERRAMASTER-IP:8443/admin/

Unraid Server (6.12+ / 7.x)

Unraid · Cache NVMe · Custom br0
  1. Appdata auf Cache-NVMe legen: Map /mnt/cache/appdata/nextxch so parity array disks can spin down while indexes run at NVMe speed.
  2. Eigene LAN-IP über Netzwerktyp Custom: br0 (Empfohlen): Assign Network Type: Custom br0 with a dedicated LAN IP so ports 80/443/25 never collide with the Unraid WebGUI.
# Unraid Terminal oder Docker Compose Manager Plugin:
docker run -d --name nextxch --net=br0 --ip=192.168.178.25 --restart=unless-stopped \
  -v /mnt/cache/appdata/nextxch:/data \
  -e ASPNETCORE_URLS="http://0.0.0.0:80;https://0.0.0.0:443" \
  -e Bootstrap__DefaultDomain="firma.de" \
  nextxch/server:1.3.1
Hosting Provider & DNS Guides

Setup Guides for netcup, Hetzner, IONOS, ALL-INKL.COM, Hostinger, Strato & OVHcloud

Reliable inbox delivery at Gmail™, Outlook®, and corporate gateways requires clean sender IP reputation plus three hoster settings: outbound port 25 access, matching IPv4/IPv6 PTR reverse DNS, and aligned SPF/DKIM/DMARC records.

netcup.de (Root-Server & VPS)

SCP · CCP DNS · Port 25 offen
  1. Reverse-DNS (PTR) im SCP setzen: In netcup SCP -> Network, set Reverse DNS (PTR) for both your IPv4 and primary IPv6 address to mail.yourdomain.de.
  2. DNS im CCP pflegen: In netcup CCP -> Domains -> DNS, add A, AAAA, MX (prio 10), SPF, and DKIM TXT records.
  3. Installation: Deploy Debian® 12 or Windows Server® ISO in SCP and install natively or via Docker®.

hetzner.de (Cloud CX/CAX & Dedicated)

Cloud Console · x64 & Ampere ARM64
  1. Port-25-Freischaltung bei Neukunden: New Hetzner Cloud accounts block outbound 25/465 initially; request the port unblock via Cloud Console -> Limits after your first invoice.
  2. IPv4- & IPv6-PTR setzen: In Hetzner Cloud Console -> Networking -> Edit Reverse DNS on both Primary IPv4 and IPv6::1 to mail.yourdomain.de.
  3. Preis-Leistungs-Tipp: Runs natively on ultra-efficient Hetzner CAX ARM64 instances and pairs directly with Hetzner S3 Object Storage.

ionos.de (VPS & Cloud Server)

IONOS Cloud Panel · S3 Object Lock
  1. Externe IONOS-Firewall öffnen: Open IONOS Cloud Panel -> Network -> Firewall Policies and allow inbound TCP 25, 80, 443, 465, 587, 993, and 4190.
  2. Reverse-DNS konfigurieren: Set Reverse DNS under Network -> Public IPs to mail.yourdomain.de once the A record resolves.
  3. GoBD-Archiv mit IONOS S3: Pair with IONOS S3 Object Storage in Frankfurt/Berlin with native S3 Object Lock (COMPLIANCE).

ALL-INKL.COM (KAS DNS & Smarthost)

KAS DNS-Werkzeuge · Smarthost
  1. Variante A (Domain bei ALL-INKL, nextxch auf eigenem VPS): In ALL-INKL KAS -> Tools -> DNS Tools, point A/AAAA for mail and MX to your nextxch IP, and add SPF/DKIM/DMARC TXT records.
  2. Variante B (nextxch im Büro / NAS mit ALL-INKL als Versand-Relay): Running nextxch on an office NAS/Proxmox® behind dynamic IP? Configure w01abc.kasserver.com:587 as Smtp__OutboundSmartHost and add include:_spf.kasserver.com to SPF.

Hostinger (KVM VPS & hPanel)

hPanel · KVM 2 / KVM 4
  1. PTR-Eintrag im VPS-Bereich: In Hostinger hPanel -> VPS -> IP Addresses, set the PTR record to mail.yourdomain.de.
  2. Port 25 / Relay beachten: Verify outbound port 25 is unlocked on your KVM plan, or configure an authenticated port 587 Smarthost in nextxch.
  3. hPanel DNS-Verwaltung: Replace default MX entries in hPanel DNS Zone Editor with mail.yourdomain.de and your SPF/DKIM/DMARC TXT records.

Strato (V-Server Linux®/Windows® & Dedicated)

STRATO Server-Login · Windows® & Linux®
  1. Ideal für Windows Server® ohne Docker®: On STRATO Windows® V-Servers, install directly as a native Windows® Service using the PowerShell® command above.
  2. Reverse-DNS im STRATO Server-Login: In STRATO Server Login -> IP Addresses, set Reverse DNS for IPv4 and IPv6 to mail.yourdomain.de.
  3. STRATO Domainverwaltung: In STRATO Domain Management -> DNS Settings, switch MX to custom mail server (mail.yourdomain.de) and add TXT records.

OVHcloud (VPS, Dedicated & Public Cloud)

OVHcloud Control Panel · EU S3 WORM
  1. Wichtige Reihenfolge für OVHcloud PTR: OVHcloud validates forward DNS before accepting a PTR change: create A and AAAA records for mail.yourdomain.de first, then set Reverse DNS under Network -> Public IPs.
  2. Netzwerk-Firewall & S3 Object Lock: Allow mail ports in OVHcloud Edge Network Firewall and optionally connect OVHcloud S3 Object Storage (Limburg/Strasbourg) for immutable GoBD WORM archiving.