Skip to content

Configuration

Configure LogNorth for your environment

Configure LogNorth for your environment.

Environment variables for the LogNorth server:

VariableDescriptionDefault
LICENSE_KEYYour LogNorth license keyRequired
PORTHTTP port3000
DATA_DIRData directory/data
LOG_LEVELLogging level (debug, info, warn, error)info

Configure SMTP in the LogNorth settings page to receive email alerts for new errors.

SettingDescription
SMTP HostYour SMTP server (e.g., smtp.gmail.com)
SMTP PortUsually 587 (TLS) or 465 (SSL)
SMTP UsernameYour email or SMTP username
SMTP PasswordYour email password or app password
From AddressSender email address
To AddressWhere to send alerts

Every API request requires an API key in the Authorization header:

Terminal window
Authorization: Bearer YOUR_API_KEY

Create API keys in the LogNorth web UI under Settings.

Events must include a message field. Everything else is optional:

{
"message": "POST /users → 201",
"timestamp": "2024-01-15T10:30:00Z",
"context": {
"method": "POST",
"path": "/users",
"status": 201,
"duration_ms": 45,
"user_id": 123,
"ip": "1.2.3.4",
"error": "Something went wrong"
}
}

LogNorth automatically sets is_error = true when:

  • context.error exists and is not empty, OR
  • context.status >= 500

No need to manually flag errors.

Events are stored indefinitely by default. Configure retention in Settings.