For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

This guide walks you through getting started with RoadRunner. You'll learn how to install RoadRunner and configure it for your project.

Step 1: Install RoadRunner

Follow the installation guide to install RoadRunner v3. Keep the rr binary in your project directory.

Step 2: Install PHP

RR requires PHP to run. If you don't have PHP installed, you can download it from the official PHP website and follow the installation instructions for your operating system.

Install Composer. Enable the PHP sockets extension. Run this command in the project directory to install the worker dependencies:

composer require spiral/roadrunner-http nyholm/psr7

Step 3: Create a simple configuration

Next, you need to create a simple configuration file for RR. Open a text editor and create a new file called .rr.yaml. Add the following content to the file:

.rr.yaml
version: "3"

server:
  command: "php psr-worker.php"

http:
  address: 0.0.0.0:8080

# Do not use development mode in production
logs:
  level: debug
  mode: development

RoadRunner is not only an HTTP plugin. There are many other plugins. Find more in the Plugins section.

Step 4: Create a simple worker

Now create a simple worker. Create a new file called psr-worker.php and add the following content:

Step 5: Start the server

Now start the server. You should have the following files in the current folder:

  • .rr.yaml

  • psr-worker.php

  • composer.json

  • composer.lock

  • vendor/

  • rr binary

Then, open a terminal window in the current folder and run the following command:

Since logs are in development mode, you should see the following output:

RoadRunner startup logs

Last updated

Was this helpful?