Customer SSH - Useful Commands
Enter a customer's application container
To enter a website container as a customer, you can either:
- Add your SSH key through developer tools in the UI and SSH to username@server_ip.
- Log in as root on the server and type:
su - customer_username
Either way, you will be within the customer's containerised PHP environment. You will have access to the exact file structure and binaries that the customer's PHP applications use, and you can monitor their PHP processes and sub-processes.
Running PHP CLI
The PHP binary is located at /usr/bin/php. This will match the version selected in the dashboard.
php script.php
For deeper debugging, you can use strace to see system calls, such as file reads or network connections:
strace php script.php
Piping Output
To send a script's output (stdout) to a file:
php script.php > script.log
To send both stdout and error logs (stderr) to a file:
php script.php > script.log 2>&1
Available Binaries
Composer (Dependency Manager)
/usr/bin/composer
Requires appcd 1.1.0 and above.
WP CLI (WordPress Management)
/usr/bin/wp-cli
Top (Process Monitoring)
/usr/bin/top
Monitor CPU/Memory. High usage in php-fpm or lsphp may indicate loops or malware.
Remove File
/usr/bin/rm
Make Directory
/usr/bin/mkdir
Change Permissions
/usr/bin/chmod
Copying Files
You and your customers also have access to ssh and rsync binaries which are very useful for transferring websites from other servers without the risk of using root privileges.
Crontab
It is not possible to edit crontab from the SSH environment. Please use the control panel UI under developer tools.