ePHPm
Embedded PHP application server, written in Rust.
Run PHP applications without the infrastructure. No PHP-FPM, no MySQL server, no Redis, no reverse proxy, no certbot. One binary, one config file. Drop in WordPress or Laravel and go.
When you need more, it’s already built in: MySQL connection pooling, read/write splitting, a Redis-compatible KV store, clustered SQLite with automatic failover, TLS, and Prometheus metrics.
Get Started → Architecture → GitHub
Built with
ePHPm stands on the shoulders of some excellent open-source projects.
ePHPm ecosystem
- litewire — MySQL/PostgreSQL wire protocol proxy that translates queries to SQLite. This is what lets PHP applications talk
pdo_mysqlto an embedded SQLite database with zero config changes. - ephemerd — self-hosted GitHub Actions runner manager. ePHPm borrows its self-installing binary pattern (
ephpm install/ephpm uninstall).
Rust crates
- tokio — async runtime powering the HTTP server, KV store, cluster protocol, and every background task
- hyper — low-level HTTP/1.1 and HTTP/2 implementation behind the request router
- rustls — TLS library for manual cert loading and automatic ACME (Let’s Encrypt)
- rusqlite — SQLite bindings used by litewire for single-node embedded database mode
- chitchat — SWIM gossip protocol library for cluster membership, failure detection, and KV replication
- dashmap — concurrent hashmap backing the in-process KV store
- figment — layered configuration (TOML files +
EPHPM_environment variable overrides) - clap — CLI argument parsing
- tracing — structured logging and diagnostics
- metrics + metrics-exporter-prometheus — Prometheus-compatible metrics export
Embedded at build time
- PHP — embedded via FFI as a statically linked library (ZTS on Linux/macOS, NTS on Windows)
- static-php-cli — builds PHP and its extensions as a single static archive that gets linked into the ephpm binary
- sqld — Turso’s libSQL server, embedded via
include_bytes!()for clustered SQLite replication over gRPC