Skip to content

Multi-distro support for the one-line installer (Debian, Fedora, RHEL, openSUSE, Arch) #79

Open

Description

@JuansesDev

Problem

The current one-line installer (scripts/setup.sh, served at senddock.dev/install.sh) explicitly refuses to run on anything other than Ubuntu:

[[ "${ID:-}" == "ubuntu" ]] || die "This installer currently only supports Ubuntu..."

Users on Debian, Fedora, RHEL, Rocky Linux, AlmaLinux, openSUSE, Arch, or any other distro hit this die-message and have to fall back to the manual Docker Compose path. That path works but loses the value the installer provides: auto Docker install, secret generation, .env creation, and the Watchtower one-click-update wiring.

For the self-hosting audience this matters — power users running their own infrastructure often deliberately avoid Ubuntu. Debian is the most common alternative, but Fedora / RHEL / Rocky / Alma are big in the production-server crowd, and Arch is non-trivial among homelab self-hosters.

Proposal

Expand scripts/setup.sh to detect the distro from /etc/os-release and branch the Docker installation step accordingly. Everything else (secret generation, compose file download, docker compose up, healthcheck loop, Watchtower wiring) is distro-agnostic and stays as-is.

Distros to support, in priority order

Tier Distros Why this tier
Tier 1 — must support Ubuntu (already done), Debian Apt-based, ~80% of self-host VPSes. Debian shares almost all code paths with Ubuntu — only the Docker repo URL and the ID check differ.
Tier 2 — common production Fedora, RHEL, Rocky Linux, AlmaLinux, CentOS Stream dnf-based, common on enterprise / production servers. One install function covers all five (same package manager, same Docker repo).
Tier 3 — community demand openSUSE Leap, openSUSE Tumbleweed zypper-based, smaller share but vocal users.
Tier 4 — homelab / power-user Arch Linux, Manjaro pacman-based, niche but loud. Docker is in community repo.
Out of scope Alpine musl + busybox cause too many edge cases; users on Alpine are advanced enough to use the Docker Compose path directly.

Implementation sketch

Refactor the existing Docker install block into a per-distro function dispatched by ID / ID_LIKE:

install_docker() {
  case "${ID:-}:${ID_LIKE:-}" in
    *ubuntu*|*debian*)         install_docker_apt ;;
    *fedora*|*rhel*|*centos*|*rocky*|*almalinux*)  install_docker_dnf ;;
    *opensuse*|*suse*)         install_docker_zypper ;;
    *arch*|*manjaro*)          install_docker_pacman ;;
    *) die "Unsupported distro: ${PRETTY_NAME:-unknown}. Use the manual Docker Compose install: https://docs.senddock.dev/self-hosting/installation#option-2-manual-docker-compose-any-linux" ;;
  esac
}

Each helper does the canonical "official Docker docs" steps for that distro:

  • apt — add Docker's apt repo for ubuntu or debian (depending on ID), install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin.
  • dnf — add Docker's dnf repo (download.docker.com/linux/centos), install the same package set.
  • zypper — Docker is in openSUSE's official repos; zypper install -y docker docker-compose.
  • pacman — pacman -Syu --noconfirm docker docker-compose (Docker is in community).

In every branch, finish with systemctl enable --now docker and docker --version sanity check.

Other things to fix while in there

  • PRETTY_NAME in the error message — make sure it actually prints what was detected ("detected: Debian GNU/Linux 12 (bookworm)"), already done in current code, just verify it survives refactor.
  • Idempotency across distros — re-running the script should detect existing Docker on any distro and skip the install path (not just Ubuntu).
  • Document supported distros in the script header comment (replace the "for Ubuntu" line) and in docs/self-hosting/installation.md (today only mentions Ubuntu in Option 1).

Acceptance criteria

  • Script runs successfully on a fresh VM of: Ubuntu 22.04, Ubuntu 24.04, Debian 12, Fedora 40+, Rocky Linux 9, AlmaLinux 9
  • Tier 3/4 (openSUSE, Arch) shipped if low-effort but not blocking
  • Error message on unsupported distros points to the manual Docker Compose docs URL
  • README, landing one-liner tab, and docs/self-hosting/installation.md all updated to list the supported distros (no more "Ubuntu only" caveat where it no longer applies)
  • Repeat runs on each supported distro are idempotent (don't reinstall Docker, don't regenerate secrets, don't break existing .env)

Tier

Core — onboarding friction for self-hosters. Locking the installer to one distro is hostile to the audience this product targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxenhancementinfraroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions