Docs / Start here
On a company network
Setting up and running on a network that blocks downloads, requires a proxy or replaces certificates.
Mostly read byPlatform, DevOps and IT
Setting up the mirror downloads software: a virtual machine manager, a Linux image, Docker, gVisor and container images. Many company networks restrict downloads. This page says what setup needs from the network, how to find out what yours blocks, and what works today.
Most of this page is about setup, not the sandbox. The downloads happen from your computer and from the engine VM, before any agent runs. An agent inside a world still reaches only the model endpoint you configured; the one part that touches a run is how the gateway reaches that endpoint on a company network, under "Tell the mirror about your company's network".
Install the mirror itself
Installing comes before any of the mirror's own checks, and it downloads Python packages with uv. On a network that replaces certificates it stops like this:
error: Failed to download `...`
cause: invalid peer certificate: UnknownIssuer
uv checks servers against its own list of certificate authorities, not the one your computer trusts, so it does not know your company's root. Tell it to use your computer's:
uv tool install --editable . --system-certs
- Older versions of uv call the option
--native-tls. uv's own error message names the one your version takes. - The same option works on
uv syncanduv run, for those working on the mirror's code. - To set it once, export the environment variable your version documents beside the option (
uv tool install --helpshows it; on versions with--native-tlsit isUV_NATIVE_TLS=true). - If the network requires a proxy, uv reads
HTTPS_PROXY, as the mirror's own downloads do.
git clone uses your computer's certificates on macOS and Windows already. If it fails the same way, your company's instructions for git apply.
Building the portal
A clone does not hold the portal's built web files, so mirror portal asks you to build them once with npm. Like uv, npm checks servers against its own list of certificate authorities. If the build stops with SELF_SIGNED_CERT_IN_CHAIN or UNABLE_TO_GET_ISSUER_CERT_LOCALLY, give Node your company's root in a file:
export NODE_EXTRA_CA_CERTS=/path/to/company-root.pem
then run the build again. The portal is optional: every command works without it.
Check the computer first
mirror engine preflight
A company's computer can be locked down in ways that have nothing to do with the network. This command asks the operating system, changes nothing and needs no network:
- Virtual machines. The engine is one. A Mac that is itself a virtual machine, a Linux machine without KVM, or Windows without WSL cannot hold it.
- Disk and memory, against what the engine is given.
- Rosetta, on Apple Silicon: systems that publish only an x64 image need it.
- A company network client (Zscaler, GlobalProtect, Cisco Secure Client and the like). It is not a fault, but it is the usual reason downloads are blocked or re-signed, so the command names it and points to the network check.
mirror engine setup runs the same checks before a first setup. It stops, before downloading anything, on one that cannot work, and says the others and carries on.
Find out what your network does
mirror engine network
The command needs no engine and changes nothing. It greets each host setup downloads from and reports one line per host:
| Result | What it means |
|---|---|
ok |
The host answered with a certificate this computer trusts. |
inspected |
The host answered with a certificate signed by someone else, usually your company. The network opens encrypted connections to look inside them. The line names the signer and whether this computer trusts it. |
cut, refused, silent, no name |
The host is blocked, or the network needs a proxy that this computer is not set to use. |
proxy |
A proxy is set, and it turned the connection away or did not answer. |
An inspected host is not always a problem, and the line says which case it is:
- Fetched by your computer, signed by a root your computer trusts: it works, and is marked
ok. - Container images, fetched by the engine: the engine refuses the replaced certificate, but your computer fetches these for it. Marked as a note.
- Docker and gVisor, installed by the engine itself: this stops setup on this network. Marked
FAIL.
It then says what to do. It exits with 0 when nothing stops setup. A proxy's sign-in name and password are not printed.
What setup downloads
Give this list to your network team if hosts are blocked. All are on port 443 unless marked.
| Host | For | Fetched by |
|---|---|---|
github.com, release-assets.githubusercontent.com |
Lima, which runs the engine (macOS and Linux) | Your computer |
cloud-images.ubuntu.com |
The engine's Linux image (macOS and Linux) | Your computer |
releases.ubuntu.com |
The engine's Linux image (Windows) | Your computer |
ports.ubuntu.com (port 80) on Apple Silicon; archive.ubuntu.com and security.ubuntu.com (port 80) on x64 |
The engine's packages | The engine |
download.docker.com |
Docker | The engine |
gvisor.dev, storage.googleapis.com |
gVisor | The engine |
registry-1.docker.io, auth.docker.io, production.cloudflare.docker.com |
Container images | The engine |
quay.io, cdn01.quay.io, mcr.microsoft.com |
Container images | The engine |
Two more things use the network and are not in the list:
- Your model provider. A run calls the model endpoint in your
mirror.yaml, from the engine. - Installing the mirror itself.
gitanduvfetch from GitHub and the Python package index (pypi.organdfiles.pythonhosted.org): see "Install the mirror itself" above.
What is downloaded is checked. Lima and the Linux image must match checksums recorded in this repository, container images are fetched by digest, and packages are verified against their publishers' signing keys.
Set up once on an open network
The surest way through a strict network is to do the downloading somewhere else, once. Take the computer to a network without these limits: home Wi-Fi or a phone hotspot, with the VPN off. Then:
mirror engine setup # Lima, the engine's Linux, Docker and gVisor
mirror engine fetch # every container image a first world runs, and the browser's packages
mirror engine check
mirror engine fetch lists what was already there, what it fetched and what it could not. When the engine cannot pull an image itself, your computer downloads it and loads it into the engine: see "When the engine cannot download images". When it ends with "Everything a first world needs is on this computer", creating and running worlds downloads nothing more. Back on the company network, two things still use it:
- Your model provider, on every run. If the company network replaces certificates or requires a proxy, see "Tell the mirror about your company's network".
- An agent's own image, when you add an agent that brings one.
Setup is safe to run again and carries on from where it stopped, so you can start it on one network and finish it on another.
When the engine cannot download images
The engine pulls its own container images. On a company network it may not be able to: it does not have your proxy, and it has your company's certificate only if you gave it one (see "Tell the mirror about your company's network"). Your computer usually has both. So when a pull fails, mirror engine fetch downloads that image on your computer and loads it into the engine through the Docker API.
What arrives is checked as a pull checks it. Each image is pinned by a digest, every part of it is named by its own digest, and each part is hashed as it is downloaded. A network that re-signs connections can read the download, but a changed part is refused.
This covers the images. It does not cover what the engine installs with its package manager: Docker and gVisor during mirror engine setup. Those need the engine to trust your company's certificate, an open network once, or an imported engine.
Carry a prepared engine from another computer
If this computer cannot reach an open network at all, an engine that already works on another computer can be copied to it. On macOS:
# On the computer where setup works (after mirror engine setup and mirror engine fetch):
mirror engine export engine.mdx
# Copy the file across, then on this computer:
mirror engine import engine.mdx --sha256 <the checksum the export printed>
mirror engine check
The import downloads nothing: the file holds the engine's Linux, Docker, gVisor, the container images a first world needs, and Lima.
What the export leaves out. It does not change the engine it copies. It cleans a copy: every world, run, volume and agent image is removed, then your account, the logs and the VM's own keys. Your worlds stay where they were, and none of them is in the file.
Whose file to import. Everything in a world runs inside the engine, so an engine made by someone else could read your model provider's key. Import only a file you or your own team made, and give --sha256 so the import stops if the file is not the one that was exported. The checksum tells a damaged or swapped file from the right one; it does not tell you whether to trust the person who made it.
What the file is. A few gigabytes of other projects' software under their own licences (Ubuntu, Docker, gVisor and the container images). It is for your own computers and your own team; the project publishes no ready-made engine.
Things to know:
- Both computers must be the same kind (for example, both Apple Silicon Macs) and should run the same version of the mirror.
- This computer must not have an engine yet. To replace one:
mirror engine destroy, which also removes its worlds. - An imported engine is as old as its export. Update it later with
mirror engine update, on a network that allows it. - Linux and Windows cannot export or import yet.
Decision 0033 has the reasoning.
Tell the mirror about your company's network
On a network that replaces certificates, two things fail until the mirror is told about it: the engine cannot install Docker and gVisor during setup, and a run cannot call your model provider. One setting fixes both. It is off unless you switch it on, and it is a setting of your computer, not of a project.
mirror engine company-network --detect # find your company's root and set it
mirror engine company-network --detect --proxy proxy.yourcompany.com:8080
mirror engine company-network --ca-file company-root.pem # or give the file yourself
mirror engine company-network # show the setting
mirror engine company-network --off # call the model directly again
The engine takes the certificate the next time it is set up or started, so run mirror engine setup after this (again, if it stopped before: it carries on from where it stopped). The gateway takes it the next time a world comes up (mirror up, or mirror down first if one is running).
The certificate. With --detect you do not need to know which one it is. The mirror greets one public host, reads the chain of certificates your network showed, and follows it up through your computer's trust store to the root. It shows that root's name, fingerprint and expiry and asks before using it. If the chain ends at a root that came with your operating system, the network is not replacing certificates and nothing is set. --detect works on macOS, Linux and Windows; on Windows it has been checked on a test machine only, not yet on a company computer, so if it finds nothing there, give the file yourself as below.
A company computer often holds a dozen certificates with similar names, and the one in use is not obvious from the list, which is why finding it from a real connection is the surer way. To give the file yourself (--ca-file), it must be the root at the top of the chain, alone, in PEM form:
- macOS: open Keychain Access, choose System, find the root certificate, and use File, Export Items, format "Privacy Enhanced Mail (.pem)". Or:
security find-certificate -c "<name>" -p /Library/Keychains/System.keychain > company-root.pem - Windows: run
certmgr.msc, open Trusted Root Certification Authorities, Certificates, right-click the certificate, All Tasks, Export, and choose "Base-64 encoded X.509". - Linux: your IT team's instructions say where the file is; it is often under
/usr/local/share/ca-certificates/.
Either way, the mirror uses a certificate only if your computer's own trust store already holds it, which it does on a laptop your company manages. It shows the certificate's name, fingerprint and expiry and asks before saving. If the computer does not trust it, the mirror refuses, and there is no way to force it: do not use a certificate someone sent you that your computer does not trust.
More than one certificate. A company often has two roots: the one its network re-signs outside traffic with, and another that its own internal services, such as a model gateway, are signed by. --detect looks at github.com and finds the first. To add the one a particular host is signed by:
mirror engine company-network --detect --host models.yourcompany.com
It adds to what is set, and the engine and the gateway are given every root you have set. mirror agent check tells you when a model's certificate is signed by none of them. --off removes them all.
The proxy. Give the proxy's own address on the network as host:port. If it asks for a sign-in, set MIRROR_PROXY_SIGN_IN=name:password in the shell that runs mirror up. The sign-in is not stored on disk; it stays in the gateway until the world goes down.
What this changes, and what it does not:
- The certificate goes into the engine VM's own trust store, for what the engine downloads itself, and to the gateway, for model calls. The proxy's address and sign-in go to the gateway only. No twin, agent or other container holds any of them.
- What the engine downloads is still checked: packages against their publishers' signing keys, whose fingerprints are pinned, and images against pinned digests.
- The gateway still accepts only a certificate that names your model provider's host. It now also accepts one your company's root signed.
- Through a proxy, the engine's firewall opens the proxy's one address and port in place of the provider's. The gateway asks the proxy for your provider's host and nothing else.
- The agent sees what it saw before: the provider's name, with a certificate from the world's own root.
- Each result records it (
platform.company_network), and the report shows it.
What to know before you switch it on:
- Your company's network equipment can read these model calls, including your provider key, as it can for every other tool on the computer.
- Scenarios hold made-up attack text and canary credentials. Your company's security tools may flag or block calls that carry them, which can raise an alarm and can change a result. Consider telling your security team first.
The setting stays until you remove it. Away from the company network, the proxy cannot be reached and model calls fail: switch it off there with --off, and set it again when you are back.
If a call fails, mirror agent check says which part stopped it: the certificate, the sign-in or the proxy. Decision 0032 has the reasoning.
When setup stops
Setup names the step that failed, says what the network did, and lists the ways past it.
- A download made by your computer (Lima, the engine's Linux image). The error gives the address and the place to save the file. Fetch it in a browser, save it there, and run setup again. The file is checked against its pinned checksum before it is used, whoever fetched it.
- A download made by the engine (its packages, Docker, gVisor, images). Setup looks at the network from inside the engine and reports what it met. If the network replaced a certificate, the first way past it is to give the engine your company's root (
mirror engine company-network --ca-file), then run setup again. The others are an open network once, an imported engine, or having the hosts allowed.
With the engine running, mirror engine network shows both views: each host as your computer sees it, and as the engine does.
What works today
- Setting up once on an open network, as above.
- Fetching the two files your computer downloads by hand.
- Allowing the hosts. If your network team allows the hosts above without a proxy and without replacing their certificates, setup works as it does anywhere.
- A proxy, for the downloads your computer makes. Set
HTTPS_PROXY(for exampleexport HTTPS_PROXY=http://proxy.yourcompany.com:8080) beforemirror engine setup. - Setting up with no way out at all, on macOS, from an engine exported on another computer: see "Carry a prepared engine from another computer".
- Container images through a proxy or replaced certificates. When the engine cannot pull them, your computer downloads them and loads them in: see "When the engine cannot download images".
- Installing through replaced certificates, with uv's
--system-certs: see "Install the mirror itself". - Setup and model calls through replaced certificates, once you give the mirror your company's root: see "Tell the mirror about your company's network". Model calls also pass a proxy.
- Replaced certificates, for the downloads your computer makes. If your computer already trusts your company's root certificate, as a managed laptop usually does, these downloads work. Many company roots lack a field that Python 3.13 insists on by default; the mirror accepts them as browsers and curl do. If your computer does not trust the root, set
SSL_CERT_FILEto a file that holds it in PEM form.
What does not work yet
- The engine's own downloads behind a required proxy. The engine is given your company's certificate when you set one, but not your proxy. On a network where nothing leaves except through a proxy, what it installs itself (Docker and gVisor at setup) fails. Do setup once on an open network, or import an engine. Container images are the exception: your computer fetches them for it.
- Proxy scripts. If your computer chooses its proxy with a script (a PAC file), the mirror does not run it: such a script is a program from the network, and only a browser's sandbox is a fit place to run one.
mirror engine networkreads the script as text and lists the proxies it names, so you can try one: setHTTPS_PROXYfor setup, and givemirror engine company-network --proxythe same address for model calls. It cannot say which proxy the script would choose for a given host. - A proxy that runs on your own computer (a local agent listening on
127.0.0.1). Nothing in the sandbox has a route to your computer, so the gateway cannot use it. - Proxy sign-in other than a name and password (NTLM, Kerberos).
- Your company's own mirrors of these hosts (an internal package or image registry).
- Carrying a prepared engine on Linux and Windows. Export and import are macOS only for now.
The checks and messages here were built against stand-in servers that behave like a restricted network, and reports from one company laptop: there, uv sync --system-certs got past replaced certificates. Model calls through a company network were run against a stand-in proxy inside the engine, not yet on a real company network, and the trust-store check on Windows is untested. Images downloaded by the computer were tried against Docker Hub, Quay and Microsoft's registry from an open network, with the engine's own pulls made to fail. On Windows, a failed step in the engine is not yet explained by its network. If you hit something this page does not cover, the output of mirror engine network is the most useful thing to include in a report.
This page is docs/restricted-networks.md in the repository; improve it there.