--- title: Blackfire eleventyNavigation: key: Blackfire parent: Guides order: 1 --- [Blackfire](https://blackfire.io) helps to test, debug optimize applications. It offers agents in a number of languages and here we will present the steps needed to install the _PHP and Python agents_. In our example, we use the [SSH access](/en/docs/web-hosting/remote-access/ssh) and consider the following information: - Account name: `[account]` - Blackfire directory: `/home/[account]/blackfire/` > [!NOTE] > ``, `[version]`, `` and `` must be replaced by the accurate data. Feel free to adjust according to your needs. ## Step 1: Agent download ```sh [account]@ssh:~/blackfire$ wget https://packages.blackfire.io/debian/pool/any/main/b/blackfire-php/blackfire-agent__amd64.deb [account]@ssh:~/blackfire$ dpkg -x blackfire-agent__amd64.deb . ``` [Download page](https://blackfire.io/docs/up-and-running/installation?action=install&mode=full&location=local&os=manual&language=php): take the DEB 64 bits package. ## Step 2: Agent configuration ```sh [account]@ssh:~/blackfire$ cat << EOF > etc/blackfire/agent-prod [blackfire] ; setting: server-id ; You can find your personal server-id at https://blackfire.io/my/settings/credentials server-id= ; setting: server-token ; You can find your personal server-token at https://blackfire.io/my/settings/credentials server-token= ; setting: log-file log-file=/home/[account]/blackfire/agent.log ; setting: log-level ; desc : log verbosity level (4: debug, 3: info, 2: warning, 1: error) ; default: 1 log-level=1 ; setting: memory-limit ; desc : Sets the maximum allowed RAM usage (megabytes) when ingesting traces. Use 0 to disable ; default: 500 memory-limit=500 EOF ``` More options are available on their [documentation](https://blackfire.io/docs/up-and-running/configuration/agent). ## Step 3: Daemon start Create a [service](/en/docs/web-hosting/services) with the following details: - *Command*: `/home/[account]/blackfire/usr/bin/blackfire --config=/home/[account]/blackfire/etc/blackfire/agent-prod` - *Working directory*: `/home/[account]/blackfire` ## Step 4: Probes installation ### PHP See [Blackfire for PHP](https://blackfire.io/docs/php). **Download** ```sh [account]@ssh:~/blackfire$ wget https://packages.blackfire.io/debian/pool/any/main/b/blackfire-php/blackfire-php__amd64.deb [account]@ssh:~/blackfire$ dpkg -x blackfire-php__amd64.deb . ``` [Download page](https://blackfire.io/docs/up-and-running/installation?action=install&mode=full&location=local&os=manual&language=php) - point D: take the DEB 64 bits package. **php.ini modification (Environment > PHP)** ```ini extension = /home/[account]/blackfire/usr/lib/blackfire-php/amd64/blackfire-[version].so ``` More options are available on their [documentation](https://blackfire.io/docs/php/configuration). To set up logs: ```ini blackfire.log_level = 1 # Log verbosity level (4: debug, 3: info, 2: warning, 1: error) blackfire.log_file = /home/[account]/blackfire/blackfire-php.log ``` ### Python See [Blackfire for Python](https://blackfire.io/docs/python). ```sh [account]@ssh:~$ python -m pip install blackfire ``` --- ## Links - [Documentation](https://blackfire.io/docs)