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

# 3. Mirror Server Setup

> Install Mirror Manager, prepare the upgrade files, publish them over HTTP, and reach Upgrade Readiness PASS.

# 3. Mirror Server Setup

Complete this page **before the DP maintenance window whenever possible**. The goal is simple: the Mirror Server must report **Upgrade Readiness = PASS** and you must generate fresh DP client commands before touching the DPs.

## Before you begin

Confirm the Mirror Server:

* runs Ubuntu 24.04 LTS amd64
* has at least 100 GB total disk for the current artifact set
* has a stable IPv4 address reachable by every target DP
* has outbound access required for GitHub, Cloudflare R2, ACPS, and Ubuntu bootstrap packages
* has the ACPS credentials available
* has the DL/DA worker IPs and common `aella` worker password available when this is a clustered deployment

## Step 1 — Install Mirror Manager

Run:

```bash theme={null}
sudo apt-get update
sudo apt-get install -y git

git clone https://github.com/xdr-labs/ubuntu-mirror-automation.git
cd ubuntu-mirror-automation
sudo ./install.sh
```

The installer opens the Mirror Manager when an interactive terminal is available.

To reopen an existing installation later:

```bash theme={null}
sudo ubuntu-offline-mirror mirror-manager
```

Do **not** rerun `install.sh` just because the SSH session disconnected.

> **Screenshot note:** one uploaded historical terminal screenshot contains an older repository URL, so it is intentionally not used here. The `xdr-labs/ubuntu-mirror-automation` command above is the current source.

## Step 2 — Understand the required workflow

The Mirror Manager displays the workflow status in one place:

```text theme={null}
1  Configuration
2  Download and Prepare Upgrade Files
3  Enable HTTP Distribution
4  Verify Upgrade Readiness
7  Show DP Client Upgrade Commands
```

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/2.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=70d0ae0e184f3fabb65530258837cf40" alt="Mirror Manager main menu" width="823" height="409" data-path="images/google-sites/03-mirror-server-setup/2.png" />

You are ready for the DP side only after the preparation workflow is complete and readiness reports `PASS`.

## Step 3 — Configure the Mirror Server

Open **Menu 1 — Configuration**.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/3.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=527c58e1e5000284e07a26e2f5f7bc70" alt="Mirror Manager configuration screen" width="824" height="675" data-path="images/google-sites/03-mirror-server-setup/3.png" />

### 3.1 Select Preparation Mode

Choose:

* **Full OS Upgrade + Phase 2** when the DP still runs Ubuntu 16.04
* **Phase 2 Only** when a supported DP is already on Ubuntu 24.04

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/4.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=86a4ab37ab3f59106de7a2c87497331c" alt="Mirror Manager preparation mode selection" width="822" height="463" data-path="images/google-sites/03-mirror-server-setup/4.png" />

The current Phase 2 target is **DP 6.6.0**.

### 3.2 Confirm the Mirror Server IP

Enter the IPv4 address that the target DPs can actually reach.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/5.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=17477ae76f8d7d3402a04bebdc7c1728" alt="Mirror Server IP configuration" width="788" height="208" data-path="images/google-sites/03-mirror-server-setup/5.png" />

The IP is embedded in generated DP client artifacts. If it changes later, regenerate the workflow outputs before using Menu 7.

### 3.3 Enter ACPS credentials

Enter the ACPS username and password for the deployment.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/6.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=8cffb660afe8d5100f850a923386dd76" alt="ACPS username entry" width="791" height="209" data-path="images/google-sites/03-mirror-server-setup/6.png" />

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/7.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=bdd98de6e1838a743d6fdf1ad05be55f" alt="ACPS password entry" width="791" height="216" data-path="images/google-sites/03-mirror-server-setup/7.png" />

The screenshots are examples. Use the credentials assigned to the current environment and do not publish passwords in tickets or documentation.

### 3.4 Test ACPS connectivity

Run **Test ACPS Connection**. The expected result is:

```text theme={null}
ACPS_CONNECTION=PASS
```

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/8.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=ac0cb2816bd22ff1e4b3a6354cfef99d" alt="ACPS connection PASS" width="798" height="221" data-path="images/google-sites/03-mirror-server-setup/8.png" />

### 3.5 Configure workers for DL/DA clusters

Enter only the worker IPs for each cluster. Do **not** include the master IP in a worker list.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/22.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=ce59ffeea7502558ab6f81a59b691c3b" alt="Worker IP address configuration" width="1804" height="931" data-path="images/google-sites/03-mirror-server-setup/22.png" />

For AIO, single-node, or master-only deployments, leave worker lists empty.

### 3.6 Save Configuration

Save the configuration and confirm the selected mode, Mirror Server IP, and current target.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/9.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=6ffecadcd71eee11f66a024c42b7bbaa" alt="Mirror Manager configuration saved" width="791" height="304" data-path="images/google-sites/03-mirror-server-setup/9.png" />

## Step 4 — Download and Prepare Upgrade Files

From the main menu select **Menu 2 — Download and Prepare Upgrade Files**.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/10.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=862b27fccb84f8ea95751f57c16e607d" alt="Select Download and Prepare Upgrade Files" width="830" height="412" data-path="images/google-sites/03-mirror-server-setup/10.png" />

Confirm the requested preparation operation.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/11.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=420627b10c73c65a1abe838830a758bd" alt="Confirm Mirror Manager download and prepare" width="793" height="219" data-path="images/google-sites/03-mirror-server-setup/11.png" />

This step can take time. Large downloads, checksum validation, and bundle operations emit progress or heartbeat messages. If an SSH session disconnects, reconnect and reopen Mirror Manager instead of reinstalling.

The current workflow can reuse valid completed files and partial download data. Do not delete `.part` files just to force a restart.

## Step 5 — Enable HTTP Distribution

After Menu 2 completes, select **Menu 3 — Enable HTTP Distribution**.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/14.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=20bcd20081fa20095c1042bc35186023" alt="Enable HTTP Distribution menu" width="820" height="410" data-path="images/google-sites/03-mirror-server-setup/14.png" />

The target DPs consume upgrade material from:

```text theme={null}
http://<MIRROR_SERVER_IP>:80
```

## Step 6 — Verify Upgrade Readiness

Select **Menu 4 — Verify Upgrade Readiness**.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/16.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=bf37b4eeecc01854888db462fa305b53" alt="Verify Upgrade Readiness menu" width="815" height="404" data-path="images/google-sites/03-mirror-server-setup/16.png" />

Then use **Show Current Status** and confirm the current workflow is ready. The expected final state includes:

```text theme={null}
Configuration: PASS
OS Upgrade Files: READY          # Full mode
DP 6.6.0 Bundle: READY
HTTP Distribution: ENABLED
Upgrade Readiness: PASS
Progress: 4 of 4 workflow steps completed
```

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/18.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=8920e039d8b8e4a9164de5c92d108556" alt="Mirror Manager current status with Upgrade Readiness PASS and DP 6.6.0 bundle ready" width="713" height="369" data-path="images/google-sites/03-mirror-server-setup/18.png" />

**Do not start the DP-side upgrade unless Upgrade Readiness is `PASS`.**

## Step 7 — Generate fresh DP client commands

Open **Menu 7 — Show DP Client Upgrade Commands** only after readiness is `PASS`.

Menu 7 is the authoritative source for environment-specific commands. The output is also saved at:

```text theme={null}
/var/log/ubuntu-mirror-automation/dp-client-upgrade-commands.txt
```

If Mirror Manager reports that previously generated commands are stale, do not reuse them.

<img src="https://mintcdn.com/dp-os-upgrade/Z7oWoDiD9TjfLXUi/images/google-sites/03-mirror-server-setup/19.png?fit=max&auto=format&n=Z7oWoDiD9TjfLXUi&q=85&s=16d055f1ad22822d59d1890919ab9421" alt="Mirror Manager stale client command warning" width="1941" height="574" data-path="images/google-sites/03-mirror-server-setup/19.png" />

After a Mirror Server IP or relevant configuration change, repeat the required preparation/publish/readiness sequence and generate fresh commands.

> **Version note:** several uploaded screenshots were captured during an earlier 6.5.0 development stage. They are intentionally omitted from this runbook. The active documentation target is **DP 6.6.0**.

## Completion gate

Before proceeding to the DPs, confirm all of the following:

* Configuration saved
* ACPS connection tested successfully
* Download and Prepare completed
* HTTP Distribution enabled
* Upgrade Readiness = `PASS`
* fresh Menu 7 commands generated for the current Mirror Server IP

## Next step

Continue with **[4. DP Offline Ubuntu Upgrade](/runbook/offline-dp-upgrade)**.
