How to Add Third-party Software into CageFS

June 5, 2025 / Command Line

In this article, we explain how to add third-party software to CageFS because, by default, CageFS does not include third-party software.

To include it, follow these steps:

  1. Create a new configuration file at:
    /etc/cagefs/conf.d/SOFTWARE_NAME.cfg
    Example: openssh-clients.cfg
    [openssh-clients]
    comment=OpenSSH Clients
    paths=/etc/ssh/ssh_config, /bin/hostname, /usr/bin/scp, /usr/bin/sftp, 
    /usr/bin/slogin, /usr/bin/ssh, /usr/bin/ssh-add, /usr/bin/ssh-agent, 
    /usr/bin/ssh-copy-id, /usr/bin/.ssh.hmac, /usr/bin/ssh-keyscan, 
    /usr/libexec/openssh/sftp-server, /etc/environment, 
    /etc/security/pam_env.conf
    devices=/dev/ptmx
  2. If needed, you can customise the configuration by including additional files, users, groups, or devices.
  3. Run the following commands to add the software and update CageFS:
    cagefsctl --addrpm SOFTWARE_RPM_NAME
    cagefsctl –update

In this way, you can successfully include third-party software in CageFS by creating a custom configuration and updating the environment accordingly.

Managing CageFS configurations? Learn How to enable or disable CageFS for users in CloudLinux

Spread the love