# Signing in

You don't need an account to write in Niv. Signing in lets you sync a folder with a Space, work with other people and publish notes. Your files stay on your device either way.

## Ways to sign in

You can sign in during the first open, or later in **Settings › Account**.

- **Continue with Google** or **Continue with GitHub.** Niv opens your browser. Finish signing in there, and Niv comes back on its own. If the browser didn't open or you closed it, choose **Open the browser again**.
- **Use an email code instead.** Type your email and choose **Send code**. Enter the six-digit code from the email. The code expires after 5 minutes. **Use a different email** takes you back.

If you try many times in a row, Niv pauses sign-in for a short while and says how long to wait.

## Right after you sign in

The first time, Niv asks you to choose an encryption passphrase and save a recovery file. On another device, it asks you to unlock your notes with that passphrase. See [Encryption](/p/docs/encryption).

## Continue offline

On the first open, **Continue offline for now** skips sign-in. Niv opens your folder and everything works on this device. Sign in later from **Settings › Account**.

## Where your sign-in is kept

On macOS, your sign-in and your encryption keys are kept in the macOS Keychain.

## Your account

**Settings › Account** also holds your **Plan** (see [Niv Pro](/p/docs/niv-pro)) and, under **Danger zone**, **Delete my account** (see [Delete your account](/p/docs/delete-your-account)).

## Signing out

Go to **Settings › Account** and choose **Sign out**. If the folder syncs with a Space, Niv asks first.

While you're signed out:

- your notes stay on this device, and you can keep editing and renaming them;
- nothing reaches the Space, so there is no backup and nobody in the Space sees your changes.

When you sign in again, sync picks up where it left off. Niv follows renames it can identify, and asks you about any it can't before syncing. See [When sync asks you something](/p/docs/when-sync-asks-you-something).

## If something goes wrong

If Niv says **Your session ended**, sign in again to keep syncing. For anything else, see [Troubleshooting](/p/docs/troubleshooting).

---

Published with [Niv](https://niv.md/) in the Space Docs.
