# Data & Privacy

Atuin uploads your data to Atuin's central server, which saves space on your
machine[^1], indexes your data to enable fast **browser search**, computes your
**statistics**, powers the **web experience**, allows you to
**share your threads** and powers [Atuin for teams](/hub/teams/).

By default, your data is encrypted _in flight_ and _at rest_. Atuin stores your
data as outlined in our [data policy](TODO).

## End-to-end Encryption

Atuin has supported, and will always support end-to-end encryption. If all
you're looking for is sync for your individual user, then you might prefer
end-to-end encryption.

Using end-to-end encryption disables:

- Sharing your threads online via link.
- [Atuin for teams](/hub/teams/)
- Remote data storage[^1].
- Automated stats computation.

Additionally, end-to-end encryption requires that you **never lose your Atuin
key**. Losing your encryption key means you lose your data.

### Self-hosted

The self-hosted Atuin server exclusively supports [E2E encryption](
#end-to-end-encryption). Whoever manages your self-hosted Atuin server can
never read your data.

## How do I choose?

Whether end-to-end encryption is the right choice for you depends on a couple
things:

- If you need [web view and analytics](/hub/), then E2E is **not** for you.
- If you are afraid you'll lose your encryption key, then E2E is **not** for
  you.
- If you need to [share your agent threads](/hub/threads/#sharing), then E2E Atuin is **not**
  for you.
- If you need [Atuin for teams](/hub/teams/), then E2E is **not** for you.

If you *do* want to make sure that no-one can read your data without the
encryption key, including Atuin Inc., then Atuin E2E is right for you.

:::caution[Encryption Key]

When using Atuin E2E, make sure you don't lose your E2E key. If you do, no-one,
not even Atuin, will be able to recover your data.

:::

## Configuration

`atuin setup --hub` asks about Atuin Hub on a step of its own, once you pick
Atuin Cloud:

- **Always enabled** uploads all your threads, under our standard data policy.
- **Workspace-only** uploads only the threads started in a directory with an
  `.atuin.lua`, under our standard data policy.
- **Disabled** keeps everything end-to-end encrypted. `atuin setup --no-hub`
  starts with it picked.

<VHSTape title="atuin setup --hub on its Hub step: Atuin Hub is always enabled at first, uploading all your threads, and isn't end-to-end encrypted. Picking Disabled turns Atuin Hub off.">
  Set FontSize 20
  Set Height 600
  # A machine that Atuin isn't set up on yet; see vhs/shell/.zshrc.
  Env DOCS_NEW_USER "1"
  Sleep 500ms
  Type "atuin setup --hub"
  Enter
  Wait+Screen@30s /Continue/
  Sleep 1s
  Down@300ms 4
  Enter
  Wait+Screen@10s /Where should/
  Sleep 1.5s
  Down@300ms 3
  Enter
  Wait+Screen@10s /Atuin Hub allows/
  Sleep 2.5s
  Down@600ms 3
  Sleep 800ms
  Enter
  Sleep 3s
  Screenshot
  # Atuin Cloud would sign in through a browser, so setup stops here.
  Hide
  Ctrl+C
  Sleep 500ms
</VHSTape>

[^1]: Work in progress.