Security

Last updated: March 27, 2026

We don’t read, sell, or use your notes. Here’s how we protect them.

For information about how we handle your data, see our Privacy Policy. For details on AI data processing, see our AI Disclosure.

1. Overview

Lagom takes a straightforward approach to security: your notes are encrypted on our servers, our infrastructure is hardened at every layer, and we are honest about what we do and don’t do.

We use strong server-side encryption to protect your data at rest. We do not make false claims about our security model. Your note content is encrypted before it hits the database, and we continuously harden our infrastructure to minimize attack surface.

2. Encryption at Rest

All note content, titles, and BYOK API keys are encrypted with AES-256-GCM using per-user keys before being stored in the database. Key derivation uses HKDF with a server-held master secret, unique salt per user, and purpose-specific labels — so each category of data has its own encryption key.

Even if the database were compromised, the encrypted data would be unreadable without the server’s master secret. The encryption and decryption are transparent at the repository layer — data is encrypted on every write and decrypted on every read.

Standard password authentication uses bcrypt with 10 rounds. Passwords are never stored in plaintext.

3. Infrastructure Security

Beyond encryption, Lagom’s infrastructure is hardened at every layer:

  • Docker container hardening: read-only filesystem, no-new-privileges flag, memory/CPU resource limits, tmpfs for writable directories.
  • Restricted database user: the application connects with SELECT/INSERT/UPDATE/DELETE only — no CREATE, DROP, or superuser privileges.
  • Firewall: UFW denies all incoming traffic except SSH. All app traffic is routed through Cloudflare Tunnel (no exposed ports).
  • SSH hardening: key-only authentication, MaxAuthTries 3, X11 forwarding disabled, fail2ban active.
  • Security headers: HSTS (with preload), X-Frame-Options DENY, CSP with frame-ancestors none, X-Content-Type-Options nosniff, strict Referrer-Policy, Permissions-Policy (9 features denied).
  • Rate limiting: In-memory sliding window, tiered by endpoint sensitivity.
  • Automated backups: daily pg_dump with 30-day retention, plus Hetzner automatic disk snapshots.
  • Unattended security updates: automatic OS security patches.
  • GitHub Actions security: all action references are SHA-pinned (not floating tags) to prevent supply chain attacks.

4. Report a Vulnerability

If you discover a security vulnerability, please report it responsibly. Contact us at:

Lagom Security
[email protected]

We take all reports seriously and will respond promptly. Please allow us reasonable time to address the issue before public disclosure.