> ## Documentation Index
> Fetch the complete documentation index at: https://second.tech/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Back up your wallet

> Write down your Bark Pay wallet's seed phrase and keep the Barkd and Bark Pay volumes backed up, so you can recover your bitcoin and your charge history.

Back up your wallet before you receive any bitcoin. The volumes bring back the whole wallet and your charge history. The seed phrase is your fallback if you lose them.

## Write down the seed phrase

Read the 12 words from the Barkd container and copy them somewhere safe and offline:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker compose -f docker/docker-compose.prod.yml exec barkd-mainnet cat /data/barkd/mnemonic
```

This is a one-time step. Repeat it for `barkd-signet` if you run [test mode](/docs/bark-pay/install#add-test-mode).

<Warning>
  Your backups contain the wallet's keys. Barkd stores the seed phrase in plain text in its volume, so anyone who can read that volume or its backups can spend the wallet's bitcoin. Restrict access to both.
</Warning>

## Back up the two volumes

Add both volumes to the backup you already run for the server:

| Volume | What it holds |
| - | - |
| `bark-pay_barkd_mainnet_data` | The Barkd data directory: seed phrase, wallet database, and access token. |
| `bark-pay_barkpay_data` | The Bark Pay database (admin account, API keys, charges, events, webhooks, settings) and uploaded logos. |

Back them up continuously, not on a schedule. A stale copy misses the bitcoin received since, which then only the seed phrase can bring back. The [Backups](/docs/backups) page explains the model for every Bark wallet.

## Restore from a backup

<Steps>
  <Step title="Restore both volumes on the new server">
    Recreate `bark-pay_barkd_mainnet_data` and `bark-pay_barkpay_data` with your backup tool.
  </Step>

  <Step title="Copy the bark-pay repository and your .env file" />

  <Step title="Start the stack">
    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    docker compose -f docker/docker-compose.prod.yml up -d --build
    ```

    Bark Pay reconnects to the same wallet and charge history.
  </Step>
</Steps>

<Note>
  With the seed phrase alone, restore the balance in [Bark Wallet](/docs/bark-wallet/restore) on the same Ark server. Bark Wallet pulls back the VTXOs the Ark server still has a record of and scans the chain for on-chain payments. None of your charge history comes back.
</Note>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.