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

# Multi node setup

# Multi-Node Setup

How to add a second machine (like the Pentium) and route traffic to it through Traefik on the primary node.

## Overview

```
Internet → Cloudflare Tunnel → i3 Traefik → i3 containers (Docker network)
                                           → Pentium containers (LAN HTTP)
```

The primary machine (i3) runs Traefik as the single ingress point. The secondary machine (Pentium) runs services that Traefik reaches over the LAN.

## Steps

### 1. Set up the second machine

* Install Debian, Docker, Docker Compose
* Clone the repo: `git clone git@github.com:amarcin/homelab.git ~/apps`
* Assign a static IP (e.g., `192.168.1.16`)

### 2. Configure SSH access

From the primary machine, set up passwordless SSH:

```bash theme={null}
ssh-copy-id user@192.168.1.16
```

Add to `~/.ssh/config`:

```
Host pentium
    HostName 192.168.1.16
    User user
```

### 3. Add Traefik routing

On the primary machine, add services to `traefik/dynamic/pentium-services.yaml`:

```yaml theme={null}
http:
  routers:
    service-name:
      rule: "Host(`service.augustin.ai`)"
      entryPoints: [websecure]
      service: service-name
  services:
    service-name:
      loadBalancer:
        servers:
          - url: "http://192.168.1.16:<port>"
```

Traefik picks up dynamic config changes automatically.

### 4. Deploy services on the second machine

```bash theme={null}
ssh pentium
cd ~/apps
docker compose -f <service>/compose.yaml up -d
```

## Backups Across Nodes

Each machine backs up to the other via SFTP, plus Backblaze B2. See [Backups](backups) for details.
