Skip to main content
HomeInstallInstall Coder on RHEL-family Linux

Install Coder on RHEL-family Linux

On this page

This guide is for a Coder deployment administrator who runs the Coder control plane on a single Red Hat Enterprise Linux host or another RHEL-family distribution. Coder publishes an RPM with every release, and systemd manages the server like any other service. For a multi-replica deployment, refer to Kubernetes or OpenShift instead. To install the CLI on a client machine that connects to an existing deployment, refer to Install the Coder CLI.

Supported distributions

Coder builds one RPM per release and architecture. The install script reads /etc/os-release and selects the RPM when ID or ID_LIKE names a Fedora-family or openSUSE-family distribution.

DistributionVersionsID
Red Hat Enterprise Linux8, 9, 10rhel
Rocky Linux8, 9, 10rocky
AlmaLinux8, 9, 10almalinux
CentOS Stream9, 10centos
Amazon Linux2, 2023amzn
FedoraCurrent releasesfedora
openSUSELeap, Tumbleweedopensuse-leap, opensuse-tumbleweed

Every RHEL-family distribution in the table lists fedora in ID_LIKE, and both openSUSE variants list opensuse. A derivative that isn't listed here takes the same path when its ID_LIKE includes fedora. Each release publishes RPMs for amd64, arm64, and armv7.

Requirements

  • A host running one of the distributions above.
  • 2 CPU cores and 4 GB of memory to evaluate Coder. For production sizing, refer to the Coder Validated Architecture.
  • root or sudo access.
  • An external PostgreSQL database for anything beyond a proof of concept. Refer to Using an external database.

Install the package

The install script detects the distribution and installs the matching RPM. Install the package directly with dnf or rpm when the host can't run a piped shell script, or when you stage packages yourself.

curl -fsSL https://coder.com/install.sh | sh

The script installs the latest mainline release. Pass --stable for the latest stable release, or --version X.Y.Z for a specific version. Pass --dry-run to print the commands without running them.

The package installs the coder binary to /usr/bin/coder, the configuration file to /etc/coder.d/coder.env, and two systemd units: coder.service for the control plane and coder-workspace-proxy.service for an optional workspace proxy. It also creates the unprivileged coder user that the service runs as.

To stage the RPM on a host with no internet access, refer to Air-gapped deployments.

Configure the server

coder.service doesn't start while /etc/coder.d/coder.env is empty. Set your configuration before you start the service.

  1. Open the configuration file.

    sudo vi /etc/coder.d/coder.env
  2. Set CODER_ACCESS_URL to the external URL that users and workspaces connect to.

  3. Set CODER_PG_CONNECTION_URL to your PostgreSQL connection string.

  4. Save the file.

The file ships with the TLS and HTTP address variables commented in place. For every server option, refer to the coder server command reference.

Start the service

  1. Start Coder now and on every boot.

    sudo systemctl enable --now coder
  2. Confirm that the service is running.

    $ systemctl is-active coder active
  3. Read the startup logs.

    journalctl -u coder.service -b

To test a configuration change without the service manager, run coder server in the foreground.

SELinux and container runtimes in workspaces

SELinux affects workspaces that run their own container runtime. If your templates run Docker or Podman inside a workspace on a RHEL-family node, refer to Docker in workspaces for the runtime requirements.

Hardened base images

Coder publishes a container image built on Red Hat's UBI9-minimal base through Iron Bank, the Department of Defense hardened container registry. Choose that image when your compliance program requires an accredited base image. The Iron Bank image is a container image, so deploy it with Kubernetes or OpenShift rather than through the RPM.

Next steps