Updated: 28 September 2026 · Applies to: CloudLinux OS with cPanel & WHM

On CloudLinux servers, CageFS gives each user a restricted view of the system, so programs such as wkhtmltopdf and xvfb-run must be added to CageFS before users' scripts can run them.

Steps (root)

  1. Install the programs on the server, if they are not installed yet.
  2. Create /etc/cagefs/conf.d/xvfb.cfg with:
    [xvfb]
    comment=xvfb and wkhtmltopdf
    paths=/usr/bin/xvfb-run, /usr/bin/xauth, /usr/bin/Xvfb, /usr/bin/xkbcomp, /usr/bin/wkhtmltopdf, /usr/share/X11/xkb
  3. Add the keyboard configuration package and update CageFS:
    cagefsctl --addrpm xkeyboard-config
    cagefsctl --force-update

Check the paths with which wkhtmltopdf xvfb-run before adding them.

Note: The wkhtmltopdf project is no longer maintained. For new projects, consider a maintained HTML-to-PDF tool.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket