Explore your logs over HTTP. Secure. Simple. Flexible.
Logonaut is a lightweight Express-based API to expose and read .log
files over HTTP — ideal for accessing logs like those generated by pm2
remotely.
- 📂 Read from standard and error log files
- 🔐 Token-based authentication (Bearer)
- 🛡️ Built-in rate limiting for security
- ⚙️ Configurable via
.env
- 🧩 Easy to run with PM2, Docker, or Systemd
git clone https://github.com/seu-usuario/logonaut.git
cd logonaut
npm install
cp .env.example .env
LOG_FILE_PATH=/home/user/.pm2/logs/app-out.log
ERROR_LOG_FILE_PATH=/home/user/.pm2/logs/app-error.log
API_TOKEN=your_secure_token
PORT=3000
npm start
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:3000/logs
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:3000/logs/error?lines=500
docker build -t logonaut .
docker run -d -p 3000:3000 --env-file .env logonaut