A post-modern PHP application server.
Website · Documentation · Quickstart · Releases
Rapira is a PHP application server written in Rust, built by the maintainers of RoadRunner. It embeds NTS PHP into the server process through PHP's embed SAPI: the host calls the interpreter directly, with no FastCGI, no sockets, no per-request serialization. Like RoadRunner, the server is extended through plugins.
Run an existing app unchanged in classic mode (a front controller executed per request, where php-fpm used to sit), or keep it resident in worker mode and pay the bootstrap cost once per worker instead of once per request.
- rapira: the server itself - the Rust core, the embed SAPI integration.
- sdk-php: the PHP building blocks - PSR-7 request factories, testing utilities, and helpers, each published as its own package.
- yii-runner-rapira: web application runner for Yii3.
- rapira-rs.github.io: source of the documentation site, rapira.rs.
Every release bundles PHP (NTS) - no separate PHP installation needed. Grab the package or tarball for your platform and PHP version:
sudo apt install ./rapira-php<X.Y>_<version>_amd64.deb
rapira serve --mode classic public/index.phpThe bundled libphp.so/libphp.dylib is built with --disable-all and a fixed set of extensions turned back on: OPcache and PCRE with JIT, session, filter, mbstring, iconv, ctype, tokenizer, fileinfo, phar, openssl, curl, zlib, the XML family (libxml, dom, xml, simplexml, xmlreader, xmlwriter), pdo_sqlite and sqlite3, plus everything PHP always builds in. If your app needs more, build from source against your own libphp or install the system one.
Docker images live at ghcr.io/rapira-rs/rapira, staged for copying into your own image. Full instructions: installation, quickstart, worker mode, and framework guides for Symfony, Laravel, and Yii3.
Found a bug or want a feature? Open an issue in the matching repository; when in doubt, rapira-rs/rapira is the right place. Build and test instructions are in CONTRIBUTING.md.