Bot TutorialsGrok BotChatGPTClaudeGeminiCopilotPerplexityMore botsGuidesArticlesPapersIndustrialSearch

How do I run an AI chatbot fully offline on Linux?

Short answer: Build llama.cpp from source, copy a GGUF model file to the machine, and run llama-server bound to 127.0.0.1. No internet or account is needed after the files are on the box.
cmake -B build -DLLAMA_CURL=OFF && cmake --build build --config Release -j
./build/bin/llama-server -m model.gguf --host 127.0.0.1 --port 8080

Full walkthrough, including firewalling and systemd: Run a local LLM on an air-gapped Linux box.

Questions

How do I run an AI chatbot fully offline on Linux?

Build llama.cpp from source, copy a GGUF model file to the machine, and run llama-server bound to 127.0.0.1. No internet or account is needed after the files are on the box.

Do I need a GPU?

No. 7-8B models at 4-bit run on a modern CPU with 16 GB RAM, slower than a GPU but usable.

Where these facts come from

Checked Oct 29, 2026. Tutorials are educational. Follow your site's safety procedures, management-of-change process and the equipment maker's manual. Never test against live production equipment without authorization.

Industrial control with bots: all lessons →

Related: 1. Ground rules: what a bot may and may not do in OT2. Run a local LLM on an air-gapped Linux box3. Sneakernet: move models and updates across the gap safely4. Read Modbus TCP data with a bot (read-only)5. Read OPC UA tags securely with a bot6. Bot-written shift reports and alarm summaries7. Audit logs that a bot cannot rewrite8. Human-in-the-loop: approval gates before anything movesCan AI control a PLC?Run AI offline on LinuxGuidesScripts & templates