How to install Docker Compose on Linux

By Angus Published 16 January 2025 Updated 4 March 2026 3 min read

Docker Compose allows you to define and run multi-container applications using a single YAML file. Instead of managing containers individually, you describe your entire application stack in docker-compose.yml and launch everything with one command.

You will install Docker Compose using either cURL or pip, depending on your workflow. Both methods give you the same tool, but cURL downloads a pre-built binary while pip installs through Python’s package manager.

Before you begin

Install Docker Compose with cURL

The cURL method downloads a pre-built binary directly from Docker’s GitHub releases. This approach works on most Linux distributions without requiring Python dependencies.

  1. Download the Docker Compose binary.
    Run this command to fetch the latest stable release and save it to /usr/local/bin/docker-compose:
    curl -L "https://github.com/docker/compose/releases/download/v5.1.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    The $(uname -s) and $(uname -m) variables detect your operating system and architecture automatically.
  2. Make the binary executable.
    Grant execution permissions so you can run Docker Compose as a command:
    chmod +x /usr/local/bin/docker-compose
  3. Verify the installation.
    Check that Docker Compose installed correctly by displaying the version number:
    docker-compose --version
    You should see output showing the installed version, confirming the binary is working.

Install Docker Compose with pip

The pip method installs Docker Compose as a Python package. This approach integrates with your existing Python environment and updates through pip’s package management.

  1. Install pip if needed.
    If pip is not already installed on your system, add it with:
    apt-get install python3-pip
    This installs Python 3’s package manager, which you need for the next step.
  2. Install Docker Compose through pip.
    Run this command to download and install Docker Compose:
    pip3 install docker-compose
    Pip handles all dependencies and places the executable in your system path.
  3. Verify the installation.
    Confirm Docker Compose is available by checking the version:
    docker-compose --version
    The output displays the installed version, confirming the installation succeeded.

Install Docker Compose on Windows

Docker Desktop for Windows includes Docker Compose automatically. You do not need to install it separately.

  1. Download Docker Desktop.
    Visit the Docker Desktop download page and install the Windows version.
  2. Verify Docker Compose is available.
    Open Command Prompt or PowerShell and run:
    docker-compose --version
    The version output confirms Docker Compose installed with Docker Desktop.

Install Docker Compose on macOS

Docker Desktop for macOS bundles Docker Compose. No separate installation is required.

  1. Download Docker Desktop.
    Get the macOS version from the Docker Desktop installation page.
  2. Verify Docker Compose is installed.
    Open Terminal and run:
    docker-compose --version
    The version number confirms Docker Compose is ready to use.

Wrapping up

You have installed Docker Compose and can now define multi-container applications in YAML files. Whether you used cURL, pip or Docker Desktop, the docker-compose command is available to manage your application stacks.

Start building containerised environments by creating a docker-compose.yml file for your project. Our guide on managing your VPS covers server administration alongside containerised workloads.

Need more power?

Get scalable resources with our VPS hosting with root access and optional software.

Get VPS Hosting

Starting something new?

Perfect for websites and small businesses unlimited bandwidth with cPanel hosting.

Get cPanel Hosting