Install on one server
This page covers the all-in-one install: Gardience and its own Salt master on one Linux server. To use a Salt master you already run, see Attach to an existing Salt master. For a server with no internet access, see Install without internet access.
The quickest way: one command
When you start a trial at gardience.com/trial (or after you buy), the page shows a command like this:
curl -fsSL https://gardience.com/i/YOUR-CODE | sudo bashRun it on the server. It downloads the current release, checks it against the release checksum, adds your license, installs Docker if it is missing, and runs the installer described below with its default options. It prints the console address and the first admin password when it finishes. The command works for 24 hours; open your trial or order page again for a fresh one. To pass installer options, add them after bash -s --:
curl -fsSL https://gardience.com/i/YOUR-CODE | sudo bash -s -- --hostname gardience.example.com --fleet-size 1000The release is unpacked in /opt/gardience/releases/X.Y.Z (or under --dir). To check the release signature yourself, or for a server without internet access, use the steps below instead.
If something goes wrong
- Checks come first. Before it changes anything, the installer checks the ports, memory, free disk and any earlier install, and stops with what to do if one is not right. Nothing is installed on a server that fails a check, Docker included.
- Run it again. If an install stops part-way (a dropped connection while it downloads, a reboot), run the same command again: it carries on where it stopped, with the same settings. Downloads are retried three times on their own.
- Host firewall. With firewalld or ufw on, add
--open-firewallto open the console and agent ports (the one-command install does this for you). Otherwise the installer finishes and prints the exact commands. Note that Docker publishes its ports beneath ufw, so ufw rules alone do not keep the console off the network. - Behind a proxy. If
HTTPS_PROXY(orhttps_proxy) is set, the installer gives Docker the same proxy for image downloads, builds and Gardience's own outbound calls.sudodrops proxy settings that live only in your shell: set them in/etc/environment, or run the one-command install withsudo -E bash. - A proxy that inspects HTTPS (Zscaler, Palo Alto, Blue Coat and the like re-sign every download with your company's own certificate authority). If your IT team already added that authority to the server's trust store (
/usr/local/share/ca-certificateson Ubuntu and Debian,/etc/pki/ca-trust/source/anchorson the RHEL family), the installer finds it and Gardience's images and outbound calls trust it too. Otherwise pass the authority's certificate with--ca-cert /path/to/company-ca.pem. A new authority later: run the install again. - A Salt master already on this server. The installer stops and points you to attach mode, which gives your existing master and its agents Gardience's console.
- Install reports. The one-command install tells gardience.com whether it finished, or the step it stopped at, with your operating system and how long it took: no names, addresses or anything about your machines (they are removed from the step text before it is sent). Add
--no-reportafterbash -s --, or setGARDIENCE_NO_REPORT=1, to turn that off.
Before you start
- A server that meets the requirements. Docker can be missing: the installer offers to install it (Ubuntu, Debian, RHEL, Rocky, AlmaLinux, Oracle Linux, CentOS Stream, Amazon Linux 2023). If Docker is already there (for example Ubuntu's
docker.io), the installer adds only what it lacks: the Compose plugin. It is one file checked against its published checksum. Nothing is built on the server. - The release bundle
gardience-X.Y.Z.tar.gzwith its.sha256and.sha256.sigfiles. - Your license file (free at gardience.com/free for up to 10 machines, or a 90-day trial at gardience.com/trial). The install downloads Gardience's images with it, so the server needs to reach gardience.com and gardience-releases.s3.us-east-1.amazonaws.com over HTTPS (directly or through a proxy). No internet at all? Use the offline bundle.
Install
To install:
Copy the bundle and its
.sha256file to the server, then check the download:sha256sum -c gardience-X.Y.Z.tar.gz.sha256Extract the bundle in a folder where it can stay. The install keeps its release files in this folder and refers to it until your first upgrade, so do not delete it. Do not extract it inside
/optitself, because the bundle unpacks to a folder namedgardienceand the default install folder is/opt/gardience.sudo mkdir -p /opt/gardience-release sudo tar xzf gardience-X.Y.Z.tar.gz -C /opt/gardience-release cd /opt/gardience-release/gardienceOptional, but recommended: create a passphrase file for encrypting the automatic pre-upgrade backups. Those backups hold every key. Keep the file readable by root only.
sudo sh -c 'umask 077; openssl rand -base64 32 > /root/.gardience-backup-pass'Run the installer. Set the name agents and browsers will use, your fleet size and your license:
sudo ./install/install.sh \ --hostname gardience.example.com \ --fleet-size 1000 \ --license /path/to/gardience-license.json \ --backup-passphrase-file /root/.gardience-backup-passThe first run downloads Gardience's prebuilt images with your license (about 300 MB) and checks each one against the SHA-256 in the signed release. The installer then starts the services and waits up to 3 minutes for the console to answer.
Save the output. It shows:
- the console address, for example
https://gardience.example.com/ - the
adminpassword. It is shown only once. - the address and ports agents should use
- the management commands
- the console address, for example
Check the install:
sudo /opt/gardience/gardience status sudo /opt/gardience/gardience doctorstatuslists the containers and the health result.doctorchecks services, the Salt connection, disk space, the TLS certificate, the license, the audit log and backups, and exits with code 1 if any check fails.
The installer refuses to run when:
- Gardience is already installed in the target folder (it finds a
.envfile there). Manage that install with itsgardiencecommand instead. - Data from an earlier install with the same
--namestill exists (a Docker volume namedNAME_gardiencedata). This stops an old audit log, vault or node keys from being mixed with a new install. The error message shows how to restore that data or remove it.
Installer options
Run ./install/install.sh --help to print the option list. Every option takes a value except --insecure-salt-api and --upgrade.
Location and web access
| Option | Default | What it does |
|---|---|---|
--dir PATH | /opt/gardience as root, ~/gardience otherwise | Install folder. It holds the settings (.env), compose.yml, config/, Salt content in srv/, and the gardience management command. |
--https-port N | 443 | Host port for the console over HTTPS. |
--http-port N | 80 | Host port that redirects to HTTPS. |
--hostname NAME | this host's FQDN (hostname -f) | Name in the TLS certificate and in the console address the installer prints. Also the default agent address. |
--tls-cert FILE and --tls-key FILE | none: a self-signed certificate is created | Use your own certificate and private key. Give both. Or replace the certificate any time later by dropping the files in Administration > Certificate (The console's certificate). |
--name NAME | gardience-server | Docker Compose project name. Container and volume names start with it. |
The self-signed certificate is valid for 825 days and covers --hostname, localhost, 127.0.0.1 and the server's own addresses.
Servers on a VPN. The server's address is the one on the network card that reaches the internet, except when the internet goes through a VPN (Tailscale, WireGuard, OpenVPN, a company VPN): then the VPN address would only work inside the VPN, so the installer uses the server's own network address instead and says so. The sign-in details list every address the console answers on. If the VPN also uses Docker's address range (172.17 and up), the server cannot reach its own console while the VPN is on; run the install with the VPN off, or give Docker another range in /etc/docker/daemon.json ("default-address-pools") before installing.
Salt and agents
| Option | Default | What it does |
|---|---|---|
--salt-bind IP | 0.0.0.0 (all addresses) | Host address the Salt ports listen on. |
--salt-ports A,B | 4505,4506 | Host ports for Salt's publish port (A) and return port (B). The enrollment playbook sets these ports on agents when they are not the defaults. |
--master-address A | the --hostname value when it is a full name (has a dot), otherwise the server's IP address | Address agents use to reach the Salt master. It goes into the agent install commands and the enrollment playbook. Change it later with sudo /opt/gardience/gardience address A. |
--fleet-size N | 500 | How many machines you expect to manage. Tunes the Salt master and, above 1,000, the agents. See Requirements. |
License and backups
| Option | Default | What it does |
|---|---|---|
--license FILE | none | License file to install. Without one, the console is read-only. |
--install-docker | ask | If Docker or its Compose plugin is missing, install them from Docker's official repository without asking. Not available with the offline bundle (install Docker from your own mirror first). |
--backup-passphrase-file F | none | Encrypts the automatic pre-upgrade backups with this passphrase file. Recommended, because those backups hold every key. Keep the file off the backup's disk if you can. |
Primary and standby pairs
Use these only when you run two servers, a primary and a warm standby. See Upgrade for how upgrades treat a pair.
| Option | Default | What it does |
|---|---|---|
--standby-address A | none | Address of the warm standby. Agents are set up with both addresses and Salt's failover mode, so they move to the standby on their own after it is promoted. |
--peer-url URL | none | Console URL of the other server in the pair. A returning old primary checks it and fences itself (runs no Salt master) if the standby was promoted. gardience promote refuses to run without it unless you pass --force. |
--peer-agent-address A | none | On the standby: the primary's agent address, so agents enrolled on the standby after a promotion still list both servers. |
Attach mode
These apply only when you attach to your own Salt master. See Attach to an existing Salt master.
| Option | Default | What it does |
|---|---|---|
--attach URL | not set (all-in-one) | Switches to attach mode. The URL of your salt-api. |
--eauth TYPE | file | The Salt external authentication type Gardience's service accounts sign in with, for example pam, file or ldap. |
--insecure-salt-api | off | Accept a self-signed salt-api certificate. |
--attach-master-ip IP | none | The only address allowed to reach Gardience's internal endpoint. |
--admins A,B | none | Users from your master's eauth who administer Gardience. |
--approvers A,B | none | Users who may approve runs. Admins approve too. |
Used by upgrades only
| Option | What it does |
|---|---|
--upgrade | Used by gardience upgrade. Regenerates an existing install's compose file, web front end, Salt content and settings for the new release, keeping its secrets, users, certificate, license and data. Do not run it yourself. |
First sign-in
To sign in for the first time:
- Open the console address the installer printed, for example
https://gardience.example.com/. With the self-signed certificate your browser shows a warning until you replace the certificate with your own. - Sign in as
adminwith the password from the installer output. If the page asks for a login type, choosefile, which is used for the accounts thegardiencecommand creates. Replace the admin password. This creates a new random password and shows it once:
sudo /opt/gardience/gardience user passwd adminCreate an account for each person instead of sharing
admin. Roles areadmin,operator,approver,viewerandhelpdesk-windows. Each new password is shown once.sudo /opt/gardience/gardience user add alice operator
Sessions last 8 hours for local accounts (session_hours in config/users.yaml, 1 to 24) and 1 hour for directory and single sign-on accounts (directory_session_hours), and are shared by every open tab in the browser (closing every console tab ends the shared session after a minute). Removing a user, changing their role or resetting their password ends their open sessions at once, so the change applies at their next sign-in. Sign-ins are rate limited per client address. See Users and roles for what each role can do.
To use your own TLS certificate later, copy the certificate to config/tls/gardience.crt and the key to config/tls/gardience.key in the install folder, then run sudo /opt/gardience/gardience restart.
Licensing
A license is a small signed file. Gardience checks the signature on the server itself, with no internet connection, so it works on air-gapped networks. A license sets how many nodes you may manage and when it expires.
To install or replace a license, or to see its status:
sudo /opt/gardience/gardience license /path/to/gardience-license.json
sudo /opt/gardience/gardience licenseWhat happens when the license does not cover the fleet:
| Situation | What happens |
|---|---|
| No license, or the file is not valid | The console is read-only: viewing, scanning and reports work, changes are refused. |
| License expired | Everything keeps working for 30 days. After that the console is read-only. |
| More nodes than the license covers | Everything keeps working for 30 days from the first day over. After that the console is read-only until nodes are removed or the license is upgraded. |
Once a license has expired, or the fleet has stayed over its limit past the 30 days, security work still runs: installing updates, rebooting to finish them, re-applying the security baseline and checking that machines are back. Salt itself is never affected by the license.
Next steps
Add machines to the fleet. The installer output already shows the address agents use.