Compartment runs entirely on your own infrastructure. TheDocumentation Index
Fetch the complete documentation index at: https://docs.compartment.dev/llms.txt
Use this file to discover all available pages before exploring further.
compartment install command sets up everything you need — the control plane, container runtime, and TLS-terminating reverse proxy — on any Linux server that has Docker installed. You run this once per server and then deploy applications to it using the CLI from your local machine.
Prerequisites
Before runningcompartment install, make sure your server meets the following requirements:
- Docker is installed and running. Compartment uses Docker as its container runtime. Install Docker by following the official Docker documentation.
- You have a domain you control (for a
--base-domaininstall), or you are okay with receiving a managed subdomain (for a--managed-domaininstall). See Choosing a domain mode below. - Ports 80 and 443 are reachable from the internet on your server, or you have configured alternate ports.
compartment install provisions system-level resources including Docker networks, volumes, and service containers. It requires root or sudo access on the target server. Run it as root, or the CLI will automatically re-invoke itself with sudo if needed.Install the Compartment CLI
Install the
compartment CLI on the machine from which you will run the install command (typically your server or a bastion host with SSH access to it). Refer to the CLI overview for installation instructions.Choose a domain mode
Compartment needs a base domain to provision URLs for your deployed applications. You have two options:Option A — Your own domain (Then pass it as the base domain during install. Compartment will issue TLS certificates automatically via Let’s Encrypt and route deployed apps under subdomains of that domain.Option B — Managed domain (
--base-domain)If you own a domain (for example, acme.com), point a wildcard DNS record at your server’s IP address:--managed-domain)If you don’t have a domain ready, use --managed-domain. Compartment allocates a free subdomain under compartment.run for your installation. No DNS configuration is required on your side.Managed domains are provisioned through the Compartment broker service. The subdomain is tied to your installation ID and persists across reinstalls as long as you use the same installation.
Run compartment install
SSH into your server and run With a managed domain:The CLI will prompt you for an admin password if you don’t supply one non-interactively. Once you provide your credentials, the install proceeds automatically.What gets installed:
compartment install with the appropriate flags.With your own base domain:- Control plane — the Compartment API that manages projects, deployments, environments, and access control.
- Container runtime — a Docker-based runtime that builds and runs your application containers.
- Routing layer — a Caddy-based reverse proxy that handles TLS termination, routing live traffic to the correct service version, and health-check-gated promotions.
Install options reference
The following flags are supported bycompartment install:
| Flag | Description |
|---|---|
--base-domain <domain> | Base domain for routing. Deployed apps get subdomains under this domain. Mutually exclusive with --managed-domain. |
--managed-domain | Allocate a managed subdomain under compartment.run. Mutually exclusive with --base-domain. |
--email <email> | Email address for the first admin account and Let’s Encrypt TLS certificates. |
--organization <name> | Name of the first organization created during install. |
--public-http-port <port> | Port to listen on for HTTP traffic. Defaults to 80. |
--public-https-port <port> | Port to listen on for HTTPS traffic. Defaults to 443. |
--version <version> | Platform version to install. Accepts latest, main, a commit SHA (sha-<commit>), or an exact image tag. Defaults to latest. |
--output <format> | Output format: text (default) or json. |
Using non-standard ports
If ports 80 and 443 are already in use on your server, or you’re running behind a load balancer that handles TLS externally, you can install on alternate ports:Next steps
With Compartment installed, you’re ready to deploy your first application.Quick Start
Log in, initialize a project, and run your first deploy.
compartment.yml reference
Learn how to configure services, build strategies, and readiness checks.