> For the complete documentation index, see [llms.txt](https://tribalfs.gitbook.io/accountant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tribalfs.gitbook.io/accountant/sync-and-sharing/shared-ledger.md).

# Shared ledger

Keep one ledger together with someone who uses a different Google account.

A shared ledger lets two or more people with **different Google accounts** keep one ledger together, for example a couple, business partners, or a bookkeeper and a client. Everyone sees the same records, and everyone's changes reach everyone else.

Sharing builds on [Sync across devices](/accountant/sync-and-sharing/sync-across-devices.md). Each phone shares its ledger file in Google Drive with the other people and reads theirs. There's no server in between.

{% hint style="info" %}
Shared ledger is **Experimental**. Adding people may need [Premium](/accountant/getting-started/premium.md).
{% endhint %}

## Before you start

Each person needs:

* **Accountant**, the same version for everyone. If a phone has an older version, the app says so; update it.
* **Sync across devices** turned on with **their own** Google account.
* **The Google Drive app** installed and turned on. Other people's files open through it.
* **A recognizable Device ID**, such as *Ana's phone* (**Settings › Device ID**). The other person picks your file by this name.
* An internet connection and a camera. Setup uses QR codes, so keep both phones side by side.

Below, "the person sharing" already syncs the ledger, and "the person joining" joins it.

## Set up sharing

Setup takes about two minutes. Nobody types an email address or a file name.

**1. Person joining: show your invite code**

Open **Settings › Shared ledger** (just below **Sync across devices**) and tap **Join someone's ledger**. Your phone shows an invite code. Keep this screen open.

**2. Person sharing: add the person**

1. Open **Settings › Shared ledger** and tap **Add a person**.
2. Scan the invite code on the other phone.
3. Confirm **Share this ledger with ‹their email›?** with **Share**.

Your phone now shows a **ledger code**. Keep it open.

**3. Person joining: scan the ledger code and pick the file**

1. Tap **Scan ledger code** and scan the code on the other phone.
2. A message tells you which file to choose, for example *"Ana's phone (3f9a2c1b).db"*. Tap **Choose file**.
3. In the file picker, open **Google Drive › Shared with me** and choose that file. If it isn't there yet, wait half a minute and try again.
4. If your phone already has records, choose:
   * **Use the shared copy:** your records are replaced by the shared ledger. A copy of yours is saved first; you can bring it back with **Undo last import** until anything syncs.
   * **Keep and combine:** your records are added to the shared ledger, and the others will see them. Only offered when both ledgers use the same reporting currency.

You'll see *"You joined ‹email›'s ledger."*

**4. Person sharing: connect back**

Tap **Done**. Under **People**, the new person shows **Not connected on this device**. Tap their name, choose **Connect on this device**, and pick their file the same way: **Google Drive › Shared with me**.

That's it. Changes now flow both ways.

{% hint style="info" %}
**Why does each side pick a file?** For your privacy, Accountant can only open Drive files you created or chose yourself. It never asks for access to your whole Drive. Choosing the other person's file once gives your phone permission to read that one file.
{% endhint %}

## Your other phones

You only need to connect **one** of your phones to each person. Your other phones on the same Google account get their changes through it, shown as **Connected through ‹phone›**. You can still connect another phone directly with **Connect on this device**.

## Adding more people

Repeat the setup for each new person. Anyone already in the ledger can add someone.

## When changes arrive

Phones sync when you open the app, after you change something, and when you pull down on **Transactions**. A change usually reaches the other person within a minute or two of their syncs. If they haven't opened the app, their latest changes wait on their phone.

If two people change the **same record** before syncing, the most recent change wins. Different records never overwrite each other.

## The People list

**Settings › Shared ledger** lists everyone, you first.

| Status                                                                   | What to do                                                                                                          |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **Connected · last change ‹time›**                                       | Nothing.                                                                                                            |
| **Connected · waiting for their first change**                           | Nothing.                                                                                                            |
| **Connected through ‹phone›**                                            | Nothing. Optionally connect this phone too.                                                                         |
| **Not connected on this device. Tap to connect.**                        | Tap › **Connect on this device**.                                                                                   |
| **Can't read their file anymore. Tap to connect again.**                 | Tap › **Connect on this device** and pick their file again.                                                         |
| **Isn't getting your changes. Tap to show them your ledger code again.** | Usually nothing; your phone shares again right away. If it stays, tap › **Show ledger code** and have them scan it. |
| **The Google Drive app is off on this phone…**                           | Tap › **Turn on Google Drive**.                                                                                     |
| **Uses another ledger now.**                                             | Remove them, or ask them to join again.                                                                             |
| **Their changes can't be added right now (‹reason›).**                   | Update Accountant on both phones.                                                                                   |

Tap a person for **Connect on this device**, **Show ledger code** or **Remove from ledger**.

## Removing someone

Tap the person › **Remove from ledger** › confirm. Your phones stop sharing with them and stop reading their file, and so does everyone else once they sync.

* Records they already added stay in the ledger.
* They keep their own copy of everything up to that point. Removing someone stops future changes; it can't take back what they already have.
* They aren't notified.

## Who can do what

Everyone in a shared ledger is equal. Anyone can add, edit and delete any record, and add or remove people. **Only share with people you trust with your whole ledger.**

## Leaving

There's no "Leave" button yet. Ask someone in the ledger to remove you, or switch this phone to another Google account (tap **Sync across devices › Change Google account**).

Turning **Sync across devices** off only pauses syncing. You stay in the ledger, and the others can still read the last version your phone uploaded.

## What is shared, and what isn't

**Shared** with everyone in the ledger:

* all records: transactions, accounts, categories, exchange rates, credit card settings and statements, loans, savings goals and the reporting currency
* the email addresses of the people in the ledger, and each phone's Device ID

**Not shared:**

* **attachments** (receipt photos and files). They stay on the phones of the person who added them.
* your app settings, such as dark mode, app lock, AI provider and API keys
* anything else in your Google Drive

Files are shared view-only and without an email notification.

## Messages during setup

| Message                                            | What happened                                                                             |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| *That isn't an Accountant sharing code.*           | The QR code is something else.                                                            |
| *That's your own code.*                            | Scan the code on the other person's phone.                                                |
| *That isn't an Accountant ledger file.*            | Pick the file named in the message.                                                       |
| *That file is from another version of Accountant.* | Update Accountant on both phones.                                                         |
| *That file belongs to another ledger.*             | You chose a file from a different ledger.                                                 |
| *That file is from another phone or account.*      | Choose the file named in the instructions.                                                |
| *‹email› isn't in this ledger yet.*                | Someone in the ledger has to add them first. If they were just added, sync and try again. |
| *Couldn't read the file.*                          | Check your connection and try again.                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://tribalfs.gitbook.io/accountant/sync-and-sharing/shared-ledger.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
