Closed craigtb closed 2 years ago
Hi @craigtb, I believe it's generally not advised to run Chromium as root for security reasons. It is possible, but you need to pass additional flags into the Chromium instance. It's not something we currently support as a configuration option for epaper.js, but it is something we could consider.
Do you mind if I ask why you're running as root? Is there a specific problem you're trying to solve?
@samsonmking Thanks for getting back to me. IO understand. What I am trying to do is build a cron job to start the server. It doesnt seem to start when I run it as a regular user, but sudo throws an error. I was able to dig in to your code and add the --no-sandbox
flag and it did start working.
Any other options other than cron? The goal is to build a process that runs on startup and starts the application.
@craigtb you might be interested in giving pm2 a try. I've spoken with other users who have successfully used to it run epaper.js as a daemon.
Another option might be setting up a systemd service. You won't need to install any additional software, but it is a bit more involved.
ill give that a look. thanks!
Im getting this error when running my epaper application as root. Looks like a puppeteer issue and there is a flag to pass in. Where would i add this flag? or is there another way to make this work?