Executable programs and extensions

Building Fully Offline Local AI: Air-Gap Installation and Update Procedures

Prepare an air-gapped local AI system from file transfer through recovery testing

Air-gapped local AI deployment installs a model and its runtime1 environment on a computer without internet access so it can answer questions locally. Prepare the runtime, drivers, packages, settings, and licenses along with the model, verify file hashes, and test installation, inference2, updates, and recovery without external communication.

When sending the first question on an internal computer, the model file may be visible while loading fails because the tokenizer or runtime package is still being fetched from the internet. Check in sequence that every installation file was gathered in the online preparation area and transferred, and that the model actually answers inside the internal environment.

Include dependencies, configuration, licenses, and provenance in the transfer manifest along with the model. Compare file hashes and complete an offline installation in an environment without a cache before testing an update. Install the new version alongside the current environment so you have a place to return to if something goes wrong.

Requirements and key details
  • Separate the online preparation area from the internal runtime area and list the required files.
  • Record versions and hashes, then transfer files on approved media.
  • Test the full path from installation to an answer without external communication or preloaded caches.
  • Validate a new version in a separate location and keep the old version for recovery.

List the files required alongside the model

In the networked preparation area, make an inventory of the checkpoint3, tokenizer, runtime, GPU4 driver, and packages and configuration files for the target operating system. If you use RAG5, include the embedding model and indexing tools.

If Transformers will load a Hugging Face model directly, download the required revision in advance. Prepare compatible versions of the Python packages and accelerator runtime that the offline machine will use.

Each app needs different files and an import path. For LM Studio, prepare the app, its runtime, and the model file. You can add an external GGUF6 to its library with lms import.

With Ollama, point FROM in a Modelfile to a local GGUF file or supported Safetensors folder, then run ollama create to create the model.

Approved media carrying a file manifest and verification records entering a segregated work area
Transfer the verified file bundle and its records together from the online preparation area.

Register the model using the selected runtime’s import path

In the online preparation area, download the required Hugging Face Hub repository revision with snapshot_download. Set HF_HUB_OFFLINE=1 or use from_pretrained(..., local_files_only=True) so internal code does not contact the Hub, and point the model path to the transferred local directory. Confirm that both model and tokenizer files are present, then disconnect the network and load them.

When transferring a GGUF into LM Studio, use lms import <file-path> --copy to preserve the source file. The default action moves the file, so the copy option keeps the transfer original. In Ollama, set FROM in the Modelfile to the local file or directory, create the model, and then run it. Every shard of a split GGUF must be present.

Copy a GGUF into the LM Studio library
lms import /path/to/model.gguf --copy
Replace this with the path to the transferred file. `--copy` registers a copy without moving the original.
Ollama Modelfile example
FROM /path/to/model.gguf
In the Modelfile’s `FROM` line, enter the actual path to the model file copied to the internal computer.
Create and run the model in Ollama
ollama create local-model -f Modelfile
ollama run local-model
Confirm that the model is created and answers a question. For a split model, transfer every shard.
Load with Hugging Face Hub access disabled
HF_HUB_OFFLINE=1 python run_local.py
The script must use the transferred local model path. If a required file is missing from the Hub cache or local directory, loading will fail.

Verify file integrity before and after transfer

Record each file’s version and hash before copying it to approved media. Inspect the media according to organizational procedures, then recalculate hashes after transfer and compare them with the manifest. If a value differs, do not install that file; check the source copy and transfer process.

Keep the file and hash lists, sources and licenses, installation order, and verification date together with the transfer bundle. This record lets you reinstall the same version and trace the source of update files.

Install from scratch in an environment without cached files

Prepare a clean test environment with no package cache pre-populated online. With the network disconnected, check dependency installation, model loading, the first request, and a valid answer in order. Review logs for failed download attempts and confirm that the server starts again using the documented procedure after a reboot.

If you use document RAG, test that embedding and index creation also complete offline. Disable external telemetry and automatic update checks, then use your organization’s inspection methods to check firewall or network records for outbound connection attempts. Separately check whether internal file paths appear in error logs or screens.

A computer installing local AI from storage while disconnected from the network
Check installation and the first answer with no existing cache and no external connection.

Install and validate updates in a new location

Install a new model or runtime in a separate versioned location instead of overwriting the active path. While offline, check representative evaluation questions, answer quality, processing time, and startup after reboot; then point the service to the new location. Because model changes can alter answers, compare both versions with the same inputs.

If the new version fails, point the service back to the previous version. Preserve settings, prompts7, index versions, and driver combinations along with the checkpoint so you can reproduce the same runtime state. Run the rollback procedure in a disconnected test environment and record whether it succeeds and which steps it takes.

A local AI system keeping new and previous versions in separate locations
Validate the new version alongside the old one and restore the previous state if a problem occurs.

Narrow down first-run errors in order: files, format, then connectivity

If the app cannot find the model, check the model folder it reads and the import status. In LM Studio, see whether the model appears in the library; in Ollama, check whether its name appears in ollama list.

With Transformers, check that from_pretrained receives the local path. If you see a Hub connection error, check the offline setting; if tokenizer or configuration files are missing, compare the files with the preparation inventory.

If the file is found but fails to load, check its format and whether every shard is present. Then check the runtime version, GPU driver, and memory requirements.

If it ran only on the networked computer, cached dependencies may have supplied files that were missing from the bundle. Reinstall in a test environment without a cache, and record the error and actual file versions and hashes.

If the service will not start after an update or cannot answer a representative question, point it back to the previous version and restore the saved settings, index, and driver combination. The rollback procedure is usable only after this recovery completes and the system answers the same representative question.

Set permissions and operational records according to internal policy

Keep an internal record of who transferred each file and who checked its hash and installation result. Logs may contain original requests or confidential documents.

Set log-retention periods and access permissions. If needed, configure logs to keep only request IDs and error stages.

USB media, administrator accounts, and local execution permissions remain security concerns even on a segregated network. Manage media approval and inspection, least privilege, and administrator activity records under your organization’s security procedures. Regular backup8 restoration and rollback tests preserve a recovery path that can be used during an incident.

Terminology notes

  1. Runtime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.

    Back to the text
  2. Inference — The process of using a trained model to compute an output for an input. Here, local inference means running the model on the user’s device.

    Back to the text
  3. Checkpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.

    Back to the text
  4. GPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.

    Back to the text
  5. Retrieval-Augmented Generation — A method that retrieves material relevant to a query, adds it to the model input, and generates an answer from that context.

    Back to the text
  6. GGUF — A file format for model data, widely used by llama.cpp-based tools.

    Back to the text
  7. Prompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.

    Back to the text
  8. Backup — Saving settings and data to a file so the same setup can be returned to after a hardware failure.

    Back to the text

Frequently asked questions

What should you check first in this article?
Air-gapped local AI deployment installs a model and its runtime environment on a computer without internet access so it can answer questions locally. Prepare the runtime, drivers, packages, settings, and licenses along with the model, verify file hashes, and test installation, inference, updates, and recovery without external communication.
Where can you check the conditions and sources?
Keep the file and hash lists, sources and licenses, installation order, and verification date together with the transfer bundle. This record lets you reinstall the same version and trace the source of update files.