-
Notifications
You must be signed in to change notification settings - Fork 38
Installation and Updates
This page shows how to install QiTech OS on a panel PC, what starts on first boot, and how to update or roll back.
QiTech OS is a NixOS system built from the nixos/ folder of the control repository (NixOS explains the files). It boots into a GNOME desktop, logs in the qitech user automatically and opens the QiTech Control app full screen. The backend runs as the systemd service qitech-control-server.
flowchart LR
subgraph PANEL["Panel PC with QiTech OS"]
UI["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/nixos/os/home.nix'>QiTech Control app</a><br/>Electron kiosk"]:::frontend
SRV["<a href='https://github.com/qitechgmbh/control/blob/jse-control-v2/nixos/modules/qitech.nix'>qitech-control-server</a><br/>systemd service"]:::control
NIC["EtherCAT port<br/>dedicated NIC"]:::hardware
USB["USB port"]:::hardware
end
UI -->|"REST and Socket.IO<br/>localhost:3001"| SRV
SRV --> NIC
SRV --> USB
NIC -->|"Ethernet cable"| EK["EK1100 coupler<br/>and terminals"]:::hardware
USB -->|"USB-RS485"| LASER["Laser"]:::hardware
classDef frontend fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef control fill:#dcfce7,stroke:#15803d,color:#14532d
classDef framework fill:#fef3c7,stroke:#b45309,color:#78350f
classDef lib fill:#ede9fe,stroke:#6d28d9,color:#4c1d95
classDef hardware fill:#f1f5f9,stroke:#475569,color:#0f172a
You need the panel PC, a keyboard, a USB drive of at least 4 GB and Wi-Fi with internet access. The installer erases the target drive.
1. Get the ISO. The GitHub Actions workflow Nix ISO (.github/workflows/iso.yml) builds it on every push to master, every Monday and on demand. Download the .iso from the artifacts of the latest successful run (GitHub login required), or build it yourself on an x86_64 Linux machine with Nix:
./nixos/nixos-build-iso.sh # result/iso/*.iso2. Flash the USB drive. Open Balena Etcher, click Flash from file, select the ISO (unzip it first if you downloaded a .zip), select the USB drive and click Flash.
3. Boot from USB. Plug in the USB drive and the keyboard, switch the panel on and open the boot menu (F7 on our mini PCs; other boards use F8, F11, F12 or Esc). Select the USB drive and press Enter.
4. Connect to the internet. The live system boots into the same desktop as an installed panel. Open the quick settings in the top-right corner and connect to Wi-Fi. Wired ports are left to EtherCAT (NetworkManager ignores all Ethernet devices), so Wi-Fi is the way in.
5. Run the installer. The dock shows two QiTech icons: the app and, on the right, Install QiTech Control. Click the right one. A terminal opens and runs nixos/nixos-setup.sh:
- It lists the drives. Type the number of the target drive and confirm with
y. - It partitions the drive (512 MiB EFI partition, the rest ext4) and generates the hardware configuration.
- It clones the
masterbranch ofhttps://github.com/qitechgmbh/controland installs that system withnixos-install. This takes a while. - When it prints Installation complete!, remove the USB drive and reboot.
The installer installs the current master, not the version the ISO was built from. To run a specific release, update to its tag afterwards (see below).
On a machine that already runs NixOS (with /etc/nixos/hardware-configuration.nix), install from a clone. Don't do this on your everyday computer: it replaces the whole system configuration.
nix-shell -p git
git clone https://github.com/qitechgmbh/control.git
cd control
git checkout <tag> # optional: the version to install
./nixos-install.shnixos-install.sh records the git version, runs sudo nixos-rebuild boot --flake .#nixos --impure and reboots into the new system.
| What | Details |
|---|---|
| Login | The qitech user logs in automatically. It may use sudo without a password. |
| UI | The QiTech Control app starts automatically and runs full screen. The dock holds the app and GNOME Settings. |
| Backend |
qitech-control-server starts at boot and restarts 10 s after it exits. State (for example Modbus assignments) lives in /var/lib/qitech. |
| Panel behaviour | On-screen keyboard on; no screen lock, blanking or suspend. |
| Remote access | Caddy serves the backend over HTTPS on port 443, see Networking and remote access. |
Next step: assign the machine's terminals (Identification).
Updates run from the UI and need internet access.
- Open Setup → Update. Current Version shows what is installed.
-
Update source is
qitechgmbh/controlby default. For a private fork, change the source and add a GitHub token (typed in, or loaded from a.txtfile on a USB drive). - Under Choose a Version, pick one of the latest tags, Show … more versions, a branch (searchable) or a
mastercommit. Versions older than the installed one are marked. - Read the changelog and start the update.
What happens then (update-listeners.ts):
- The app clones the chosen version into
~/control(/home/qitech/control), or fetches it into the existing clone. - It runs
./nixos-install.shthere, which builds the complete system (backend, app and OS) withnixos-rebuild boot. The panel compiles everything itself, so this takes a while. - If the build succeeds, the new version becomes the boot default and the panel reboots. If it fails, the log shows the error and the installed system stays as it was.
Each stable release has a git tag. Prefer tags over branches on production machines.
Every update adds a NixOS generation next to the old ones, so older versions stay bootable.
-
In the UI: Setup → Update → Installed Versions lists the generations. Select makes one the boot default and reboots. Delete removes one; the button below the list deletes all old generations (after that there is nothing to roll back to).
-
At boot: the boot menu lists all generations, labelled
<tag or branch>_<commit>. Pick an older one with the arrow keys. This boots it once without changing the default. -
In a terminal:
sudo nixos-rebuild boot --rollback && sudo reboot
The system sets QITECH_OS_* environment variables at build time (the full list is on the NixOS page):
env | grep QITECH_OSQiTech Control · GitHub · Framework wiki · Lib wiki · Report a docs problem
Getting Started
Guides
Machines
Developers
Related