Industrial control with AI bots: air-gapped Linux tutorials
A practical, Linux-first course on using AI bots around industrial control systems (PLCs, SCADA, HMIs, historians) without making the plant less safe. Written by a bot, checked against public OT security guidance (NIST SP 800-82r3, ISA/IEC 62443), and built for sites that cannot send data to the cloud.
Who this is for
Controls engineers, OT/IT security staff, maintenance techs and integrators who want the productivity of an assistant (summaries, troubleshooting help, report drafting, code review of PLC exports) on networks that are segmented or fully air-gapped.
The lessons
1. Ground rules: what a bot may and may not do in OT
The non-negotiables: read-only first, no bot on safety systems, zones and conduits, humans own every write.
2. Run a local LLM on an air-gapped Linux box
Build llama.cpp from source, load a GGUF model, serve it on 127.0.0.1 only. No internet, no cloud keys.
3. Sneakernet: move models and updates across the gap safely
Hash, sign, scan and log every file that crosses the gap. One-way, checked, recorded.
4. Read Modbus TCP data with a bot (read-only)
Poll holding and input registers with Python, then let the local model explain the numbers.
5. Read OPC UA tags securely with a bot
Use SignAndEncrypt, a read-only account and certificate trust lists. Browse, read, never write.
6. Bot-written shift reports and alarm summaries
Turn historian CSVs and alarm journals into a plain-English handover the next shift can trust.
7. Audit logs that a bot cannot rewrite
Append-only logs, hash chains and auditd so every prompt, answer and action is traceable.
8. Human-in-the-loop: approval gates before anything moves
Propose, review, approve, execute, verify. A two-person rule for any setpoint change a bot suggests.
Reference architecture
Keep the bot in its own zone. Data flows up and out of the control network, not down into it.
Level 0-1 Field devices, PLCs, SIS <- no bot access, ever for SIS
Level 2 HMI / SCADA servers <- read-only via OPC UA or Modbus gateway
-------- conduit: firewall / data diode, allow-list, logged
Level 3 Site ops DMZ: historian replica + "bot box" (Linux, local LLM)
Level 3.5 Sneakernet station: hash, scan, sign, log every file in or out
Level 4-5 Business / internet <- air gap: nothing crosses liveLevels follow the Purdue model commonly used with ISA/IEC 62443 zones and conduits. Your site's architecture may differ; map it before you connect anything.
What you need
- A dedicated Linux machine (Debian/Ubuntu LTS or RHEL-family) with no route to the internet, 16-64 GB RAM; a GPU helps but is optional.
- A test PLC, simulator or OPC UA demo server for practice. Never learn on production.
- Written permission from whoever owns the control system, and your site's management-of-change process.
New to bots? Start with the general guides on catching made-up answers. That skill matters more in a plant than anywhere else.
Questions
Can a chatbot run my plant?
No. Use bots to read data, explain it and draft work. Keep control actions with qualified people and your existing, validated control logic.
Do I need the internet?
No. Every lesson here works fully offline with a local model on Linux.
Where these facts come from
- ISA/IEC 62443 series: zones, conduits and security levels for industrial automation
- NIST SP 800-82 Rev. 3: Guide to Operational Technology (OT) security
- CISA: Industrial Control Systems: advisories and recommended practices
- Modbus Organization specifications: function codes and the TCP transport
- OPC Foundation: OPC UA specifications and security modes
- llama.cpp on GitHub: building and running local GGUF models on Linux
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 →