Run in production
Start OpenLogger in release mode and protect the server.
On this page
npm start runs OpenLogger in debug mode, which is meant for development. On a server, start it in release mode.
Start in release mode
node index.js 8000 --releaseTo keep it running after you log out and after a restart of the server, start it with a process manager or a system service, for example systemd. The Docker image runs in debug mode with npm start.
Protect the server
- Set a primary access token before the server is reachable from the internet.
- OpenLogger listens on all network interfaces. Put it behind a reverse proxy such as Nginx with HTTPS, and let only the proxy reach the port of OpenLogger. Tokens travel in every request, so never use plain HTTP over the internet.
- If only your own servers send logs, allow only their addresses at the firewall or in the proxy.
- Give every app its own API token.
- Back up the
databasesfolder. See Back up your data.