On RunCloud’s containerized servers, you can assign each user a specific PHP CLI version that operates independently from the server’s global default PHP version.
This is particularly useful when hosting multiple applications on a single server, each requiring a different PHP version for command-line tools such as Composer, Artisan, or WP-CLI.
Setting a custom PHP CLI version provides two main benefits:
- Cron Job Compatibility: Cron jobs executed by a specific user automatically use their designated PHP CLI version, ensuring scheduled tasks run under the correct interpreter and avoiding version-related errors.
- Tooling Consistency: All command-line scripts and developer tools (such as Pest and PHPUnit) run under the PHP version required by the application, ensuring compatibility with the version used by the web server.
Setting the PHP CLI Version for a New System User
You can define the PHP CLI version during the user creation process.
- In RunCloud, go to your server’s System Users section.
- Click on the Create System User button.
- Fill in the required details, such as the Username.
- Find the Jailed Shell PHP Version dropdown menu and select the desired PHP version for this user. The list will include all PHP versions currently installed on your server.
- Complete the rest of the form and click Add User.

Once created, whenever this user logs in via SSH or runs a cron job, the PHP command will automatically resolve to the version you selected.
Changing the PHP CLI Version for an Existing User
You can also modify the PHP CLI version for a user that has already been created.
- Navigate to the System Users section of your server.
- Locate the user in the list and click the “Settings” button to modify their profile. In the user’s settings panel, you will find the Jailed Shell PHP Version dropdown.

- Select the new PHP version you want to assign to this user.
- Save the changes. The user’s shell environment updates immediately after saving.

With this setup, each jailed user can run command-line tools using the correct PHP version, ensuring consistency across applications and cron jobs.