# Julia mirror (pkg.shecan.ir)

> Julia Pkg server (JULIA_PKG_SERVER) for Pkg: registries (General), packages and artifacts by tree hash, served from the Julia storage servers.

- Upstream: us-east.storage.juliahub.com (سرور ذخیره‌سازی Julia)
- Mirror URL: <https://mirror-julia.pkg.shecan.ir>
- Clients: julia
- Service status: <https://pkg.shecan.ir/status.json> (key `julia`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/julia/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/julia.json>

## Limitations

- Artifacts of 200 MB or more (for example CUDA) are downloaded through the mirror but not cached.
- Packages that are not in a registry (Pkg.add(url=...)) are cloned from their git host.
- Julia itself (juliaup, julialang-s3.julialang.org) is not mirrored.

## 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.

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

Run (linux, macos)

```sh
export JULIA_PKG_SERVER=https://mirror-julia.pkg.shecan.ir
```

Undo / restore the default (linux, macos)

```sh
unset JULIA_PKG_SERVER
sed -i.bak -E '/^export (JULIA_PKG_SERVER)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```

Run (windows) (checked by hand)

```powershell
[Environment]::SetEnvironmentVariable('JULIA_PKG_SERVER', 'https://mirror-julia.pkg.shecan.ir', 'User')
```

Undo / restore the default (windows) (checked by hand)

```powershell
[Environment]::SetEnvironmentVariable('JULIA_PKG_SERVER', $null, 'User')
```
