OTForge Student Setup Guide
Install three tools, clone the repository, and run a few commands. The whole process takes about 30–45 minutes (most of that is download time).
System Requirements
| Windows | macOS | |
|---|---|---|
| OS | Windows 10 22H2 or later; Windows 11 | macOS 12 Monterey or later |
| RAM | 8 GB minimum (16 GB recommended) | 8 GB minimum (16 GB recommended) |
| Disk | 20 GB free | 20 GB free |
| CPU | 64-bit with virtualization enabled | Intel or Apple Silicon (M1/M2/M3/M4) |
Windows — verify virtualization is enabled:
Open Task Manager → Performance → CPU. Confirm “Virtualization: Enabled”. If it says Disabled, ask your instructor for BIOS help before continuing.
1 Install Docker Desktop
Go to https://www.docker.com/products/docker-desktop and download the installer for your platform.
Apple Silicon Mac (M1/M2/M3/M4): Choose “Mac with Apple Silicon” — not the Intel version.
To check: Apple menu → About This Mac. Look for “Chip” (Apple Silicon) or “Processor” (Intel).
Run the installer and launch Docker Desktop. Wait until the status shows “Engine running” (green indicator) before continuing.
Sign-in is not required — click “Continue without signing in” if prompted.
Verify:
docker --version
2 Install Git
Go to https://git-scm.com/downloads and download the installer for your platform. Accept all defaults.
Verify:
git --version
3 Install Node.js 22
Go to https://nodejs.org and download the LTS release. Make sure the major version is 22 — if the site shows a different version, click “Other Downloads” and select v22.
Run the installer and accept all defaults.
Node.js 20 will not work. OTForge requires Node.js 22 or later.
Verify:
node --version
npm --version
4 Clone OTForge
Windows — PowerShell
mkdir C:\OTForge
cd C:\OTForge
git clone https://github.com/iburres/otforge.git .
macOS — Terminal
mkdir ~/OTForge
cd ~/OTForge
git clone https://github.com/iburres/otforge.git .
The
.at the end of thegit clonecommand clones into the current folder — do not omit it.
D:\ drive: If your C:\ drive is full, use
D:\OTForgeinstead — substituteD:forC:everywhere in this guide. All scripts auto-detect the drive they are run from.
5 Install and Launch
Windows — PowerShell (from C:\OTForge)
First, allow PowerShell scripts to run (one-time, your account only):
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Type Y when prompted.
Then launch OTForge:
npm run dev
macOS — Terminal (from ~/OTForge)
npm run dev
That single command does everything on first run: it installs the app's dependencies, downloads the Electron desktop runtime (~90 MB), builds the packages, and launches OTForge. The first run takes a few minutes; later runs start quickly. If the Electron download is blocked by antivirus or a campus network, run
.\fix-electron.ps1(Windows) — it checks a local cache before downloading.
OTForge will open. The first time you run a scenario and click Start Simulation, Docker will pull the required container images (~2–4 GB one-time download). This takes several minutes — subsequent launches are fast.
6 Scenarios Folder
Your lab files (.otflab) go in:
| Platform | Path |
|---|---|
| Windows | C:\OTForge\scenarios\ |
| macOS | ~/OTForge/scenarios/ |
This folder is created automatically when you clone the repository, and your instructor's lab files are already in it. When a new or updated lab is released, you get it automatically the next time you update OTForge (see Getting Updates below) — there's nothing to download or copy in by hand.
Getting Updates
The easiest way is the in-app button. With OTForge open and a lab loaded, click Update OTForge in the toolbar. It pulls the latest code, updates dependencies, and refreshes the Docker container images for your lab — all in one step. Open a lab first: image refresh only happens when a scenario is loaded, so clicking it on an empty screen updates the code but not the containers.
When the update changes OTForge's own code, it will ask you to restart. Stop the app (close the window, or press Ctrl+C in the terminal) and run npm run dev again — any queued dependency updates are applied automatically during that startup.
Why the button matters: a plain
git pullonly updates source code. It does not refresh the Docker container images, so attack scripts or services added in a new lab can appear “missing” until the images are refreshed. The Update OTForge button handles both.
Code-only refresh (fallback). If you just want the latest source without touching containers, run these from your OTForge folder — same on Windows and macOS:
git pull
npm run dev
git pull downloads the latest code, and npm run dev installs any new dependencies, repairs the Electron runtime if needed, and relaunches the app.
Troubleshooting
“Docker Desktop is not running”
Open Docker Desktop and wait for the green “Engine running” status before launching OTForge.
Docker Desktop hangs at “Starting Engine” (Windows)
This means the WSL 2 backend or the Docker service got stuck during installation or after an update. Try these steps in order:
- Quit Docker Desktop — right-click the Docker whale icon in the system tray and choose Quit Docker Desktop.
- Restart WSL — open PowerShell and run:
wsl --shutdown - Relaunch Docker Desktop — wait up to two minutes for the green “Engine running” indicator to appear.
If the spinner still does not clear:
- Open Task Manager → Services tab → find com.docker.service → right-click → Restart.
- Relaunch Docker Desktop.
If none of the above work, restart your computer and relaunch Docker Desktop. A full reboot clears stuck WSL instances and stalled service states.
npm run dev fails — Electron not installed (macOS)
npm run dev repairs a missing Electron runtime automatically on startup, so running it again is usually enough:
npm run dev
npm run dev fails — Electron not installed (Windows)
npm run dev already tries to fix this automatically, but if your antivirus or campus network blocks the direct download from GitHub, it can still fail. Run the included repair script from C:\OTForge:
.\fix-electron.ps1
It checks for an already-cached copy first, then downloads directly with clear error messages if that fails too.
TypeError: crypto.hash is not a function
You are running Node.js 20. Uninstall it and install Node.js 22 from https://nodejs.org, then rerun from Step 5.
Docker images fail to pull / EOF errors during simulation start
This is a network interruption — Docker's CDN dropped the connection mid-download. Click Stop Simulation, then Start Simulation again. Docker resumes interrupted downloads and usually succeeds on the second attempt.
If it keeps failing:
- Disconnect from any VPN
- Switch to a different Wi-Fi network (personal hotspot works well)
- Sign in to Docker Hub (
docker login) — authenticated pulls are more stable
“Pool overlaps with other one on this address space”
A leftover Docker network from a previous session is blocking the new one. Remove stale networks:
docker network prune
Type y when prompted, then relaunch the simulation.
Prevention: always click Stop Simulation in OTForge before closing the app.
Windows — virtualization not enabled
Search your laptop model + “enable virtualization BIOS” for instructions specific to your hardware. Contact your instructor if you need help.
Windows — Firewall Rule (Recommended)
When OTForge is running, Docker publishes lab ports to all network interfaces on Windows. Add a firewall rule to block them from being reachable by others on the same Wi-Fi.
Open PowerShell as Administrator and run:
New-NetFirewallRule `
-DisplayName "OTForge -- Block inbound lab ports" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 1881,3000,3100,6800-6899,6900-6999,18080-18199 `
-Action Block `
-Profile Any
| Port(s) | Service |
|---|---|
| 1881 | FUXA process HMI |
| 3000 | Grafana dashboards |
| 3100 | Loki log API |
| 6800–6899 | Engineering workstation VNC desktops |
| 6900–6999 | Kali Linux attack machine VNC desktop |
| 18080–18199 | OpenPLC web IDE and Modbus ports (per PLC) |
macOS: Docker Desktop for Mac binds published ports to
127.0.0.1(localhost only) by default — no firewall rule is needed on macOS.
Quick Reference
| Task | Windows | macOS |
|---|---|---|
| Open terminal | Start → PowerShell | Applications → Utilities → Terminal |
| Navigate to OTForge | cd C:\OTForge | cd ~/OTForge |
| Launch OTForge | npm run dev | npm run dev |
| Scenarios folder | C:\OTForge\scenarios\ | ~/OTForge/scenarios/ |
| Get updates | Update OTForge button (lab loaded) | Update OTForge button (lab loaded) |