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)
- Install the programs on the server, if they are not installed yet.
- Create
/etc/cagefs/conf.d/xvfb.cfgwith:[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
- 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.