Skip to content

Documentation

Running without internet

This guide lists everything a site without internet access (an "air-gapped" site) needs to run LEA Platform: installing and upgrading, agents, the command line, rule updates, functions, the AI assistant, notifications, sign-in and the license. LEA Platform is built to run fully offline; this page tells you what to carry in and what to point at internal services.

Before you start

  • You need a connected machine (outside the air gap) to download files, and an approved way to move files in (for example removable media that passes your scanning process).
  • You need a shell on the LEA server with Docker and the Docker Compose plugin.
  • Keep every downloaded file together with its signature file (.asc or .sig). You verify them inside the air gap.

What works offline and what needs an internal service

FeatureWorks offline?What you need inside your network
Console, compliance, rules, groups, reports, evidenceYesNothing
Agents on hostsYesHosts reach the LEA server on port 443. Agents download from the LEA server itself
lea command lineYesDownloaded from the LEA server itself
Rule updatesYesSigned rule packs you carry in
FunctionsYesBundles that include everything they need (no pip)
In-console documentation (this guide, the Help panel)YesNothing. It is part of the console
Single sign-onYesAn identity provider inside your network (for example Keycloak or AD FS)
Email notificationsYesAn internal mail server (SMTP relay)
WebhooksYesThe receiving system inside your network
AI assistantOnly with a local modelA model server with an OpenAI-compatible API, or leave it off
Slack, Microsoft TeamsNo, unless you allow a controlled pathThey are internet services
LicenseYesA license file you carry in

Carry in a release

On the connected machine, download for your server architecture (amd64 or arm64):

  • the release lea_release_<version>_<arch>.tgz and its signature lea_release_<version>_<arch>.tgz.asc;
  • the GSR release signing key lea_release_signing_key.asc (once);
  • the container images the release uses (next section).

Prepare the container images

The LEA server runs everything in containers. Without internet it cannot download them, so you bring them in as a file.

  1. On the connected machine, unpack the release and list the images it uses:

    tar -xzf lea_release_<version>_<arch>.tgz
    grep 'image:' lea_release/docker-compose.yml | sort -u
    

    You should see lines such as image: gsrrelease/lea_server:<version>, image: postgres:16, image: nginx:1 and image: postgrest/postgrest:v14.16.

  2. Pull each image and save them all into one file. Replace the list with the images from step 1:

    docker pull gsrrelease/lea_server:<version>
    docker pull gsrrelease/lea_frontend:<version>
    docker pull postgres:16
    docker pull nginx:1
    docker pull postgrest/postgrest:v14.16
    docker save -o lea-images-<version>.tar gsrrelease/lea_server:<version> gsrrelease/lea_frontend:<version> postgres:16 nginx:1 postgrest/postgrest:v14.16
    

    <version> is the release version, for example 2.1.0. Pull images for the same architecture as your LEA server.

  3. Copy lea-images-<version>.tar, the release .tgz, its .asc and the signing key into the air gap.

Tip: Instead of carrying images, you can build the two LEA images on the server from the release itself with docker compose build api frontend. The public images (postgres, nginx, postgrest) still have to be carried in.

Install LEA Platform offline

  1. Verify the release. Do not install a release whose signature does not verify:

    gpg --import lea_release_signing_key.asc
    gpg --verify lea_release_<version>_<arch>.tgz.asc lea_release_<version>_<arch>.tgz
    

    You should see "Good signature".

  2. Load the images:

    docker load -i lea-images-<version>.tar
    
  3. Unpack and initialise:

    sudo mkdir -p /opt/lea && cd /opt/lea
    tar -xzf lea_release_<version>_<arch>.tgz
    cd lea_release
    ./lea_init_env.sh
    

    You should see the admin password printed once. Save it.

  4. Replace the self-signed certificate with one from your internal certificate authority: put the full chain in docker-compose.d/web/ssl/cert.crt, the key in docker-compose.d/web/ssl/cert.key, and run docker compose restart web.

Keep the release .tgz and its .asc next to the unpacked directory: in a cluster, new nodes download the release from the first node, not from the internet.

Point your internal DNS name at the server and use a certificate issued for that name. After signing in, set Public URL of LEA Platform under Settings → Notifications → Options to that address.

The Customer Portal's Releases page also offers an offline bundle (release, signature, signing key and all images in one file) whose installer does these steps for you, including the certificate (LEA_CERT and LEA_KEY) and start at boot.

The full procedure is in Install and upgrade.

Upgrade offline

With the offline bundle from the Customer Portal: build the bundle of the new version, copy it to the server, unpack it and run sudo ./install.sh in its directory. The installer sees the running LEA Platform and explains the upgrade instead of installing; run sudo LEA_UPGRADE=check ./install.sh for a dry run and sudo LEA_UPGRADE=1 ./install.sh to upgrade. It loads the images for you. Without the bundle, follow these steps:

  1. Carry in the new release, its .asc and its images, as in Carry in a release.

  2. Verify the new release with gpg --verify (see Install LEA Platform offline, step 1).

  3. Load the new images before you upgrade:

    docker load -i lea-images-<new>.tar
    
  4. Put the new release and its .asc in a new directory, unpack it there and check the upgrade. The check changes nothing:

    mkdir -p /opt/lea/new && cd /opt/lea/new
    tar -xzf lea_release_<new>_<arch>.tgz
    ./lea_release/lea_upgrade.sh check /opt/lea/lea_release --images none
    

    You should see "Check passed". If it lists missing images, load them (step 3) and check again.

  5. Upgrade:

    ./lea_release/lea_upgrade.sh /opt/lea/lea_release --images none
    

    Answer y to continue. The script saves the deployment directory and the database in /opt/lea/lea_backups/, copies the new files (your .env, settings and certificates are kept), runs the database changes and starts the stack. You should see "LEA Platform upgraded to" followed by the new version.

  6. The script also imports the rule pack and the agent pack that come with the release. They are only staged: review the rules in Rules → Updates and roll the agents out in Settings → Agent updates.

If the new version does not work, go back to the previous one. Everything written since the upgrade is lost:

/opt/lea/lea_release/lea_upgrade.sh rollback /opt/lea/lea_release

Warning: Keep the images of the previous version loaded until the new version runs well. The rollback needs them.

In a cluster, upgrade one node at a time, and keep the new tarball next to the new release directory so nodes that join later get the new version. See Install and upgrade.

Install agents from the LEA server

Hosts never need the internet. The LEA server serves the agent and its installers itself, from https://<your LEA server>/deploy/.

  1. Create a token in Settings → Deployment tokens → Create Token.

  2. Copy the install command it shows: one for Linux and macOS, one for Windows (PowerShell). On Linux and macOS it looks like this:

    curl -fsSL https://lea.corp.local/deploy/deploy.sh | sudo LEA_SERVER='lea.corp.local' LEA_ENROLL_TOKEN='<token>' bash
    

    With a self-signed or internal certificate, the console's command also contains LEA_SERVER_PIN, so the host can trust the server without the internet.

  3. Run it on the host. The host only talks to the LEA server.

Windows and macOS agent files are served from the same /deploy/ path. For mass rollout (Ansible, GPO, Intune), use Variables for bulk deployment (Ansible, GPO, Intune) from the same dialog. Full steps are in Add and manage hosts.

Agent updates work offline: agents download new versions from your LEA server, never from the internet. Each release carries a signed agent pack (agents/lea-agent-<version>.tgz and its .sig) that the upgrade script imports for you; packs from the LEA Portal are carried in the same way and imported in Settings → Agent updates with Choose pack (.tgz). Importing rolls nothing out. See Agent updates.

Install the command line from the LEA server

The lea command also comes from your LEA server. The commands for your server are under My account → Command line:

curl -fsSL https://lea.corp.local/deploy/install-lea-cli.sh | LEA_SERVER=https://lea.corp.local sh
lea login --server https://lea.corp.local

The installer checks the download against the SHA-256 checksums the server publishes. If your LEA server uses an internal certificate authority, add --ca-file /path/to/ca.pem to lea login (or set LEA_CA_FILE). lea update later installs the version your server ships. See the CLI reference.

Update rules with signed packs

Rule updates arrive as signed packs: lea-rules-<version>.tgz and its signature lea-rules-<version>.tgz.sig. Nothing in a pack goes live by itself.

  1. Carry both files into the air gap.

  2. Import them with one of these:

    • Console: Settings → Rule sources → Import a rule pack → Choose pack (.tgz) → Choose signature (.sig) → pick the Source (normally GSR) → Import.

    • Server, in the release directory:

      ./lea_packs.sh import lea-rules-<version>.tgz
      

      The .sig next to the pack is found automatically.

    • CLI: lea rules import lea-rules-<version>.tgz.

  3. Check the result under Imported packs: the pack should show VERIFIED. The signature is checked against the source's public key; with Require a valid signature on, an unsigned or tampered pack is refused.

  4. Review the changes in Rules → Updates and apply them to all hosts or to new hosts only.

To compare the signing key with the one GSR gave you, look at the fingerprint shown for the source in Settings → Rule sources, or run ./lea_packs.sh sources.

Leave the Feed URL (optional) of a source empty on an air-gapped site; it is only for sites that may reach a rule feed. Full steps are in Rule library and updates and the release notes on rule updates.

Build functions that work offline

Functions run in a sandbox on the LEA server. There is no pip and no package download at run time.

  • Bring everything in the bundle. Put any extra Python package or tool inside the function folder before you upload it. The LEA function SDK is standard-library Python and is already included in starters (lea functions init, or Starter in Settings → Functions).
  • Check what is available. Settings → Functions → Runtime (at the bottom) shows the Python version, the installed packages and the programs available, such as sh, bash, curl, wget, openssl and python3. The same list is printed by lea functions runtime.
  • Talk only to internal services. A function can reach systems inside your network (a ticketing system, an internal CA). It cannot reach the internet unless your network allows it.
  • Proxies and other environment variables. A function only receives the environment variables it lists under env in its function.json. HTTP_PROXY, HTTPS_PROXY, NO_PROXY and TZ are allowed. Any other name must be added by the operator to LEA_FUNCTION_ENV_ALLOW (comma separated) in the .env file on the LEA server, followed by docker compose up -d.

Example function.json for a function that calls an internal ticketing system through the site proxy:

{
  "name": "open_ticket",
  "description": "Opens a ticket in the internal service desk when a rule fails",
  "entrypoint": ["python3", "main.py"],
  "timeout": 30,
  "secrets": ["DESK_API_TOKEN"],
  "env": ["HTTPS_PROXY", "NO_PROXY"]
}

DESK_API_TOKEN is a secret you set in Settings → Functions. Upload from the console (Upload) or with lea functions push ./open_ticket and a token with Manage functions. Full details are in What functions are and the functions reference.

Run the AI assistant with a local model, or turn it off

The built-in assistant needs an AI model. On an air-gapped site:

  • Use a local model: run a model server with an OpenAI-compatible API (for example Ollama, vLLM or LM Studio) inside your network. In Settings → AI Assistant, pick OpenAI-compatible (local or private model), set Base URL (for example http://ai-gpu01.corp.local:11434/v1), click Get Models, pick a model that supports tool calling, and click Save AI Settings. Nothing leaves your network.
  • Or leave it off: keep AI Assistant enabled off. Everything else works.

Do not pick Anthropic (Claude) or OpenAI unless your site has an approved route to them. Full steps are in AI assistant.

Send notifications through internal services

  • Bell, pop-ups and desktop alerts work without any setup.
  • Email: in Settings → Email, Slack & Teams → Connect Email, pick SMTP server and the preset On-premises Exchange / internal relay. Type your relay's host name in SMTP server, choose Port, Encryption and Authentication (None (IP-allowed relay) if your relay accepts the LEA server by address). If the relay uses your own certificate authority, paste it into Trusted CA certificate (PEM, optional) under Advanced.
  • Webhooks: point them at systems inside your network.
  • Slack and Teams: these are internet services. Connect them only if your site allows LEA Platform to reach them through the HTTP proxy, and allows them to reach LEA Platform for buttons and commands.

Also set Public URL of LEA Platform under Options, so links in emails open your internal address. Full steps are in Notifications.

Sign in with an internal identity provider

Single sign-on works offline when the identity provider is inside your network, for example Keycloak / Red Hat build of Keycloak, AD FS (2016+) or Generic OpenID Connect.

In the provider dialog (Settings → Single sign-on) under Advanced:

  • Backend URL: set it when the LEA server reaches the provider at a different address than browsers do.
  • CA certificates (PEM): paste your internal CA if the provider's certificate comes from it.

Then Run test. Keep one local admin for break-glass, so that an outage of the identity provider does not lock you out. Full steps are in Users, roles and sign-in.

Get and install a license offline

The license is checked on the LEA server with its signature; no connection to the vendor is needed.

  1. Open Settings → License.
  2. Under License Request, click Generate Request, then Download. The request identifies this server, so generate it on the server that will run LEA Platform.
  3. Carry the file out and send it to your vendor.
  4. Carry the license you receive back in.
  5. Click Upload License, paste the license text into the box, and click Upload.

You should see Status change to Active and Days Remaining and Valid Until filled in.

Note: When a license expires, a banner "License Expired - Grace Period Active" asks you to email LEA Support. You do not need email from inside the air gap: follow the steps above with Generate Request and Upload License, and send the request from your connected machine.

Keep clocks in sync

Without internet, servers cannot reach public time servers. Point the LEA server, every host with an agent, and your identity provider at an internal time source. Certificates (agent enrollment, TLS) need the correct time, and single sign-on tokens are only accepted within a small time difference (60 seconds).

lea doctor checks the clock of the machine running the command line against the server.

Use the documentation offline

The documentation in the console (left menu → Documentation, and the Help panel on each page) is part of the console itself and works without internet. Links between guides stay inside the console.

Note: A few buttons point to the public website, for example Documentation on the AI Assistant page when the assistant is not configured. On an air-gapped site, use the left menu → Documentation instead.

If something goes wrong

SymptomFix
docker compose up tries to download images and failsThe images for this version are not loaded. Run docker load -i lea-images-<version>.tar and try again
gpg --verify does not say "Good signature"Do not install. Download the release and its .asc again
A rule pack import is refusedThe .sig is missing, belongs to another pack, or the source has another public key. Carry in the matching .sig
A host cannot install the agentThe host cannot reach the LEA server on port 443, or does not trust its certificate. Use the console's install command with LEA_SERVER_PIN
Get Models fails for a local modelThe LEA server cannot reach the Base URL. Test from the server, not from your desktop
A function fails with "module not found"The package is not in the bundle. Add it to the function folder and upload a new version
Email cannot be sentCheck the relay address, port and encryption; click Check on the connection; read the Delivery log
Sign-in or agents fail with certificate or token time errorsCheck the clocks on the server, the hosts and the identity provider

More in Troubleshooting.