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

# Install Edge

> Run Edge with Docker Compose on a machine you want to back up.

Edge ships as a Docker image, `ghcr.io/thesteau/3to1go-edge`. You need a running [Central](/central/install) and a [credential](/central/edge-credentials) minted from it.

## Set up

<Steps>
  <Step title="Get the example files">
    ```sh theme={null}
    mkdir 3to1go-edge && cd 3to1go-edge
    curl -fsSLO https://raw.githubusercontent.com/thesteau/3to1go/main/deploy-example/edge/docker-compose.yml
    curl -fsSL  https://raw.githubusercontent.com/thesteau/3to1go/main/deploy-example/edge/.env.example -o .env
    ```

    Or copy [`deploy-example/edge/`](https://github.com/thesteau/3to1go/tree/main/deploy-example/edge) from GitHub.
  </Step>

  <Step title="Edit .env">
    ```sh .env theme={null}
    # Unique per Edge installation.
    EDGE_ID=laptop-alice
    # Must be reachable from inside the Edge container.
    CENTRAL_URL=http://central.example.lan:6555
    # Only used when Edge creates the first admin user.
    INITIAL_ADMIN_PASSWORD=admin
    # The folder on this machine that Edge sees at /scan.
    SCAN_DIR=/home/alice
    ```

    If Central runs on the same Docker Desktop host, use `CENTRAL_URL=http://host.docker.internal:6555`.

    To back up more than one folder or drive, see [Multiple folders and drives](/edge/multiple-folders).
  </Step>

  <Step title="Start it">
    ```sh theme={null}
    docker compose up -d
    ```
  </Step>

  <Step title="Sign in and add the credential">
    Open `http://localhost:6556/`, sign in as `admin` (see [Sign-in](/shared/sign-in)), open **Edit Edge Settings**, paste the credential from Central into **Edge Credential**, and save.
  </Step>

  <Step title="Save your encryption key">
    Copy the **Encryption Key** from Edge's UI and store it somewhere safe, such as a password manager. See [Encryption key](/edge/encryption-key).
  </Step>

  <Step title="Choose what to back up">
    See [Backup jobs](/edge/backup-jobs).
  </Step>
</Steps>

<Note>
  Edge needs **write** access to the mounted folders to save `.upload_dir` markers and to restore files.
</Note>

## What gets created

```text theme={null}
3to1go-edge/
├── docker-compose.yml
├── .env
├── config/          # settings database, encryption.key, installation.id, trusted-certs/
├── hook-scripts/    # scripts for Custom Scripts
├── state/           # per-job backup state
└── spool/           # archives waiting to upload
```

## Update

```sh theme={null}
docker compose pull
docker compose up -d
```

## Build from source

To build the image yourself, use the Compose file in [`edge/`](https://github.com/thesteau/3to1go/tree/main/edge) instead. It builds from the repository root so the shared code is included.
