While the linked thread post below is about running Browser Library on a docker container, it’s basically the same problem you’re trying to solve. I.e. getting a web browser to run on a headless linux machine. The main issue is the browsers need an xdisplay server and you probably don’t have one, the simplest solution is to use XVFB.