# MX Linux mirror (pkg.shecan.ir)

> Mirror of the MX Linux repositories on mxrepo.com (/mx/repo/ and /mx/testrepo/ with dists/<debian codename>/) for apt on MX 21, 23 and 25. The Debian base comes from mirror-debian.

- Upstream: mxrepo.com
- Mirror URL: <https://mirror-mx.pkg.shecan.ir/mx/repo/>
- Clients: apt
- Service status: <https://pkg.shecan.ir/status.json> (key `mx`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/mx/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/mx.json>

## Limitations

- apt still verifies the MX signature (mx<version>-archive-keyring).

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### apt: persistent (user- or system-wide configuration)

Run, MX Linux 23 and 25 (linux) (checked by hand)

```sh
sudo cp -a /etc/apt/sources.list.d /etc/apt/sources.list.d.bak
sudo sed -i -E 's#https?://[^ ]+/mx/(repo|testrepo)/?#https://mirror-mx.pkg.shecan.ir/mx/\1/#; s#https?://(deb|security)\.debian\.org/#https://mirror-debian.pkg.shecan.ir/#' /etc/apt/sources.list.d/*.list
sudo apt update
```

Undo / restore the default, MX Linux 23 and 25 (linux)

```sh
sudo rm -rf /etc/apt/sources.list.d
sudo mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d
```
