Skip to content
/docs/security

Security

Security & privacy

What's local, what's encrypted, and what leaves your device.

Levix stores its local state and WhatsApp session on your device. AI features may send the content required for a request to the AI provider you configure.

Levix stores its database, WhatsApp session, memory and logs on your device. WhatsApp traffic, optional providers, user-triggered updates and eligible Plus subscription checks each have their own destinations.

Storage

One SQLite file, through Node's own node:sqlite module — zero external database dependency. The prefix, permissions, API keys and every setting are rows in that one file, read at call time.

Secrets

  • The panel password is never stored as plaintext — it's an scrypt hash and salt, checked in constant time, minimum 8 characters.
  • The session-signing key is 48 random bytes generated on first start and reused forever after — nobody, including the operator, ever sees it.
  • The WhatsApp session and any API keys you paste in are sealed with AES-256-GCM in a vault, using a key kept in a separate file (levix.key, mode 0600) next to the database — so a leaked database backup alone isn't enough to recover them.
  • Changing the panel password invalidates every existing session immediately, not just on logout.

Login throttling

The panel login, first-run setup and password-change endpoints share one guess-throttle: 5 attempts per 15 minutes, keyed on the connecting peer rather than a spoofable IP header.

Forgot-password codes

The login page's reset can ask the bot to WhatsApp a one-time code to the linked account's own chat — the code is hashed, valid for 10 minutes, allows five wrong attempts, and requests are throttled. It exists because the panel often runs on plain http://lan-ip:3001, where passkey-style resets aren't available. levix reset-password stays the offline fallback.

Add and verify a recovery email in Settings using your current panel password. The relay makes the verification code; confirmation sends its verification ID and your entered code, then returns a token bound to the address. Levix seals the address and token in its local vault, returns only a masked address to the panel, and excludes both from settings exports. A reset sends the address, locally generated code, token and panel language to the relay. Readable addresses, codes and tokens are never stored in the relay database or application logs; keyed abuse counters expire within a day, verification codes are valid for 10 minutes with five guesses, and authorization expires after 365 days without an authorized reset request. Such a request renews the period; re-verification invalidates the previous token. The SMTP and receiving email providers process the address and code message for delivery.

Unlinking WhatsApp and levix reset-password preserve the recovery email. Remove in Settings deletes the local address and token, without revoking the relay's expiring authorization state. For retention and deletion of remote data, see the privacy policy.

What can leave the device, and when

Feedback goes to this website's /api/feedback endpoint, which relays it to the developer's Telegram and stores nothing — device diagnostics join it only when you tick "attach diagnostics", and the panel previews the exact fields first. A sanitized technical debug log is kept on the device for 14 days (no passwords, keys, tokens, phone numbers, WhatsApp ids, e-mail addresses or message content). It is sent only with a feedback message that has diagnostics attached, as a file, or with a crash report you send; both previews show it before you send, and Clear logs in the panel deletes it on the device. Crash reports are validated against a fixed schema with JIDs, e-mails and other long numbers, tokens, URL paths and home-directory paths replaced by placeholders beforehand; the panel lists pending ones (deleted after 7 days) and a report leaves only when you press Send on it — the website keeps a sent report, including that log when it was attached, for 30 days, then deletes it. A failed send is never retried by itself. A password verification or reset code is emailed only when you ask, and the site keeps neither the address nor the code in readable form. The Privacy Policy lists other network traffic such as WhatsApp, update checks and Plus verification.

The first-run setup code

Until a password is set, opening the panel from anywhere other than the machine it's running on also asks for a one-time code printed in the terminal at startup — so a bot that comes up on a public IP can't be claimed by the first stranger who finds the port.

What AI features send out

!gemini and friends are agents that call whichever AI provider you've configured over the network — Gemini, OpenAI, Anthropic, or an OpenAI-compatible endpoint. A message you send to the AI, along with anything it needs to answer (web search results, a quoted file, memory it reads), goes to that provider's API. A local model can keep chat-provider requests on your machine. Tools for search, speech or other services can still make separate network requests.