Skip to content

IT deployment#

This page is for IT departments that install NucleI on many lab PCs, for example in a university teaching lab or a QC lab. It covers:

  • unattended installs on Windows, macOS and Linux;
  • the machine policy file, which fixes settings for every user of a PC;
  • reimaged and "frozen" PCs (Deep Freeze and similar tools).

To let people sign in with their organisation account, see Directory sign-in.

To run your own gateway for shared instruments, courses and sharing, see Self-hosting the gateway. To plug NucleI courses on a self-hosted gateway into Moodle, Canvas, Blackboard or Brightspace, see LMS integration (LTI 1.3).

Nothing on this page changes a normal single-user install. Without a policy file, NucleI behaves exactly as described in Installation.

Windows#

The Windows release is one NSIS installer, NucleI-<version>-setup.exe. When run by hand it asks whether to install for the current user or for all users. For a managed rollout, run it silently and choose the mode on the command line.

Switch Effect
/S Silent install: no wizard, no prompts.
/allusers Install for all users (per-machine) under C:\Program Files\NucleI. Needs administrator rights.
/currentuser Install for the user running the installer, under %LOCALAPPDATA%\Programs\NucleI.
/D=<folder> Install into another folder. It must be the last argument and must not be quoted, even if the path has spaces.

Per-machine install, as run by SCCM, Intune (Win32 app), PDQ Deploy or an elevated script:

NucleI-2.9.0-setup.exe /S /allusers

Into a different folder:

NucleI-2.9.0-setup.exe /S /allusers /D=D:\Apps\NucleI

Uninstall without prompts:

"C:\Program Files\NucleI\Uninstall NucleI.exe" /S /allusers

The installer exits with code 0 on success. To detect the installed app, check that C:\Program Files\NucleI\NucleI.exe exists, or use the uninstall entry named NucleI under HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall.

Run elevated

If /allusers is run without administrator rights, Windows shows a UAC prompt, so the install is no longer unattended. Deployment tools that run as SYSTEM do not have this problem.

Each user still keeps their own settings, profiles and logs under %APPDATA%\NucleI. Only the program files are shared. The data folder chosen in the app is stored there too, so it is a per-user setting; to set one data folder for every user, use dataRoot in the machine policy.

Updates on per-machine installs#

The built-in updater installs a new version over the existing one. On a per-machine install this needs administrator rights, which lab users normally don't have. On managed PCs, turn the updater off in the policy file ("updates": {"enabled": false}) and roll out each new installer with the commands above. Help → Check for Updates then tells the user that updates are managed by their organisation.

MSI#

There is no MSI package at the moment. The NSIS installer covers SCCM, Intune and scripted rollouts. If your environment can only deploy MSI packages, for example through Group Policy software installation, contact us.

macOS#

The macOS release is a .dmg that holds NucleI.app. Copying the app into /Applications already makes it available to every user of the Mac. To deploy it with a script, Jamf, Munki or a similar tool:

hdiutil attach -nobrowse -quiet -mountpoint /Volumes/NucleI NucleI-2.9.0.dmg
sudo ditto /Volumes/NucleI/NucleI.app /Applications/NucleI.app
hdiutil detach -quiet /Volumes/NucleI

Most management tools can also take the .dmg directly. We don't ship a signed .pkg installer at the moment. Then deploy the policy file (see below) as a separate step.

Linux#

The .deb and pacman packages already install system-wide, under /opt/NucleI (see Linux). For an unattended install:

sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ./NucleI_2.9.0_amd64.deb
sudo pacman -U --noconfirm NucleI-2.9.0.pacman

Put the policy file at /etc/nuclei/policy.json with your configuration management tool (Ansible, Puppet, Salt). The packages don't own that file, so upgrading or removing NucleI leaves it in place.

Machine policy file#

The policy file is a JSON file at a fixed system location. NucleI reads it once at startup, both in the app and in the analysis engine. When the policy sets a value:

  • the value overrides the user's own setting;
  • the matching control in the app is disabled and marked Set by your organisation.

Removing a key from the file returns that setting to the users.

System Location
Windows %ProgramData%\NucleI\policy.json (normally C:\ProgramData\NucleI\policy.json)
macOS /Library/Application Support/NucleI/policy.json
Linux /etc/nuclei/policy.json

Lab users must be able to read the file but not change it, and NucleI checks this. The file and its folder must be owned by an administrator, and writable only by administrators:

  • Windows: the owner must be SYSTEM or Administrators, and no other account (including Users and Authenticated Users) may have write, create-file, delete or change-permissions rights. The default ProgramData permissions let any user create files in a new folder there, so they are not enough. A per-machine install (/allusers) creates %ProgramData%\NucleI with the right permissions. If you create it yourself, run icacls "%ProgramData%\NucleI" /setowner "*S-1-5-32-544" /T and then icacls "%ProgramData%\NucleI" /inheritance:r /grant:r "*S-1-5-18:(OI)(CI)F" "*S-1-5-32-544:(OI)(CI)F" "*S-1-5-32-545:(OI)(CI)RX" /T.
  • macOS and Linux: the file and its folder must be owned by root and not writable by group or others (mode 0644 for the file, 0755 for the folder).

If the check fails, NucleI ignores the identity, dataRoot, licence, gateway, teachingFeatures, groupKeys, audit and destinations sections, writes the reason to the log, and Settings > Storage shows "The machine policy file was ignored because its permissions are unsafe". The telemetry and updates sections still apply. Changes take effect the next time NucleI starts.

To try a policy before rolling it out, place the file at the system location on a test PC, with the permissions above.

Example#

{
  "schemaVersion": 1,
  "licence": { "directory": "D:\\NucleI\\licence" },
  "gateway": { "url": "https://nmr-gateway.chem.example.edu" },
  "telemetry": { "enabled": false },
  "updates": { "enabled": false, "channel": "stable" },
  "dataRoot": "D:\\NucleI\\Experiments",
  "teachingFeatures": { "enabled": true, "locked": false },
  "groupKeys": { "custody": "endToEnd", "locked": true },
  "audit": { "forwardToGateway": true, "localCopy": true, "locked": true },
  "destinations": [
    {
      "plugin": "com.terraquanttech_llc.elabftw",
      "destination": "elabftw",
      "settings": { "server_url": "https://elab.chem.example.edu" },
      "defaultTarget": { "id": "42", "name": "Group results" },
      "locked": true
    }
  ]
}

Every key except schemaVersion is optional.

Reference#

Key Type Effect
schemaVersion number Required. Must be 1. A file with any other version is ignored as a whole.
licence.directory absolute path Folder that holds the activated licence (license.key) instead of the user's app data. Use a folder that survives a reimage; see Frozen PCs.
gateway.url http:// or https:// URL The Gateway every user connects to. The Server address field on the TQT Connect page is locked, and the app never switches to another gateway, including the regional TQT Connect servers.
gateway.enrolmentToken text An enrolment code from the self-hosted gateway's App enrolment page, as XXXX-XXXX-XXXX-XXXX-XXXX. Requires gateway.url. See Gateway enrolment token.
gateway.certificateKeyFingerprint text The gateway's certificate key, as sha256: followed by 64 hexadecimal digits. Requires gateway.url. See Gateway certificate key.
telemetry.enabled true / false false turns off anonymous usage data, detailed diagnostics and both data-contribution switches, and locks all four. true locks only the main usage-data switch on.
updates.enabled true / false false stops NucleI from checking for and installing updates, both at startup and from the Help menu.
updates.channel "stable" The update channel. stable is the only channel for now.
dataRoot absolute path, or object Folder where experiments are stored. It overrides the data folder setting in the app and the NUCLEI_DATA_ROOT environment variable. If a data folder change was queued in the app, it is not applied while this key is set. The object form adds network-share options; see Data folder on a network share.
teachingFeatures.enabled true / false Default for the Teaching features setting on PCs where NucleI hasn't been started yet.
teachingFeatures.locked true / false true applies enabled on every start and locks the setting. Defaults to false.
groupKeys.custody "server" / "endToEnd" Who holds the keys of course, share and review-request groups that this PC's app creates or switches. server: the gateway holds them. endToEnd: only the people in the group do. Without it the gateway's group_keys.custody setting applies.
groupKeys.locked true / false true: the app refuses to create, send in or switch a group to the other mode, and says why. Defaults to false.
audit.forwardToGateway true / false Send every audit entry to the connected gateway as well as keeping it on the PC. Without it, forwarding is on and the administrator can switch it on the Audit page. Nothing is sent while no gateway is connected, or while the gateway does not accept forwarded trails (audit.accept_forwarded). See Forwarded audit trails.
audit.localCopy true The local audit trail is kept. true is the only accepted value: false is reported as an invalid value and ignored, because a trail held only on the gateway is not offered.
audit.locked true / false true applies forwardToGateway and the administrator cannot change it. It has no effect without forwardToGateway. Defaults to false.
destinations list of objects Connections to result destinations such as eLabFTW, used as each user's starting connection. See Result destinations.
identity object Sign-in with the organisation's directory (OIDC or LDAP/AD). See Directory sign-in.

Paths can be drive paths (D:\NucleI\data), UNC paths (\\server\share\nmr) or POSIX paths (/srv/nmr). Environment variables such as %USERNAME% are not expanded.

Result destinations#

Each entry of destinations sets the connection to one destination that a plugin provides. It applies in Settings > Destinations, the Send to dialogs, the Task Manager's Export Results step and batch reports.

Key Type Effect
plugin text Required. The plugin that provides the destination, for example com.terraquanttech_llc.elabftw.
destination text Required. The destination's id within the plugin, for example elabftw.
settings object of text The destination's non-secret connection fields. server_url is the server address: https://, or http:// for this computer only, without credentials in the address.
defaultTarget object The experiment or folder that receives files: id (required) and name (shown in the app). Without it the destination decides, which for eLabFTW creates a new experiment.
locked true / false true: users cannot change the server, the other fields in settings or the target; the form shows them read-only with the note "Set by your organisation", and the backend applies them whatever a client sends. false (default): the values are defaults that users may replace.

The file is readable by every user, so it never holds a secret. A settings key that looks like a secret (it contains key, token, secret, password, credential, authorization, bearer, cookie or session) refuses the entry. Each user enters their own API key once; it is kept encrypted in their profile and bound to the server address.

An entry with an unknown plugin or destination, a bad address, a secret-like field or a repeated plugin and destination is ignored with a logged problem; the other entries still apply.

When the policy has errors#

A broken policy never stops NucleI from starting.

  • If the file isn't valid JSON, isn't a JSON object, or has a missing or wrong schemaVersion, the whole file is ignored. NucleI then runs as if there were no policy.
  • An unknown key, or a key with a value of the wrong type, is ignored. The rest of the file still applies. When an unknown key is close to a known one, the log names the known key: Machine policy: unknown key "gateway.enrollmentToken"; did you mean "enrolmentToken"?.
  • The identity section is the exception: any problem in it refuses the whole section, and organisation sign-in stays off until it is fixed. NucleI then shows a notice listing each problem. See Directory sign-in.

Each problem is written to the NucleI log, together with the key at fault (for example Machine policy: invalid value for "telemetry.enabled"). Users are not shown these messages, except the notice about the identity section. After deploying a new policy, check the log on one PC: it should say Machine policy loaded from and the file's path. Directory sign-in lists every message, where the logs are, and what to do about each.

Gateway enrolment token#

A self-hosted gateway signs in only apps that are enrolled with it. With gateway.enrolmentToken, each PC enrols itself the first time NucleI contacts the gateway, and users never see the enrolment step:

{
  "schemaVersion": 1,
  "gateway": {
    "url": "https://nmr-gateway.chem.example.edu",
    "enrolmentToken": "7K2M-9QXD-4TPA-W8RN-C3HV"
  }
}
  • Use a code with unlimited uses, and an expiry that covers the rollout. Codes are created on the gateway; see App enrolment.
  • Each PC receives its own installation credential. After that, the token is not used again on that PC. Where the credential is kept:

    System Location
    Windows Windows Credential Manager of the signed-in user
    Linux The Secret Service keyring of the signed-in user (GNOME Keyring, KWallet). Without a running Secret Service, NucleI does not enrol and logs that the system keyring is unavailable; it never stores the credential in plain text instead.
    macOS The file ~/Library/Application Support/NucleI/gateway/installations.json, readable only by the user (0600, folder 0700). NucleI ignores the file, and treats the PC as not enrolled, if its permissions are wider.

    The credential belongs to the OS user, not to a NucleI profile: every profile of that user shares it, and it is never written to the data folder. - The token is sent only to the gateway named in gateway.url. Without gateway.url, or with an invalid one, the token is ignored and the log says Machine policy: "gateway.url" is required but missing or invalid value for "gateway.url". - The token is a secret. NucleI never writes it to the log or shows it in the app. Keep the policy file readable only as described in Machine policy file; if the permission check fails, the token is ignored with the rest of the gateway section. - If the gateway administrator revokes a PC, NucleI removes that PC's credential and does not enrol it again from the token. A user on that PC must enter a new code on the TQT Connect page. - Revoking the code on the gateway stops new enrolments. PCs already enrolled keep working. - When the gateway no longer recognises a PC's credential (for example, after its database was restored from an older backup), the PC enrols again with the token.

Gateway certificate key#

A self-hosted gateway certifies who signs in through it, for directory and LMS accounts, so their review signatures show as verified. The app trusts the gateway's certificate key from enrolment. With gateway.certificateKeyFingerprint, it trusts only the key you name: enrolment with a gateway that offers another key is refused, and certificates from any other gateway key do not count.

{
  "schemaVersion": 1,
  "gateway": {
    "url": "https://nmr-gateway.chem.example.edu",
    "certificateKeyFingerprint": "sha256:3f1c…"
  }
}

To get the value, run sudo docker compose exec gateway /app/server/main.bin certificate-fingerprint in the gateway's folder. The same value is the fingerprint field of https://<gateway>/api/identity/certificate-key; read it there only over a connection you trust. Upper or lower case and surrounding spaces don't matter. After the gateway's data/identity.key is replaced, update the policy with the new value.

Without this field, the first enrolment decides which key is trusted. Enrolling, and so trusting a gateway's key, is open only to administrator profiles.

On shared lab PCs where one OS account serves many people, set gateway.certificateKeyFingerprint. The trusted key is kept per OS account, so without the field anyone using that account, from any profile, can change which gateway key it trusts.

Data folder on a network share#

Give dataRoot as an object to set how NucleI uses a shared folder:

"dataRoot": {
  "path": "\\\\nmr-srv\\experiments",
  "perUserFolder": true,
  "network": true,
  "lockTimeoutSeconds": 30,
  "staleLockSeconds": 120
}
Key Type Effect
path absolute path The shared folder.
perUserFolder true / false Each Windows, macOS or Linux user gets their own folder under path, named after the operating system account (DOMAIN\ada becomes ada); it is read from the OS, not from environment variables. NucleI creates it on first start. Default false.
network true / false Treat path as a network share (true) or a local disk (false). Leave it out to detect it. Set true for a share mounted on a folder (for example /mnt/nmr), so an unmounted share is reported instead of being written to the local disk.
lockTimeoutSeconds number How long a save waits for another computer that is saving the same file. Default 30.
staleLockSeconds number Time without a sign of life after which a lock left by a crashed computer is broken. A computer that is saving refreshes its lock every quarter of this time, so a slow save is never broken into. Default 120.

On a share, NucleI:

  • locks each file while saving it, so two computers never write the same file at once; a save that waits too long says another computer is saving it;
  • never creates the shared folder itself, only the per-user folder: if the share isn't there, NucleI says it is offline instead of writing to the local disk;
  • reports at startup, without hanging, when the share can't be reached, and shows a message when the share drops out and when it comes back;
  • allows for the coarse file times and clock differences of file servers when it refreshes the project list.

The file server's clock should still be kept in sync (NTP) with the lab PCs.

Directory sign-in#

With an identity section, users sign in with their organisation account (Microsoft Entra ID, Google Workspace, Keycloak, Okta or another OpenID Connect provider, or Active Directory over LDAP). Directory sign-in explains the ideas, gives step-by-step recipes for each provider, lists every setting and error message, and shows how to test it before rollout.

Reimaged and frozen PCs#

Tools such as Deep Freeze, Reboot Restore or a nightly reimage put the system drive back to a saved state at every restart. Everything NucleI writes there is lost: user settings, security profiles, audit logs under %APPDATA%\NucleI, the activated licence, and experiments under Documents.

Image build.

  • Install NucleI per-machine (/S /allusers) and put the policy file into the image.
  • Generalise the image with Sysprep before cloning. The licence is tied to each PC's machine identity, and cloned PCs that share one identity cannot be activated separately.
  • Activate the licence on each PC after cloning, not in the master image.

Keep data off the frozen drive. Point dataRoot at a thawed partition (for example D:\) or a network share, so experiments survive a restart.

Keep the licence off the frozen drive. Point licence.directory at a thawed folder on each PC, so the activated licence survives a restart. Part of the licence check state lives in each user's credential store, which a frozen profile also resets. After every reset, the first start of NucleI therefore needs internet access to terraquant.tech to verify the licence. Frozen PCs that are permanently offline are not supported in this version.

Per-user state. Settings, local security profiles and audit logs are per user and reset with the profile. If you need audit records to persist, keep the profile on a thawed drive or use roaming profiles. With directory sign-in, a reset also clears the keychain secret of each PC, so encrypted directory profiles ask for their recovery key again after every reset; on frozen PCs, set "encryptProfiles": false and keep the data folder on a share.

Turn off updates. Set "updates": {"enabled": false}. An update installed into a frozen drive is undone at the next restart, so roll out new versions into the image instead.