Skip to content
@rapira-rs

Rapira: a post-modern PHP application server.

Rapira is a PHP application server with extensions from the RoadRunner maintainers.

Rapira

A Rust application server for PHP.

Website · Documentation · Quickstart · Releases

About Rapira

Rapira loads non-thread-safe (NTS) PHP into the server process through the PHP embed SAPI and calls the interpreter directly. There is no FastCGI, no socket between Rapira and PHP, and no serialization for each request. The maintainers of RoadRunner develop Rapira.

Rapira serves:

  • HTTP/1.1 requests and static files.
  • Unary gRPC, gRPC-Web, and Connect calls on one listener.
  • Prometheus metrics and the /livez and /readyz health probes.

Rapira has three execution modes:

  • Classic runs the front controller for each request, as php-fpm does. The application does not need code changes.
  • Worker initializes the application one time for each worker and calls a handler for each request.
  • Dispatcher gives each request to the application as an object: Rapira\Http\Exchange for HTTP, Rapira\Grpc\UnaryCall for gRPC. This is the default mode.

Getting started

Download a build for PHP 8.4, 8.5, or 8.6 from the download page. Each build includes NTS PHP. Rapira runs on Linux and macOS. The Windows builds are for local development only. See the installation guide.

To run an existing application in Classic mode, create rapira.toml next to the public directory:

[http]
listen = "127.0.0.1:8000"

[http.pool]
entrypoint = "public/index.php"
mode = "classic"

Start the server:

rapira serve rapira.toml

The builds include a fixed set of PHP extensions. For other extensions, build an NTS libphp. You do not need to rebuild Rapira.

The ghcr.io/rapira-rs/rapira:php8.4, php8.5, and php8.6 images contain Rapira, NTS PHP, and common PHP extensions on Debian Trixie. There is no latest tag. The image starts rapira serve /app/rapira.toml:

FROM ghcr.io/rapira-rs/rapira:php8.5
COPY . /app

See the Docker guide and the framework guides for Symfony, Laravel, and Yii 3.

Main repositories

  • rapira: the Rust server core and its integration with the PHP embed SAPI.
  • contract: the functions, classes, interfaces, and exceptions that Rapira gives to PHP code, as the rapira/contract Composer package. Rapira provides the implementations.
  • sdk-php: the rapira/http PSR-7 request factories and the rapira/testing test utilities.
  • yii-runner-rapira: the Yii 3 application runner for all three modes.
  • docker: the ghcr.io/rapira-rs/php images with libphp.so, NTS and ZTS, on Debian and Alpine. The Rapira image uses the NTS Debian image as its base.
  • rapira-rs.github.io: the source of the rapira.rs documentation site.

Contributing

Open PHP SDK issues in the sdk-php issue tracker. Open all other issues in the Rapira issue tracker. See the contribution guide for build and test instructions.

Pinned Loading

  1. rapira rapira Public

    Rapira: a post-modern PHP application server created by the RoadRunner maintainers with ❤️

    Rust 115 2

  2. docker docker Public

    PHP Docker images based on the official PHP Docker images from Docker

    Dockerfile

  3. contract contract Public

    PHP contracts for Rapira

    PHP 1 1

  4. testing-php testing-php Public

    Testing utilities for Rapira: provisions the server binary and runs a live server around your tests (split-published from rapira-rs/sdk-php)

    PHP 1

  5. rapira-rs.github.io rapira-rs.github.io Public

    Rapira documentation

    TypeScript 1

  6. symfony symfony Public

    Rapira Symfony integration

    PHP 1

Repositories

Showing 10 of 13 repositories
  • rapira Public

    Rapira: a post-modern PHP application server created by the RoadRunner maintainers with ❤️

    rapira-rs/rapira's past year of commit activity
    Rust 115 MIT 2 34 1 Updated Nov 21, 2026
  • .github Public
    rapira-rs/.github's past year of commit activity
    1 0 0 0 Updated Nov 21, 2026
  • docker Public

    PHP Docker images based on the official PHP Docker images from Docker

    rapira-rs/docker's past year of commit activity
    Dockerfile 0 MIT 0 0 0 Updated Nov 21, 2026
  • contract Public

    PHP contracts for Rapira

    rapira-rs/contract's past year of commit activity
    PHP 1 1 0 4 Updated Nov 21, 2026
  • benchmarks Public

    Our benchmarks repository

    rapira-rs/benchmarks's past year of commit activity
    Python 1 MIT 0 0 0 Updated Nov 21, 2026
  • rapira-rs.github.io Public

    Rapira documentation

    rapira-rs/rapira-rs.github.io's past year of commit activity
    TypeScript 1 MIT 0 0 5 Updated Nov 21, 2026
  • rapira-windows Public

    Rapira build, with ZTS, for Windows OS with full feature parity.

    rapira-rs/rapira-windows's past year of commit activity
    Rust 1 MIT 0 0 3 Updated Nov 20, 2026
  • rapira-async Public

    [EXPERIMENTAL] - Async Rapira experiments with the PHP IO Hooks PR

    rapira-rs/rapira-async's past year of commit activity
    Rust 1 MIT 0 0 4 Updated Nov 11, 2026
  • symfony Public

    Rapira Symfony integration

    rapira-rs/symfony's past year of commit activity
    PHP 1 BSD-3-Clause 0 0 0 Updated Oct 29, 2026
  • laravel Public
    rapira-rs/laravel's past year of commit activity
    PHP 0 BSD-3-Clause 0 0 2 Updated Oct 8, 2026