Start here
Prepare the host
One dedicated Linux machine is enough for Community. The installer starts BastionOS and every service it needs in containers, so the host only needs Docker, Compose, curl and openssl.
What the host needs#
| Item | Requirement |
|---|---|
| System | Linux 64-bit (x86-64). Debian 12 or 13, Ubuntu 22.04 or later, RHEL, Rocky Linux, AlmaLinux 8 to 10, CentOS Stream 9 or 10 |
| Size | 8 GB of memory at least. For production, 4 vCPU and 16 GB: the machine BastionOS's performance is measured on, with 40 sessions at once. Recordings grow with use: plan their disk |
| Containers | Docker Engine with the Compose plugin 2.24 or later |
| Tools | curl, openssl (checked by the installer), gnupg for encrypted backups |
| Name | a DNS name that points to the host, for example bastion.example.com |
| Time | an NTP-synchronized clock: second-factor codes and certificates depend on it |
Install Docker from Docker's own repository. The docker.io and podman-docker packages of the distributions often ship a Compose that is too old.
Install Docker, Compose and the tools#
Pick your distribution. Each block installs Docker, Compose, curl and openssl, then opens the ports of the console, SSH and RDP in the host firewall.
$ sudo apt-get update
$ sudo apt-get install -y ca-certificates curl openssl ufw
$ sudo install -m 0755 -d /etc/apt/keyrings
$ sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list
$ sudo apt-get update
$ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo systemctl enable --now docker
$ sudo ufw allow OpenSSH
$ sudo ufw allow 80,443,2222,3389/tcp
$ sudo ufw --force enable
$ docker compose versionDebian 12 and 13.
$ sudo apt-get update
$ sudo apt-get install -y ca-certificates curl openssl ufw
$ sudo install -m 0755 -d /etc/apt/keyrings
$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | sudo tee /etc/apt/sources.list.d/docker.list
$ sudo apt-get update
$ sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo systemctl enable --now docker
$ sudo ufw allow OpenSSH
$ sudo ufw allow 80,443,2222,3389/tcp
$ sudo ufw --force enable
$ docker compose versionUbuntu 22.04, 24.04 and later.
$ sudo dnf -y remove podman buildah runc
$ sudo dnf -y install dnf-plugins-core curl openssl tar firewalld
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
$ sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo systemctl enable --now docker firewalld
$ sudo firewall-cmd --permanent --add-port={80,443,2222,3389}/tcp
$ sudo firewall-cmd --reload
$ docker compose versionRed Hat Enterprise Linux 8, 9 and 10, with the system registered with Red Hat.
$ sudo dnf -y remove podman buildah runc
$ sudo dnf -y install dnf-plugins-core curl openssl tar firewalld
$ sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
$ sudo systemctl enable --now docker firewalld
$ sudo firewall-cmd --permanent --add-port={80,443,2222,3389}/tcp
$ sudo firewall-cmd --reload
$ docker compose versionRocky Linux, AlmaLinux 8 to 10 and CentOS Stream 9 and 10.
The last command must print a Compose version of 2.24 or later. Add gnupg (apt-get install gnupg or dnf install gnupg2) if you will run encrypted backups from this host.
Ports#
| Port | Used by | Open to |
|---|---|---|
| 443 | console and API over HTTPS | users |
| 80 | Let's Encrypt's check, redirect to HTTPS | the Internet, only with Let's Encrypt over HTTP |
| 2222 | SSH gateway: ssh, SFTP, SCP |
users |
| 3389 | native RDP clients (mstsc, Remmina, FreeRDP) | users |
| 15432 | PostgreSQL clients | users who use native database clients |
| 13306 | MySQL and MariaDB clients | same |
| 17017 | MongoDB clients | same |
| 16379 | Redis and Valkey clients | same |
| 16443 | Kubernetes API (kubectl) |
same |
| 11433 | SQL Server clients (Enterprise) | same |
| 12484 | Oracle thin clients over TCPS (Enterprise) | same |
Open only what you use. Every port can be changed at installation or later in deploy/compose/.env.
The outgoing flows#
The bastion connects out to:
- your targets, on their own ports (22, 3389, 5432...), directly or through a jump host or a site connector;
- your directory (LDAPS 636 or LDAP with StartTLS 389) and identity provider, if you use them;
ghcr.ioto pull the images, andcontrol.bastion-os.comfor the Enterprise archives. Without Internet access, use the air-gapped bundle.
Rootless Docker#
Rootless Docker is accepted. Run the installer as the user who owns the Docker socket. A rootless daemon cannot listen on ports below 1024 unless the host allows it (sysctl net.ipv4.ip_unprivileged_port_start=80): otherwise choose ports above 1024 for HTTPS and HTTP, or put a reverse proxy in front.