# Account and sync

> Why you might want a FlowLock account, and how sync, sign-in with a code, encryption, shared subscriptions and traffic statistics work.

An account is optional: FlowLock works as usual without one. With an account you get sync between your devices,
sign-in on a new device with a code, and shared subscriptions.

## Sign-in

- Email and password. The password never goes to the server: the app derives your keys from it.
- **With a code from another device**: on the new device FlowLock shows a code and a QR code. On a device where you
  are already signed in, open “Account” → “Link a device” and enter the code. No password is needed on the new device.
- The device list, “Unlink”, and changing or resetting the password with a code sent by email are available in the
  app and on the [website](https://flowlock.cc/en/account/).

## Encryption

- **Standard**: the vault key is stored on the server, wrapped with the server's key. The website can show and edit
  your subscriptions, and resetting the password loses nothing.
- **End-to-end**: the key comes from your password, and the server holds only ciphertext. When you turn it on, you
  get a recovery code. Without it, a forgotten password means losing your synced data.

## Sync

Subscriptions, your own servers, rules and settings travel between your devices. Changes arrive in about a minute
while FlowLock is running. You can also sync through a folder (for example, on a cloud drive), with or without an
account. A profile can also be exported to a file and loaded on another computer.

You can add a subscription on the website too, under [“Subscriptions”](https://flowlock.cc/en/account/): the first device that starts up
picks it up and adds it.

## Shared subscriptions

The owner of a subscription can share it with friends without giving away the link: the FlowLock server downloads
the subscription, and the friend gets only the servers, sealed with the key of their own account. The friend sees
them marked “shared subscription from …”, with no links, addresses or export. The owner sends one-time invitations,
sees the friends and can revoke access.

## Traffic statistics

If you choose to (it is off by default), FlowLock sends daily totals to your account: connection time and traffic
per device and per server, as plain numbers. Turn it off and the statistics are deleted from the server.

Sync and shared subscriptions are being turned on gradually on the server. If you don't see them in the app, the
feature isn't on for you yet.
