# Installation

There are several ways to install RoadRunner, depending on your needs and preferences.

## Pre-built Binaries

The simplest way to get the latest version of RoadRunner is to download one of the pre-built release binaries, which are available for various operating systems, including macOS, Linux, FreeBSD, and Windows. You can find these binaries on the GitHub [releases page](https://github.com/roadrunner-server/roadrunner/releases).

To install RoadRunner, just download the appropriate archive from the releases page and extract it into your desired application directory.

## Docker

If you prefer to use RoadRunner inside a Docker container, you can use the official RoadRunner Docker image `ghcr.io/roadrunner-server/roadrunner:latest`.

{% hint style="info" %}
More information about available tags can be found [here](https://github.com/roadrunner-server/roadrunner/pkgs/container/roadrunner).
{% endhint %}

**Here is an example of usage:**

```dockerfile
FROM ghcr.io/roadrunner-server/roadrunner:2024.X.X AS roadrunner
FROM php:8.x-cli

COPY --from=roadrunner /usr/bin/rr /usr/local/bin/rr

# Install and configure your application
# ...

CMD rr serve -c .rr.yaml
```

{% hint style="warning" %}
Don't forget to replace `2024.X.X` with the desired version of RoadRunner.
{% endhint %}

## Composer

If you use Composer to manage your PHP dependencies, you can install the `spiral/roadrunner-cli` package to download the latest version of RoadRunner to your project's root directory.

**Install the package**

```terminal
composer require spiral/roadrunner-cli
```

Run the following command to download the latest version of RoadRunner:

```terminal
./vendor/bin/rr get-binary
```

The server binary will be available at the root of your project.

{% hint style="warning" %}
The `php-curl` and `php-zip` extensions are required to download RoadRunner automatically. The `php-sockets` extension needs to be installed to run RoadRunner. Check your installed extensions with `php --modules`.
{% endhint %}

## Debian Package

For Debian-based operating systems such as **Ubuntu**, **Mint**, and **MX**, you can download the `.deb` package from the RoadRunner GitHub releases page and install it using dpkg.

**Just run the following commands:**

```bash
wget https://github.com/roadrunner-server/roadrunner/releases/download/v2024.X.X/roadrunner-2024.X.X-linux-amd64.deb
sudo dpkg -i roadrunner-2024.X.X-linux-amd64.deb
```

{% hint style="warning" %}
Don't forget to replace `2024.X.X` with the desired version of RoadRunner.
{% endhint %}

## macOS package using [Homebrew](https://brew.sh/):

```terminal
brew install roadrunner
```

## Windows using [Chocolatey](https://community.chocolatey.org/):

```bash
choco install roadrunner
```

## CURL

You can also install RoadRunner using curl and the `download-latest.sh` script from the RoadRunner GitHub repository.

**Just run the following commands:**

```bash
curl --proto '=https' --tlsv1.2 -sSf  https://raw.githubusercontent.com/roadrunner-server/roadrunner/master/download-latest.sh | sh
```

## What's Next?

After you have installed RoadRunner, you can proceed to the next steps and configure it for your needs.

1. [RoadRunner — Configuration](/docs/general/config.md).
2. [Developer Mode](/docs/php-worker/developer.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.roadrunner.dev/docs/general/install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
