Skip to Content

Data and security

App data lives in the app’s own SQLite database, secrets are readable only on the server, and app content never runs on the dashboard’s address. This page explains where your data and your app users’ data (a spa’s customers, warehouse staff…) live and who can read it.

Each app has its own database

Each app has its own SQLite database, run by manh.run next to the app’s server code. No app can read another app’s database.

  • Queries run inside the app’s process, with no network hop.
  • An app’s requests run one at a time, so a read-then-write (check stock → decrement) can’t be interleaved by another request.
  • Files that users upload go to the app’s own file storage (manh/blob).

You see the data under Database › Tables in your project; your agent queries it with the db_query tool.

Rollback and data

manh.run does not keep backups of your app’s database. Every change or delete — yours or your agent’s — is final. Export important tables to CSV under Database › Tables before a big change, and tell your agent to read the data before it updates or deletes anything.

Rolling back a deploy changes code only; data stays as it is.

Code is kept separately: named checkpoints are never deleted automatically (up to 100), and before every change to an existing file manh.run saves an automatic copy (the newest 10 are kept). To go back to older code, restore a checkpoint and deploy.

App secrets

Secrets (API keys, tokens for other systems) never go in your app’s files. You set them on your project’s Secrets page (sidebar, Connect group); server code reads them through env.

app/payments/post.ts
import { env } from "manh/env"; export default async function handler(c) { const r = await fetch("https://pay.example.com/charge", { method: "POST", headers: { authorization: `Bearer ${env.PAY_TOKEN}` }, // no key in the code // … }); return r.json(); }
  • Secrets are encrypted at rest (AES-256-GCM). No tool returns a value; your agent sees names only.
  • A changed secret takes effect at once, with no redeploy.
  • env exists only on the server. check rejects a .tsx file that imports manh/env.
  • check rejects strings in code that look like real API keys (code.hardcoded-secret).

manh.run’s keys stay out of app code

On the first deploy, manh.run creates a random JWT_SECRET for the app. The app uses it to sign and verify sign-in tokens.

Keys for the AI and email services are different: they live only in manh.run’s infrastructure and are never passed to your app. manh/openai and manh/email go through a gateway with a per-project token. Code that reads a reserved name such as env.OPENAI_API_KEY is rejected by check (code.no-reserved-env) and gets undefined at runtime.

Sign-in in your app

Apps handle sign-in themselves with email/password + JWT: a users table, POST /auth/register, and POST /auth/login returning a JWT. The UI stores the token and sends Authorization: Bearer <jwt>; middleware verifies it on the server.

app/auth/login/post.ts
import { sign } from "hono/jwt"; import { env } from "manh/env"; // … const token = await sign({ sub: user.id, role: user.role, exp }, env.JWT_SECRET!, "HS256"); return { token, user: { id: user.id, name: user.name, role: user.role } };

Google sign-in is on in the auth block (providers: ["google"] in app/auth.ts); remove it for password-only sign-in. manh.run handles the redirect to Google and hands the app the same kind of JWT as a password sign-in, so the app needs no OAuth registration or client secret of its own. GitHub and other providers are not available.

Good to know

  • Do permission checks and per-user filtering on the server. Hiding a button in the UI only prevents misclicks.
  • Never return passwordHash from an API, including a “list users” API.
  • verify and sign from hono/jwt need the "HS256" algorithm argument; without it, every request is rejected (code.jwt-verify-alg).

App content is kept apart from the dashboard

Your app runs on its own subdomain, <id>.manh.run. The dashboard’s address, manh.run, never serves your app’s HTML, JavaScript or files.

  • The workspace preview also runs on the app’s subdomain, not on the dashboard.
  • An app can’t embed dashboard pages in a frame.
  • Write requests to the dashboard’s API must come from the dashboard itself.

This way, app code — written by an agent — can’t act on your manh.run account.

Data policies

The Privacy Policy and the Terms of Service are the binding texts. The main points:

  • For data inside the apps you deploy, you are the controller and manh.run is the processor, acting on your instructions.
  • manh.run doesn’t sell personal data, run ads or trackers, or use your data to train AI models.
  • manh.run runs no AI model of its own: when you use an agent, manh.run receives only its tool calls, not your chat history.
  • Data is encrypted in transit (HTTPS) and at rest.
  • App databases are kept until you delete the project. An account is deleted within 30 days after you ask.
  • You should still keep your own copies of important data.

Next steps

Last updated