Executable programs and extensions
Last updated
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.
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.
- LM Studio offline features and features that require a network
- Import an external GGUF into LM Studio
- Import a model into Ollama
- Transformers offline mode
- GGUF vs MLX: which model format should you download?
- How to Back Up and Restore a Local LLM You Already Use
- Run GGUF directly in Transformers: how it differs from llama.cpp and MLX
- Which local LLM app or serving engine should you start with?

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.
lms import /path/to/model.gguf --copyFROM /path/to/model.ggufollama create local-model -f Modelfile
ollama run local-modelHF_HUB_OFFLINE=1 python run_local.pyVerify 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.

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.

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
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 textInference — 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 textCheckpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.
Back to the textGPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.
Back to the textRetrieval-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 textGGUF — A file format for model data, widely used by llama.cpp-based tools.
Back to the textPrompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.
Back to the textBackup — 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.
Read next
Executable programs and extensions
How to Back Up and Restore a Local LLM You Already Use
Executable programs and extensions
Local AI Agent Security: Check Permissions, Network Paths, and Secrets
read first
Local RAG Setup Guide: Build an AI That Answers from Your Documents
Executable programs and extensions
Which local LLM app or serving engine should you start with?
