How Lyra protects your data
Lyra holds your team’s private docs, and lets people from outside your team and AI agents in when you choose. This page explains how it keeps that safe. It starts with the main ideas and then goes into each part.
| In short | |
|---|---|
| Connections | Every connection uses HTTPS |
| Stored data | Encrypted on disk by the providers that store it. Passwords, sessions and tokens are kept only as hashes |
| Permissions | One piece of code decides who can do what to each page, for people, agents and the API alike |
| HTML blocks | Run in a sandbox with an origin of their own, so they can’t act as you |
| Uploaded files | Open only for people who can see their page, and can’t run code on Lyra’s address |
| Signing in | Emailed links, Google, Apple, single sign-on or a password, with limits on guessing |
| AI agents | Sign in as you through OAuth, with exactly your access, and can be disconnected at any time |
| API tokens | Tied to one person and one organization, and can expire |
| Rate limits | Limit how fast anyone can sign in, call the API or upload |
| Audit log | Records every share, public link and change to an organization’s people |
| Backups | The database can be restored to an earlier point in time |
| Error reports | Hold ids, never your page contents |
Connections are encrypted
Section titled “Connections are encrypted”Everything between your browser, the desktop app or an AI agent and Lyra goes over HTTPS:
- Lyra cloud sends every
httprequest tohttps, and tells browsers to use only HTTPS for it for a year (Strict-Transport-Security). - Sign-in cookies are marked
Secure, so browsers only send them over HTTPS. - A Lyra server refuses to start with an
httpaddress, unless the address is the machine itself. - Email to a mail server on another machine goes over an encrypted connection, unless the admin of a self-hosted server turns that off for their own mail server.
Stored data
Section titled “Stored data”Lyra cloud keeps its database on Neon and uploaded files in Tigris, both in the European Union. Both providers encrypt the data they store on disk. Data and privacy has the details.
Secrets are stored so that a copy of the database doesn’t give them away:
| Secret | How Lyra keeps it |
|---|---|
| Passwords | As argon2id hashes. Lyra never stores the password itself |
| Sign-in sessions, API tokens, emailed links, agent tokens | As SHA-256 hashes. The secret itself only exists in your browser, script or agent |
| Notion tokens, while an import runs | Encrypted with AES-256-GCM, and only for as long as the import runs |
Who can see what
Section titled “Who can see what”One function decides whether a person can do something to a page. It answers with one database query that looks at the page and every page above it. Nothing else makes that decision: not the web app, not the API, not the live editing server and not the tools AI agents use. Every route and every agent tool declares what access it needs, and tests check each one against the app Lyra actually builds, so a new route can’t skip the check.
| Who | Sees |
|---|---|
| Members of an organization | Its teamspaces, their own private pages, and pages shared with them |
| Guests | Only the pages shared with them, never a teamspace |
| Anyone with a public link | That page and the pages under it, read-only |
Sharing a page gives access to every page under it, as view, comment, edit or full access. Organizations are kept apart: tests call every route and every agent tool with another organization’s ids, and check that each one refuses and never answers with that organization’s text. See Sharing and Guests and public links.
HTML blocks run in a sandbox
Section titled “HTML blocks run in a sandbox”An HTML block runs custom HTML and JavaScript inside a page, such as an animated diagram. Its scripts never run with Lyra’s address, so they can’t read your cookies, storage or pages, or call Lyra as you.
- With an origin of its own. The block loads in a frame through a signed link that lasts 5 minutes and only works for that one block and version. The sandbox gives it an origin that matches no website, so the browser never treats it as Lyra.
- Sandboxed twice. Both the frame and the block’s own response say
sandbox allow-scripts, so it stays sandboxed even if someone opens its address directly. It can’t open pop-ups, download files, show dialogs or change which page you’re on. - No network calls. Its policy blocks
fetch, WebSockets and the like, so a script can’t send what it reads anywhere. Scripts, styles and fonts load only from a few public sources. The one gap is WebRTC, which browsers don’t let a page’s policy block: a block can still tell a server of its choosing that someone opened it, from which address, and what was typed into the block. It still can’t read anything of Lyra’s. - Public pages show only its text, never its HTML or scripts.
Uploaded files
Section titled “Uploaded files”| Who can open them | Only people who can open the page the file is on. Uploading needs edit access to that page |
| What opens in the browser | Images, PDFs, video, audio and plain text. An HTML file can be shown inside a page, in a sandbox like an HTML block. Every other file is downloaded, never opened |
| What a file can do | Nothing on Lyra’s address. Files are sent with X-Content-Type-Options: nosniff and a policy that sandboxes them, so a file can’t run scripts as you |
| How big | Up to 50 MB a file, and 5,000 MB per person a day on Lyra cloud |
Signing in and sessions
Section titled “Signing in and sessions”| Methods | Emailed links, Google, Sign in with Apple, single sign-on, and email and password. Every method that proves the same email reaches the same account |
| Emailed links | Last 15 minutes and work once. They open a page with a Continue button, so a mail scanner that opens every link can’t use them up |
| Passwords | 10 to 200 characters, and refused when they appear in a known breach. Lyra checks with Have I Been Pwned by sending only the first five characters of the password’s SHA-1 hash. After 5 wrong passwords in an hour, sign-in for that email waits 30 seconds, doubling up to 15 minutes. Password forms never say whether an account exists |
| Sessions | Last 30 days, in a cookie scripts can’t read (HttpOnly, SameSite=Lax, Secure). Lyra ignores the session cookie on requests that come from another website. Expired sessions are deleted within an hour |
| Signing out everywhere | Resetting or changing a password signs out every other session. Resetting a forgotten password also revokes all your API tokens and connected AI apps, and changing it can too. Removing someone from an organization revokes their API tokens and connected agents for it, and closes their live editing |
| The desktop app | Signs in through your browser with a one-time code that lasts 5 minutes and only works with a secret that never leaves the app. It gets a session of its own |
Create an account and Your account cover the sign-in options from your side.
AI agents
Section titled “AI agents”AI agents connect through the Model Context Protocol (MCP) and sign in as you through OAuth, so an agent can see and change exactly what you can, and nothing more. Page history shows each change as made by the agent for you, like “Claude, for Ada”.
- The agent opens Lyra in your browser, you sign in and press Allow. PKCE is required, so a code someone intercepts is useless to them.
- Access tokens last an hour, and refresh tokens 30 days. Every refresh gives a new refresh token. If an old one is ever used again, Lyra disconnects the agent, since someone may have copied it.
- You see your connected agents in Settings and can disconnect any of them.
See Connect an AI agent and AI agents (MCP).
API tokens
Section titled “API tokens”Personal API tokens let scripts use the API as you.
- A token belongs to one person and one organization, and can do what that person can in that organization.
- Only members can create tokens, not guests, and only from a signed-in browser, never with another token.
- A token works only on the API, MCP and file downloads. Every other address in Lyra refuses it.
- A token expires after 30 days, 90 days or a year, or never, as you choose when you create it. Lyra shows it once and keeps only its hash.
- Tokens start with
lyra_pat_, so secret scanners can spot one pasted somewhere it shouldn’t be. - You can delete a token in Settings at any time. Removing someone from an organization revokes their tokens for it.
Rate limits
Section titled “Rate limits”Rate limits stop anyone from guessing sign-ins, flooding inboxes or overloading Lyra. A refused request gets a 429 answer saying how many seconds to wait.
| What | Limit |
|---|---|
| Requests | 600 a minute per person, and 120 a minute per API token |
| Sign-in links | 5 a minute and 10 an hour per inbox, and 30 every 10 minutes per network address |
| Wrong passwords | A growing wait after 5 in an hour for one email |
| Sharing with people outside your organization | 50 people a day per person, so nobody can use invite emails to send mail to strangers in bulk |
| Uploads | 50 MB a file, and 5,000 MB per person a day |
The audit log
Section titled “The audit log”Lyra writes an entry to an audit log for every:
- Page shared with someone, role changed and share removed.
- Public link turned on, turned off or taken down.
- Invite sent or cancelled, and person removed from an organization.
- Email domain added or verified, and organization renamed or given a new address.
Each entry records who did it, when, and to which page or organization. The log is kept in Lyra’s database; there’s no screen to read it in the app yet. Deleting an organization deletes its audit log too.
Backups
Section titled “Backups”On Lyra cloud, Neon keeps the database’s history, so it can be restored to an earlier point in time after a failure. Backups roll over within 30 days, so deleted data leaves them by then. We only use backups to recover from a failure.
Most mistakes don’t need a backup. Deleted pages go to the trash until someone deletes them for good, and every page keeps earlier versions that you can restore.
Error reports and logs
Section titled “Error reports and logs”Lyra reports errors and performance traces to Sentry, in its data region in Germany, so we can find and fix problems. Error reports and logs hold ids, never contents.
| Sentry never receives | |
|---|---|
| Page contents and titles | Reports name the page, user and organization by id |
| Email addresses | Logs keep only the domain, like acme.com |
| Cookies, request headers, request bodies and query strings | Turned off for the server and the web app |
| Database values | SQL statements are recorded with every value replaced by ? |
| Secrets and public link addresses | Never written to logs |
For one session in ten, and for every session that hits an error, the web app records the screen with all text and images hidden, so we can see what went wrong without seeing what you wrote. These reports go through Lyra’s own server first. A problem report you send from the app holds what you write in it.
On your own server
Section titled “On your own server”A self-hosted Lyra server has the same protections, with you in charge of the parts Lyra cloud’s providers handle: HTTPS (Caddy does it for you), encrypted disks and backups. It sends nothing to the Lyra team. See Self-hosting and Backups.
Reporting a security problem
Section titled “Reporting a security problem”If you think you’ve found a security problem in Lyra, email security@lyra-docs.com with what you found and the steps to see it. Please don’t look at other people’s data or disrupt Lyra while you check, and give us time to fix it before telling anyone else. Our security page has the full policy.