detain / phlex-hub
Central cloud directory + reverse-tunnel relay for Phlix media servers. Sign in once, reach any of your servers from anywhere. Self-hostable.
Requires
- php: ^8.3
- crell/tukio: ^2.0
- detain/phlex-shared: ^0.4.0
- monolog/monolog: ^3.0
- php-di/php-di: ^7.0
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- smarty/smarty: ^4.0
- workerman/mysql: ^1.0
- workerman/workerman: ^5.0
Requires (Dev)
- mockery/mockery: ^1.6
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.10
- vimeo/psalm: ^5.0
This package is auto-updated.
Last update: 2026-05-23 01:12:33 UTC
README
Central cloud directory + reverse-tunnel relay for Phlix media servers. Sign in once, reach any of your servers from anywhere. Self-hostable.
Status: server claim + my-servers dashboard (C.4). Pairing Protocol
landed in C.3; the populated /my-servers dashboard and the
/claim-server flow land in C.4.
Quick start (dev)
composer install # Point the runner at a real MySQL via HUB_DB_* env vars first. php scripts/run-migrations.php # creates users / servers / shared_libraries / relay_sessions / webhooks php public/index.php start curl http://localhost:8800/health # => {"status":"ok",...}
Visit http://localhost:8800/signup to create your first account. The
first user is auto-promoted to admin. After signing in, /my-servers
lists your registered servers and /claim-server walks through pairing
a new one.
See docs/dev/schema.md for the schema
reference, docs/reference/env-vars.md
for the full env-var list, and
docs/hub/my-servers.md /
docs/hub/claim-server.md for the
dashboard and claim flow.
Related repos
detain/phlix(a.k.a.phlix-server) — local media server.detain/phlix-shared— shared interfaces, DTOs.
What is shipped in v0.1.0
- Workerman 5 HTTP application bootstrap.
- PSR-11 container (PHP-DI 7), structured logger (Monolog 3), MySQL connection pool (Workerman MySQL).
GET /healthendpoint returning service + version metadata.- 5-check CI workflow (composer-validate, phpcs PSR-12, phpstan 2.x level 9, psalm v5, security audit) + phpunit.
DB schema landed in B.6; signup, login, the dashboard, and the JWT
auth stack (consuming Phlix\Shared\Auth\JwtClaims) landed in B.7.
The server-claim + registry endpoints (claim codes, enrollment JWT,
heartbeat) landed in C.3; the /my-servers dashboard and
/claim-server UI land in C.4.
Configuration
All runtime options are environment variables — see
docs/reference/env-vars.md for the full
list.
License
MIT — see LICENSE.