# Troubleshooting ## Do not use root! No `node` or `npm` commands should be run as the root user. No files in the workspace should be owned by root. If you ran some commands as root, and are now having problems, then it's probably because there are now files owned by root in your workspace. You should create a new workspace as a non-root user. Additionally, we recommend that you create a specific user to run Bibliogram with, so that in the unlikely event of a serious security flaw, an attacker cannot access or modify files owned by other users on the machine. ## Various problems with npm install See if anything in this thread helps: https://github.com/lovell/sharp/issues/1087#issuecomment-359582561 If you're using a Raspberry Pi, see [`/docs/Guide: Sharp on Raspberry Pi.md`][sharp raspi] [sharp raspi]: https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Guide:%20Sharp%20on%20Raspberry%20Pi.md ## nginx says 502 bad gateway after rebooting, but works after service reload The problem: You might encounter this if you're hosting on a Raspberry Pi. Bibliogram will work fine, but every time you reboot the host, you see error 502. Reloading nginx with `sudo service nginx reload` only temporarily solves the problem until the next reboot. The solution: 1. Open your Bibliogram nginx config file located in `/etc/nginx/sites-enabled/` with your text editor of choice. If you followed the installation instructions, you named this file `bibliogram-proxy`. 1. Locate the line with `proxy_pass http://localhost:10407;` near the bottom and replace `localhost` with `127.0.0.1`. 1. The final line will look like this: `proxy_pass http://127.0.0.1:10407;` 1. Save and close your editor. 1. Reboot the hosting computer and see if this solved your issue. Reference: https://unix.stackexchange.com/questions/277079/nginx-requires-reload-after-reboot ## Other problems If your problem is not listed here, you can [open an issue in the tracker][issues], or ask in [the Bibliogram discussion room on Matrix][matrix]. [issues]: https://todo.sr.ht/~cadence/bibliogram-issues [matrix]: https://matrix.to/#/#bibliogram:matrix.org