website/docs/guides/offline-mode.mdx
moon assumes that an internet connection is always available, as we download and install tools into the toolchain, resolve versions against upstream manifests, and automatically install dependencies. While this is useful, having a constant internet connection isn't always viable.
To support workflows where internet isn't available or is spotty, moon will automatically check for an active internet connection, and drop into offline mode if necessary.
When offline, moon will skip or disable the following:
PATH.PATH, will fail to run.While we automatically check for an internet connection, both online and offline modes can be forced
with the PROTO_OFFLINE environment variable. Setting the variable to 1 or true will force
offline mode, while 0 and false will force online mode.
Some additional variables to interact with offline checks.
PROTO_OFFLINE_TIMEOUT - Customize the timeout for offline checks (in milliseconds). Defaults to
750.PROTO_OFFLINE_HOSTS - Customize additional hosts/IPs to check for offline status. Separate
multiple hosts with a ,.PROTO_OFFLINE_IP_VERSION - Customize which IP version to support, 4 or 6. If not defined,
supports both.