How to Add XVFB and wkhtmltopdf to CageFS

June 14, 2025 / Servers, Hosting & Email

This article will explain how to add XVFB and wkhtmltopdf to CageFS. This allows jailed users in a secure shared hosting environment to generate PDFs from HTML by enabling access to necessary graphical and conversion tools.

Follow these steps to include XVFB and wkhtmltopdf in CageFS:

  1. Create a Configuration File:
    Create the config file at /etc/cagefs/conf.d/xvfb.cfg and add the following content:

    [xvfb]
    comment = xvfb
    paths = /usr/bin/xvfb-run, /usr/bin/xauth, /usr/bin/Xvfb, /usr/bin/xkbcomp, /usr/bin/wkhtmltopdf, /usr/share/X11/xkb, /usr/local/bin/wkhtmltopdf
  2. Add Required RPM Package to CageFS:
    Run the following command to include the necessary package:

    cagefsctl --addrpm xkeyboard-config

This way, you can add XVFB and wkhtmltopdf to CageFS. Hope you liked our article. If you require additional assistance, feel free to contact our support staff.

Need help with your hosting account? Learn How to locate your support pin with WHUK

Spread the love