Quick start
One script installs the extension, the collector and the local dashboard on a Linux box with root access (Debian/Ubuntu/RHEL-family). Download it, read it, then run it — it asks for root, so it deserves a look first:
curl -fsSL https://phpray.dev/install.sh -o phpray-install.sh
less phpray-install.sh
sudo bash phpray-install.sh
Piping a remote script straight into sudo bash also works and you will see it
in other people's instructions, but then you are running code you have not
seen, fetched over a connection you cannot inspect afterwards. The three lines
above cost a few seconds and leave the script on disk, so you can check later
what actually ran.
What the script does
- Detects PHP version, libc (glibc/musl) and architecture.
- Downloads the matching prebuilt
phpray.sofromhttps://phpray.dev/dl/(checked againstSHA256SUMS) into theextension_dirof every PHP version found (system PHP, Debianphp8.x, Remi, cPanel EA, Plesk, LiteSpeed lsphp, DirectAdmin, CloudLinux alt-php). - Writes the default INI snippet (enabled, smart mode) as
zz-phpray.iniinto the scan directory of every PHP found — on Debian/Ubuntu into every SAPI (/etc/php/<ver>/{cli,fpm,apache2}/conf.d/). - Installs
phpray-collector(a.deb/.rpmwhere possible, otherwise the static binary) with thephpray-collector.servicesystemd unit, and thephpraycommand alias. - Starts the collector with the local dashboard on
127.0.0.1:9191(--listen 0.0.0.0:9191binds it to a public address and turns on token login; the token is printed once and kept in/etc/phpray/dashboard-token). - Reloads PHP-FPM gracefully so the extension loads (Apache/LiteSpeed are
restarted only with
--yes), then prints the next steps.
Verify the install
php -m | grep phpray # extension loaded
phpray status # per-PHP extension state, collector, dashboard, cloud
phpray status lists every PHP binary and whether it loads phpray.so, whether
the collector config, ring buffer, JSONL file and database exist, whether the
dashboard API answers, and the state of the Cloud connection.
Uninstall
sudo bash phpray-install.sh --uninstall # keeps /etc/phpray and /var/lib/phpray
sudo bash phpray-install.sh --uninstall --purge # deletes config, data and buffers too
If you no longer have the script, download it the same way as above.
or manually: stop phpray-collector, remove zz-phpray.ini from the
conf.d directories, delete phpray.so from extension_dir, remove the
systemd unit and /var/lib/phpray. Reload PHP-FPM / restart Apache afterwards.
docs-site/docs/install/quickstart.md · PHPRay 0.14The Polish version is a translation of the English original; parameters and code examples keep their original syntax.