Appliance Commands
The ironflock appliance commands install the IronFlock appliance on a Linux server you run yourself, and look after it from then on. You use them to install the appliance, to change its settings, to update it, to start, stop and restart it, to read its logs, to reset the admin password, to back up, restore and rotate its secrets, and to remove it again.
The appliance is the complete IronFlock system on one machine on site. What it is, its HTTPS modes, its network and its operation are described under IronFlock Appliance. The requirements of the machine (CPU, memory, storage, time synchronization) are on its Installation page.
Note: These commands are new in release 2.1.0 of
ironflock. They passed one test run, fromappliance installtoappliance remove --purge, on a fresh Ubuntu 24.04 virtual machine (amd64). Not proven yet is an update that fails, with its rollback to the release before.
The Appliance
| Command | What it does |
|---|---|
appliance install | installs the appliance on this machine and starts it, or brings an installed appliance to a release |
appliance configure | changes the settings: license, TLS mode, proxy, host names, tunnel, second-factor policy |
appliance update | updates the appliance to a release, and returns to the release before when the update fails |
appliance start | starts the appliance |
appliance stop | stops the appliance until it is started again |
appliance restart | restarts the appliance |
appliance logs | shows the logs of the appliance’s services |
appliance reset-admin-password | gives the UI user admin a new password |
appliance backup | writes the appliance’s secrets to a tar.gz archive |
appliance restore | puts a backup of the secrets back |
appliance rotate | gives one secret of the appliance a new value |
appliance revoke-direct-access | removes the direct-access keys made with a previous FILE_CRED_KEY |
appliance remove | removes the appliance from this machine |
The appliance commands run on Linux. appliance install needs a Debian or Ubuntu based system with systemd. On macOS and Windows the commands end with exit code 3 before they look at anything; run them on the appliance’s machine, or from the Mac or the Windows PC with --host.
Run them as root, with sudo. A command that changes the system ends with exit code 3 without root, and does not call sudo itself (Root Privileges).
Each command also takes the global flags --yes, --json, --download-base, --host, --hosts and --parallel (Global Flags). A question needs a terminal; without one, give --yes (Questions and Confirmation).
On several machines at once (--host more than once, or --hosts), appliance restart, start, update and logs run as they are, but appliance logs --follow not with --json. appliance stop and remove need --yes there, as nobody is asked. The other commands run on one machine at a time (Which Commands Run on Several Machines).
ironflock status shows the installed appliance: its version and channel, the address of its UI, whether its license is present, its service, the health of its services and an update that waits (ironflock status).
What an Installed Appliance Looks Like
| Path or unit | What it is |
|---|---|
/opt/ironflock | the install directory (--install-dir names another one). It is root’s |
/opt/ironflock/.env | the configuration and every secret of the appliance |
/opt/ironflock/license.env | the license key |
/opt/ironflock/install.json | the record of the install’s choices, root’s alone (below) |
/opt/ironflock/.update-previous | the copy of the release before, which an update keeps while it runs (below) |
/opt/ironflock/triggers/apply-update.status, apply-update.log | the progress and the output of the last update, which the UI reads |
ironflock.service | the systemd service that runs the appliance’s containers with Docker Compose. It starts at every boot |
/usr/local/bin/ironflock | the ironflock that the appliance’s units run at every start, at boot too |
/etc/ironflock/appliance.json | the record of the changes the install made on the host, which appliance remove undoes |
Besides ironflock.service, the install sets up a watchdog, which checks the router and the backend every five minutes and restarts ironflock.service when they are not well, at most once in five minutes, and a timer that tries a failed update of the UI again every hour.
Keep /usr/local/bin/ironflock in place: the appliance’s units run it at every start. appliance install refuses to run from another place and says how to install it there. ironflock status, run as root, warns when that binary is missing or older than the one that last installed or updated the appliance. sudo ironflock self-update replaces it with the newest release (ironflock self-update), and appliance update does so by itself when a release needs a newer ironflock (A Newer ironflock).
The appliance also runs the host’s own device agent, which appliance install installs unless you give --no-agent. That agent is looked after with the agent commands.
One Change at a Time
One install, update or other change of the appliance runs at a time. A second one waits for the first and says so:
Another IronFlock install, update or other change of the appliance is running on this host (process <pid>); waiting up to <time> for it to finishinstall, update, configure, rotate, revoke-direct-access, reset-admin-password and restore wait up to an hour. start, stop, restart and remove wait up to 30 seconds. When the other run still goes on then, the command changes nothing and ends with exit code 3.
ironflock appliance install
Installs the IronFlock appliance in /opt/ironflock and starts it. It waits until every service is healthy and the IronFlock cloud reaches the appliance, then shows the admin login of the web UI, once, on a terminal.
ironflock appliance install --license-file <file> [flags]Runs on: a Debian or Ubuntu based Linux with systemd. Root: required.
The install sets up:
- the release of the channel, or the one
--versionnames, checked against the appliance’s release key; - the appliance’s configuration and secrets;
- the host’s own device agent, and Docker when it is missing;
- the host’s settings;
- Docker’s login to the registry with the license key;
- the images of the release;
ironflock.service.
When Docker is missing, the install runs Docker’s install script from get.docker.com as root. That download is protected by TLS only.
| Flag | Meaning |
|---|---|
--license-file <file> | a file holding the license key, or LICENSE_KEY=<key>; - reads standard input |
--license <key> | the license key itself. It shows in ps: prefer --license-file |
--version <x.y.z> | the appliance version to install. Default: the channel’s newest |
--channel <channel> | the release channel: production, test or all. Default: the installed appliance’s, else production |
--tls | serve the web UI over HTTPS with a certificate of the appliance’s own CA. The devices still connect unencrypted. Stays on for later runs |
--tls-cert <file> | your organisation’s certificate file for the appliance’s domain, with --tls-key. The devices then use the domain |
--tls-key <file> | the key file of --tls-cert, without a passphrase |
--no-tls | serve the web UI over plain HTTP: nothing is encrypted, for a trusted network only. The default; stays off for later runs |
--tunnel | turn the tunnel to the devices’ web UIs on. The default; stays on |
--no-tunnel | turn that tunnel off. Stays off |
--extra-host <name> | another name of the web UI; more than once, or comma-separated |
--2fa <policy> | the second-factor policy: available, effective or required. Default: effective |
--interactive | ask for the appliance’s address and domain, and let the agent’s install ask its questions |
--no-agent | do not install the host’s own device agent. Docker must be installed then |
--http-proxy <url> | the HTTP proxy of Docker, the agent and the appliance, such as http://proxy:3128, or http://user@proxy:3128 without the password. "" removes it |
--https-proxy <url> | the HTTPS proxy of Docker, the agent and the appliance; "" removes it |
--no-proxy <hosts> | comma-separated hosts that bypass the proxy |
--proxy-password-file <file> | a file or a pipe (/dev/stdin) whose one line is the password of the user in the proxy URLs |
--no-start | write and enable everything, start nothing. No health check and no cloud check |
--skip-cloud-gate | do not wait for the IronFlock cloud to reach the appliance |
--skip-login | no registry login: the images come with Docker’s own credentials or are loaded by hand. The license key is optional then |
--registry <host> | the registry of the appliance’s images. Default: instance-registry.ironflock.com |
--registry-user <user> | the user of the registry login. Default: ironflock-appliance |
--bucket-url <url> | where the appliance’s releases are published. Default: https://instance-registry.ironflock.com/dl/appliance |
--install-dir <directory> | the install directory. Default: /opt/ironflock |
The HTTPS modes and what each one encrypts are described in HTTPS & Certificates and Security. The proxy password follows the rules in Secrets: a proxy URL with a password in it is a wrong command line. A login with an empty password is given as http://user:@proxy.example.com:3128 and needs no --proxy-password-file.
The License Key
The license key is the Instance Key you create on ironflock.com under Profile → Instances (Installation). It comes from --license-file or --license. An appliance that is installed already keeps its key without either. A key in license.env that is not a valid license key (a license key is a UUID) is ignored, with a warning, by every appliance command; the run then needs a key, or --skip-login.
Environment Variables
Some flags take their default from an environment variable:
| Variable | Sets |
|---|---|
IRONFLOCK_VERSION, IRONFLOCK_CHANNEL | --version, --channel |
IRONFLOCK_INSTALL_DIR | --install-dir |
IRONFLOCK_REGISTRY, IRONFLOCK_REGISTRY_USER | --registry, --registry-user |
IRONFLOCK_BUCKET_URL | --bucket-url |
IRONFLOCK_2FA | --2fa |
IRONFLOCK_EXTRA_HOSTS | --extra-host |
IRONFLOCK_SKIP_CLOUD_GATE | --skip-cloud-gate |
IRONFLOCK_APPLIANCE_HOST, IRONFLOCK_APPLIANCE_DOMAIN | the appliance’s address and its domain, which --interactive asks for |
IRONFLOCK_CLOUD_TUNNEL_TCP | any value other than 0, false, off or no lets the tunnel’s cloud connection use TCP port 7000 when there is no proxy |
sudo drops most variables of your shell. Pass them with sudo env NAME=value ironflock appliance install ....
The Record of the Install’s Choices
<install-dir>/install.json, root’s alone, keeps the choices that neither .env nor the units keep: the registry and its user, the appliance’s host (IRONFLOCK_APPLIANCE_HOST), --no-agent, the download base of --bucket-url, and the version of the ironflock that last installed or updated the appliance. It holds no password, token or key.
A later appliance install, an appliance update and appliance configure keep these choices unless a flag (or its variable) says otherwise. A flag given wins and is recorded. To go back to a default, give --registry "", --no-agent=false or an empty IRONFLOCK_APPLIANCE_HOST.
A record that cannot be read, or one of a later format, stops install, update and configure before they change anything, with exit code 3. The message says what to do: move the record aside and install again with the flags, or use the newer ironflock.
Running It Again
Run on an installed appliance, the command brings it to the release and the options given, and keeps its secrets and settings. Use this to change the release on purpose: ironflock appliance install --version <version> pulls, restarts and checks that release again, also when it runs already.
A run that stopped continues from where it stopped when the same command runs again.
Once its health checks have passed, the install removes the copy of a release before that an update kept (/opt/ironflock/.update-previous): the release it installed is the one to run.
On a machine that the appliance’s installer script set up, the install takes the appliance over, as appliance update does, but keeps no copy of the release before and cannot go back to it when it fails. appliance update can.
From its first change on, a lost terminal or SSH session (SIGHUP), or output that nobody reads any more (a closed pipe), does not stop the install. Ctrl-C and SIGTERM do. The install keeps writing to the terminal after a lost SSH session, so that the admin password is not lost. With sudo’s use_pty setting, a terminal that stays open but is no longer read can therefore hold the install up while it holds the install lock.
Examples
# Install the appliance; the license key comes from a file
sudo ironflock appliance install --license-file license.txt
# Install with HTTPS from the appliance's own CA; the key comes from standard input
sudo ironflock appliance install --license-file - --tls < license.txt
# Install behind a proxy; hosts under .corp.example.com bypass it
sudo ironflock appliance install --https-proxy http://proxy.example.com:3128 --no-proxy .corp.example.com
# Ask for the appliance's address and domain, and install with HTTPS
sudo ironflock appliance install --license-file license.txt --interactive --tlsRefuses and Fails
- A download base of
--bucket-urlthat the units cannot name as it is (a login in it,%, white space,$,\, a quote, a control character, bytes that are not UTF-8) is refused before anything is written, with exit code 2. - The command refuses with exit code 3 when it does not run as root, when the record of the install’s choices cannot be read, and when another run holds the install lock past the wait of an hour. It also refuses when the
ironflockthat runs is not/usr/local/bin/ironflock, and says how to install it there. - A step that fails ends the command with exit code 1. Run the same command again to continue.
ironflock appliance configure
Changes the settings of an installed appliance: its license, the TLS mode (also with a certificate of your own), the proxy, more host names for the UI, the tunnel and the second-factor policy.
ironflock appliance configure [flags]Runs on: Linux, with an installed appliance. Root: required.
The settings stay in the appliance’s .env and files, so an update keeps them. A setting not given keeps what the appliance has. Only a run that changed something restarts the appliance, so the same command twice changes nothing the second time.
| Flag | Meaning |
|---|---|
--license <key> | a new license key of the appliance |
--license-file <file> | read the new license key from this file; - reads standard input |
--skip-login | do not log in to the registry with the new license key |
--registry <host> | the registry to log in to. Default: the one the appliance’s mirror syncs from |
--registry-user <user> | the user of the registry login. Default: ironflock-appliance |
--tls | serve the UI over HTTPS, with a certificate of the appliance’s own CA |
--tls-cert <file> | your TLS certificate file, with --tls-key |
--tls-key <file> | the key file of --tls-cert |
--no-tls | serve the UI over plain HTTP: nothing is encrypted, for a trusted network only |
--http-proxy <url> | the HTTP proxy URL; empty clears the proxy |
--https-proxy <url> | the HTTPS proxy URL; empty clears the proxy |
--no-proxy <list> | what goes past the proxy: a comma-separated list |
--proxy-password-file <file> | a file or a pipe (/dev/stdin) whose one line is the password of the user in the proxy URLs |
--extra-host <name> | another name of the UI; repeat it, or give a comma-separated list |
--tunnel | turn the tunnel of the apps’ web UIs on |
--no-tunnel | turn the tunnel off |
--2fa <policy> | the second-factor policy: available, effective or required |
--bucket-url <url> | where the appliance’s releases are published, for the Caddyfile that TLS needs. Default: https://instance-registry.ironflock.com/dl/appliance |
--install-dir <directory> | the install directory. Default: /opt/ironflock |
- A new license (
--license,--license-file, or--license-file -for standard input) must open the registry before it is written. Its registry login goes to--registryas--registry-user, else to those the install chose (the record), else to the registry the appliance’s mirror syncs from. A login with--registryor--registry-userkeeps them in the record for the updates. --tls-certand--tls-keyinstall your certificate and turn TLS on, and the devices move to the appliance’s domain.--http-proxy ""or--https-proxy "", given alone, clears the proxy.- A proxy with a login: the proxy URL names the user without the password (
http://[email protected]:3128), and--proxy-password-filegives the password. It goes into the URLs given that name a user. A proxy URL with a password in it is a wrong command line (exit code 2). --proxy-password-file, given alone, puts a new password into the proxy URLs the appliance already has, where they name a user: the way to change the password. On an appliance without a proxy URL that names a user, the command ends with exit code 3 and changes nothing.--no-agentof the install stays as it was.- The Caddyfile that TLS needs comes from
--bucket-url, else from where the install took the releases.
Examples
# Give the appliance a new license key from a file
sudo ironflock appliance configure --license-file license.txt
# Serve the UI with your organisation's certificate
sudo ironflock appliance configure --tls-cert wildcard.crt --tls-key wildcard.key
# Set a proxy, and clear it again
sudo ironflock appliance configure --https-proxy http://proxy.example.com:3128 --no-proxy .corp.example.com
sudo ironflock appliance configure --https-proxy ""
# Set a proxy with a login; the password comes from a file
sudo ironflock appliance configure --https-proxy http://[email protected]:3128 --proxy-password-file proxy-password.txt
# Change only the proxy password
sudo ironflock appliance configure --proxy-password-file proxy-password.txt
# Require a second factor from every user
sudo ironflock appliance configure --2fa requiredBefore you set --2fa required, make sure every account has a second factor: a user without one can no longer sign in (Accounts and Access).
Refuses When
The command refuses with exit code 3, and changes nothing, when it does not run as root, when the record of the install’s choices cannot be read, when another run holds the install lock past the wait of an hour, and while an update was cut short (When an Update Was Cut Short).
ironflock appliance update
Updates the appliance on this machine to the newest release of its channel, or to the release --version names. The release is checked against the appliance’s release key, its images are pulled, and the appliance restarts with it. The command waits until every service is healthy and the IronFlock cloud reaches the appliance. The appliance keeps its secrets and settings. The images of earlier releases are removed once the new one is healthy.
ironflock appliance update [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: nothing, except with --discard-previous.
| Flag | Meaning |
|---|---|
--version <x.y.z> | the release to install, or latest for the channel’s newest (the default). Also an older release, to go back on purpose |
--channel <channel> | switch the channel: production, test or all. Default: the installed one |
--bucket-url <url> | where the appliance’s releases are published |
--discard-previous | update nothing: remove the copy of the release before that an update kept, and change nothing else (below) |
The releases come from --bucket-url, else from IRONFLOCK_BUCKET_URL, else from where the install took them (the record of its choices, /opt/ironflock/install.json, or its units name it), else from IronFlock. The registry, its user, the appliance’s host and --no-agent stay as the install chose them.
A new channel stays when the update succeeds; the channel before comes back with a rollback. The UI’s Apply update runs the same update.
Once its checks have passed, an install or an update also moves the appliance’s own device off the secret that every appliance shared before, to the value of APPLIANCE_DEVICE_SECRET. Its agent then restarts 35 seconds after the run. A move that cannot be made is a warning that says why; the next install or update tries again.
Already Up to Date
An appliance that runs the newest release of its channel already (or the release --version names), on the same channel and download base, is left as it is. The command says so and ends with exit code 0; with --json the result is nothing-to-do. To pull, restart and check that release again on purpose, run ironflock appliance install --version <version>.
That holds only for an appliance that the last update left clean. With a kept copy of a release before (an update that was cut short), a status file that says failed or running, or the units or a helper program of the installer script, the update runs everything again.
Rollback
Before the update changes anything, it keeps the files of the release that runs in /opt/ironflock/.update-previous. When the update fails after it changed the appliance, those files are put back and the release before starts again. This needs no network, as its images are on the machine. It is tried up to three times. Then the command gives up and leaves the files of the release before in place, so that the next start of the appliance is that release.
An update that fails before it changed anything changes nothing more and says so: for example, a release that is not there or not signed, or a download base that does not answer.
A Newer ironflock
A release whose manifest needs a newer ironflock than the one that runs is installed by an ironflock of at least that version. The update finds the need before it changes anything. Then, still holding the install lock, it updates /usr/local/bin/ironflock, the file the appliance’s units run, and says so:
Appliance v1.7.0 needs ironflock 2.1.0 or newer, and this is ironflock 2.0.3: ironflock updates itself first
The appliance's units run /usr/local/bin/ironflock, ironflock 2.0.3.
The newest release at https://instance-registry.ironflock.com/dl is ironflock 2.1.0 (its version.txt is signed by key F6C94D96CE315377ACA7C8EA4990543373212788).
Downloading ironflock 2.1.0 for linux/amd64 from https://instance-registry.ironflock.com/dl.
Signature verified (key F6C94D96CE315377ACA7C8EA4990543373212788): the program ironflock for linux/amd64.
The new file says it is ironflock 2.1.0 linux/amd64; it is in place.
ironflock at /usr/local/bin/ironflock is updated from 2.0.3 to 2.1.0.
The update goes on with ironflock 2.1.0: /usr/local/bin/ironflock starts again with the same command line.- As
self-updatedoes it. The newest release of the download tree replaces the file, with the checks and the proxy ofironflock self-update, and without a question. Its download base is the one ofself-update(--download-base,IRONFLOCK_DL_BASE, else IronFlock’s), not the appliance’s--bucket-url. When that file is new enough already, nothing is downloaded. - Then the same command again. The new file takes the place of the running process, with the same command line, and runs the update from the start. The terminal,
--json,--hostand the UI’s update see one run. After two such starts, a release that still needs a newerironflockis refused, so that nothing loops. - A failure changes nothing. The appliance stays on its version, and the old binary stays in place. When the newest
ironflockis older than the release needs, or the file cannot be replaced, the command ends with exit code 3 and names the version to install first. A download or a check that fails, or a new file that does not start, is an update that failed before it changed anything (exit code 1, kindunchanged).
The UI’s update works the same way. An ironflock of release 2.2.0 or older does not update itself here, and its self-update cannot install 2.3.0 or later: run the install line once (From 2.2.0 and Older).
An Appliance of the Installer Script
On a machine that the appliance’s installer script set up, appliance update takes the appliance over from the script. It says so in one line, keeps the data, the secrets and the settings as every run does, and writes the units of ironflock in place of the script’s, which have the same names.
- What it records. The changes of the host that the script made, so that
appliance removeundoes them: the journal drop-in20-ironflock-appliance.conf, and"userland-proxy": falseand the appliance’s own registry ininsecure-registriesof Docker’sdaemon.json. The masked sleep targets and folders the script may have made are not recorded. - The script’s own runs. With its first change, the command stops the triggers of the script’s units (the watchdog, the update retry, the TLS renewal and the path of the UI’s update), and a run of the script’s update that the UI started and that waits for the lock. When an update of the script runs at the time the command takes the lock, the command changes nothing and ends with exit code 3: run it again when that update has ended.
- The helper programs. Once the appliance is healthy and the IronFlock cloud reaches it (with
--no-start, once the units are written), the command removes the script’s helper programs from/usr/local/bin(ironflock-update,ironflock-apply-update,ironflock-healthcheck,ironflock-watchdogand the others the script’s release wrote) and names them. A helper that a unit or a cron table still runs stays, with a warning that names it;ironflock-init, the agent’s, stays. - The download base. Without
--bucket-url,IRONFLOCK_BUCKET_URL, the record of the install’s choices or a base the units name, it is the one the script wrote into its helpers. A base thatironflockcannot keep there (two different ones, or one with a login) stops the command before it changes anything, with exit code 3, and the error says to give one with--bucket-url. - When it fails. Until the helpers are removed, the script’s units and helpers work as before. An update that fails returns to the script’s release with the script’s units and starts their timers again. A takeover that was cut short is ended by the next update, the UI’s too.
appliance installover such a machine takes it over too, but keeps no copy of the release before and cannot go back to it;appliance updatecan. An install that fails starts the script’s triggers again, except its update retry timer, which stays stopped until the next boot; a warning says so.
Status File and Retry
The update writes its progress into triggers/apply-update.status, as the UI’s update does, so the UI shows it. Its output goes into triggers/apply-update.log too. The timer that tries a failed update of the UI again does not try again an update of this command that failed, or that was stopped before it changed anything.
Interrupts
- Ctrl-C or SIGTERM before the update changed anything stops it. After that, the first one brings the release before back (exit code 130), and a second one stops at once.
- A lost terminal or SSH session (SIGHUP), or output that nobody reads any more, does not stop the update. The update, and a rollback, run to their end. The status file and
ironflock statussay how it ended. - Over
--hostwithout a terminal, the first two Ctrl-Cs reach the machine. After the first, the command waits up to 30 minutes for the update there to end; after the second, 15 seconds; a third ends it here at once. A lost session here, or SIGTERM, is no Ctrl-C: the command ends here at once. Whenever it ends here first, the update goes on on the machine, andironflock --host <machine> statusshows how it ended.
When an Update Was Cut Short
An update was cut short when it began to change the appliance and then did not end: it was stopped, the machine went down, or its rollback did not bring the release before up. The install directory may then hold files of two releases. The kept copy names the release that is known to run, and ironflock status names it as well.
- The next update puts that copy back first, then updates. A copy that cannot be read or put back stops the update with exit code 3, and the error names
ironflock appliance install --version <version>. - The hourly retry timer puts the copy back on its own, restarts that release and checks it, also when no newer release exists.
configure,rotate,revoke-direct-access,restoreandreset-admin-passwordrefuse before any change, with exit code 3. They name the three ways out:ironflock appliance update;ironflock appliance install --version <version>; and, without the network,ironflock appliance update --discard-previous.backuponly reads, and warns.start,stopandrestartleave the copy alone.removetakes the copy with the rest of the appliance’s files.appliance installruns as always and, once its health checks have passed, removes the copy.
To work on the files of an update that was cut short by hand, first set IRONFLOCK_UPDATE_RETRY=off in .env. Otherwise the retry timer puts the release before back within about an hour. That setting turns the retry timer off as a whole, its rollback included.
--discard-previous
ironflock appliance update --discard-previous [--yes]Updates nothing. It removes the copy of the release before that an update kept (/opt/ironflock/.update-previous), in any state and also when it cannot be read, and changes nothing else. It needs no network.
It is the way out without the network when an update was cut short and its release before does not start again. The files of the install directory stay as they are now, that release can no longer be put back, and the commands that refused run again.
It says what it removes and asks first, with “No” preselected; --yes answers yes. Without a terminal, or with --json, it needs --yes, else it ends with exit code 4. Without a copy it says so and ends with exit code 0. It does not go with --version, --channel or --bucket-url (exit code 2). With --json the result has action (discarded, cleaned or none), path, version, state and removed.
Examples
# Update to the newest release of the channel
sudo ironflock appliance update
# Install release 1.6.41, also to go back to it
sudo ironflock appliance update --version 1.6.41
# Switch to the test channel and read the result as JSON
sudo ironflock appliance update --channel test --json
# Remove the copy of the release before, without the network
sudo ironflock appliance update --discard-previousResult
{"from":"1.6.40","target":"1.6.41","version":"1.6.41","result":"updated"}| Field | Meaning |
|---|---|
from | the release before the update |
target | the release the update went for |
version | the release installed now |
result | updated; up-to-date when the appliance had that release already and the update pulled, restarted and checked it again; nothing-to-do when the appliance was left as it is |
A failed update is an error that says whether the appliance returned to the release before. With --json its kind is one of these, also when it was interrupted:
| Kind | Means |
|---|---|
rolled_back | the update failed, and the release before runs again |
rollback_failed | the update failed, and the rollback did not bring the release before up |
not_rolled_back | the update failed and was not rolled back |
unchanged | the update failed before it changed anything; for example, the download base does not answer |
copy_left | the new release runs, but its copy of the release before could neither be removed nor marked. The retry timer may put the release before back within about an hour; the error names the ways out (IRONFLOCK_UPDATE_RETRY=off first, then --discard-previous) |
| Exit code | Means |
|---|---|
| 0 | updated, up to date, or nothing to do |
| 1 | the update failed, rolled back or not; also copy_left |
| 2 | a wrong command line, such as a download base that the units cannot name |
| 3 | not root; no appliance installed; another run held the install lock past the wait; a kept copy that cannot be read or put back; a record of the install’s choices that cannot be read; a newer ironflock needed that it cannot install itself; an update of the installer script that runs; a download base of the installer script that ironflock cannot keep |
| 130 | interrupted, with the same kinds |
ironflock appliance start
Starts the appliance when it does not run: ironflock.service starts its containers (docker compose up), and its watchdog and its other paths and timers start again. The services take a minute or two to come up; ironflock status shows their health.
ironflock appliance start [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: nothing. The command has no flags of its own.
When a restore left database roles on their old passwords, because the appliance did not run then, they take the passwords of the restored .env once their databases run (up to a minute). A role that does not answer stays for the next start, with a warning, and the start goes on.
sudo ironflock appliance start
sudo ironflock appliance start --jsonWhile another run changes the appliance, the command waits up to 30 seconds and says so; when that run goes on, it changes nothing and ends with exit code 3.
ironflock appliance stop
Stops the appliance: its watchdog and its other paths and timers and what they started, then ironflock.service, which stops and removes its containers (docker compose down). Its data stays.
ironflock appliance stop [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: yes, after it has said what stopping ends; --yes answers.
The UI goes offline, and so does every device that connects to the appliance, the agent of this machine too. ironflock appliance start starts the appliance again, and so does the next boot. The command has no flags of its own.
# Stop the appliance; the command says what that ends and asks
sudo ironflock appliance stop
# Stop it without a question
sudo ironflock appliance stop --yesThe answer no, or a question without a terminal and without --yes, ends the command with exit code 4. While another run changes the appliance, the command waits as start does.
ironflock appliance restart
Restarts the appliance: ironflock.service stops its containers and starts them again (docker compose down, then up), as its watchdog does. The paths and timers that appliance stop stopped start again.
ironflock appliance restart [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: nothing. The command has no flags of its own.
The UI and the devices that connect to the appliance are offline for a minute or two; its data stays. ironflock status shows the health of the services once they are up. Database roles that a restore left on their old passwords take those of .env, as with start.
sudo ironflock appliance restart
sudo ironflock appliance restart --jsonWhile another run changes the appliance, the command waits as start does.
ironflock appliance logs
Shows what the appliance’s services wrote, as docker compose logs shows it: by default the last 100 lines of each service. Changes nothing.
ironflock appliance logs [<service>...] [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: nothing.
Name services to see theirs only, such as router, backend, kratos or caddy.
| Flag | Meaning |
|---|---|
--lines <n> | the last n lines of each service, or all. Default: 100; with --since, all |
--since <time> | only the lines from a time on: a duration back from now (10m, 2h, 3d), or a time on this machine’s clock (2026-11-10 09:00, 09:00, 2026-11-10T09:00:00Z) |
--follow | go on with the lines the services write, until Ctrl-C |
With --json every line is a JSON object, with the line as its message.
# The last 100 lines of each service
sudo ironflock appliance logs
# Everything the backend wrote in the last hour
sudo ironflock appliance logs backend --since 1h
# The last 20 lines of the router and of Kratos, then every new line until Ctrl-C
sudo ironflock appliance logs router kratos --follow --lines 20ironflock appliance reset-admin-password
Gives the UI user admin a new password, for an operator who lost it. The password is set in the database first, which ends every active session of the admin, then in .env as APPLIANCE_ADMIN_PASSWORD. The appliance must run.
ironflock appliance reset-admin-password [flags]Runs on: Linux, with a running appliance. Root: required.
| Flag | Meaning |
|---|---|
--install-dir <directory> | the install directory. Default: /opt/ironflock |
The new password is shown once, and only to a terminal. Without a terminal, and with --json, the command says where it is stored instead. It refuses with exit code 3 while an update was cut short (When an Update Was Cut Short).
sudo ironflock appliance reset-admin-passwordironflock appliance backup
Writes everything of the appliance that cannot be made again to a tar.gz archive: .env with every secret, license.env, the local CA of the TLS certificate, the registry’s token key pair, the register of secrets and rotation.log.
ironflock appliance backup [-o <file>] [flags]Runs on: Linux. Root: required.
| Flag | Meaning |
|---|---|
-o, --output <file> | write the archive to this file, made new and readable by root only |
--install-dir <directory> | the install directory. Default: /opt/ironflock |
Without -o, the archive goes to standard output, which must not be a terminal. A file it is redirected into is made readable by its owner only.
Warning: The archive holds every secret of the appliance. A lost
FLEETDB_SECRET_KEYSorFILE_CRED_KEYcannot be recovered any other way. Encrypt the archive and keep it with the backups of the volumes.
Not in the archive: the TLS certificate and its key (a generated one is signed again from the CA), the Kratos configuration, the release’s files, and the Docker volumes. Of certs/ca and registry-token-certs it takes the files an install makes there (rootCA.crt, rootCA.key, rootCA.srl; token_private.key, token_public.crt, token_public.der, also with .prev or .new). Any other file there is left out, with a warning that names it, as restore takes no other.
# Write the archive to a file only root can read
sudo ironflock appliance backup -o /root/appliance-secrets.tar.gz
# Write it to standard output, into a file
sudo ironflock appliance backup > appliance-secrets.tar.gzironflock appliance restore
Puts a backup that appliance backup wrote back into the install directory.
ironflock appliance restore <file> [flags]Runs on: Linux. Root: required.
| Flag | Meaning |
|---|---|
--force | replace the secrets of an installed appliance |
--install-dir <directory> | the install directory. Default: /opt/ironflock |
The command takes the files a backup holds and nothing else, each with the owner and mode an install gives it. In certs/ca and registry-token-certs it takes only the files an install makes there. An archive that holds anything more is refused before anything changes, and the error names what.
The secrets of an installed appliance are replaced only with --force; its .env is kept as .env.prev. Without --force, the restore over an installed appliance is refused before any change, with exit code 3, and the message names the restore with --force and then appliance restart.
A license key in the backup that is not a valid license key is restored as it is, with a warning: every appliance command ignores it.
Database Passwords
- While the appliance’s database runs, its roles take the restored passwords at once. Restart the appliance then (
appliance restart), so that every service reads the restored files. - While the appliance does not run, its database roles keep the passwords from before. The restore marks them (
<install-dir>/.db-roles-pending;roles_pendingwith--json). The next start sets them to the restored.env:appliance startorrestart, the start at boot, an install or an update.
# Restore onto an installed appliance, then restart it
sudo ironflock appliance restore appliance-secrets.tar.gz --force
sudo ironflock appliance restartIt refuses with exit code 3 while an update was cut short (When an Update Was Cut Short).
ironflock appliance rotate
Gives one secret of the appliance a new value. The new value goes where the old one is held (a database role, the agent’s device file, the registry’s token key pair) and into .env. Then only the services that read it are recreated, and the command checks that they are healthy.
ironflock appliance rotate <name> [flags]Runs on: Linux, with a running appliance. Root: required. Asks: for a secret that something else holds as well; --yes answers.
| Flag | Meaning |
|---|---|
--keep-direct-access | with FILE_CRED_KEY: the direct-access keys made before keep working |
--revoke-direct-access | with FILE_CRED_KEY: the direct-access keys made before stop working and are removed |
--install-dir <directory> | the install directory. Default: /opt/ironflock |
The .env before the change stays as .env.prev, readable by root only. rotation.log lists each rotation, never a value.
- A secret that something else holds as well (data, a device, a token) asks before its rotation;
--yesanswers. FILE_CRED_KEYneeds a choice for the customers’ direct-access keys.--keep-direct-access: they keep working, for a scheduled rotation; end it later withrevoke-direct-access.--revoke-direct-access: they stop working and are removed, after a suspected leak.APPLIANCE_ADMIN_PASSWORDis the same asreset-admin-password.
The secrets it rotates:
POSTGRES_PASSWORD, PGPASSWORD_KRATOS, PGPASSWORD_ACCT_MANAGER,
PGPASSWORD_ACCT_PUSHER, PGPASSWORD_EXT_ACCT_USER, PGPASSWORD_AUDIT_SANDBOX,
DATASERVICE_PASSWORD, WAMP_SYSTEM_SECRET, WAMP_SECRET_SVC_VDM,
WAMP_SECRET_SVC_IDE, WAMP_SECRET_SVC_IDE_PROXY, WAMP_SECRET_SVC_GIT,
WAMP_SECRET_SVC_REGISTRY, WAMP_SECRET_SVC_REGISTRY_PROXY,
WAMP_SECRET_SVC_ACCT, WAMP_SECRET_SVC_ACCT_PUSH, WAMP_SECRET_SVC_PAYMENT,
WAMP_SECRET_SVC_FLEETDB, WAMP_SECRET_SVC_FLEETFILES, WAMP_SECRET_SVC_AI,
WAMP_SECRET_SVC_TUNNEL, WAMP_SECRET_SVC_RENDERER, WAMP_SECRET_SVC_WEBSERVER,
WAMP_SECRET_SVC_REAPI, WAMP_SECRET_SVC_AUTH, RENDER_TICKET_KEY,
FILES_FORWARD_SECRET, KRATOS_WEBHOOK_SECRET, KRATOS_SECRETS_PAGINATION,
REGISTRY_HTTP_SECRET, TUNNEL_DASHBOARD_PASSWORD, EDGE_SESSION_SECRET,
OBJECTSTORE_ADMIN_ACCESS_KEY, OBJECTSTORE_ADMIN_SECRET_KEY, FILE_CRED_KEY,
FLEETDB_SECRET_KEYS, KRATOS_SECRETS_COOKIE, KRATOS_SECRETS_CIPHER,
APPLIANCE_DEVICE_SECRET, APPLIANCE_ADMIN_PASSWORD, REGISTRY_TOKEN_KEYWhat a rotation does to each kind of secret, and which secrets to rotate only together with the IronFlock team, is described in Rotating an Internal Secret.
# Rotate the secret of one service
sudo ironflock appliance rotate WAMP_SECRET_SVC_AI
# Rotate the file key on schedule; the direct-access keys keep working
sudo ironflock appliance rotate FILE_CRED_KEY --keep-direct-access --yesIt refuses with exit code 3 while an update was cut short (When an Update Was Cut Short).
ironflock appliance revoke-direct-access
Ends a rotation of FILE_CRED_KEY made with --keep-direct-access. Every direct-access key of the customers that was not made with the current FILE_CRED_KEY stops working and is removed; the key itself stays. The fleetfiles service is recreated and reports what it removed.
ironflock appliance revoke-direct-access [flags]Runs on: Linux, with an installed appliance. Root: required. Asks: yes, as the owners of those keys have to create new ones; --yes answers.
| Flag | Meaning |
|---|---|
--install-dir <directory> | the install directory. Default: /opt/ironflock |
sudo ironflock appliance revoke-direct-accessIt refuses with exit code 3 while an update was cut short (When an Update Was Cut Short).
ironflock appliance remove
Removes the IronFlock appliance from this machine and undoes what its install recorded on the host. Its data stays unless you give --purge.
ironflock appliance remove [flags]Runs on: Linux. Root: required. Asks: yes, after it has listed what goes and what stays. The question preselects “No”: Enter alone removes nothing.
| Flag | Meaning |
|---|---|
--purge | remove what stays without it too: the install directory, the volumes and the images |
--force | go on past a call that fails, and drop the record of host changes whose undo keeps failing |
--install-dir <directory> | the install directory. Default: the one its unit names, else /opt/ironflock |
It removes:
- the appliance’s systemd units, its containers and its network in Docker;
- Docker’s login to the IronFlock registry;
- every change its install recorded on the host (
/etc/ironflock/appliance.json): the proxy settings it wrote, its settings in Docker’sdaemon.json, the journal’s settings, and the masked sleep targets; - the helper programs of the installer script, on a machine the script set up;
- the copy of the release before that an update kept for its rollback (
.update-previousin the install directory).
The anonymous volumes of the appliance’s containers go as well, with or without --purge: never a named volume, and never one a container still uses.
What Stays
Without --purge, the appliance’s data stays, so that a later install picks it up:
- the install directory (
/opt/ironflock) with.env, which holds the secrets,license.env, the record of the install’s choices (install.json), and the mark of database passwords a restore could not set (.db-roles-pending); - the volumes in Docker.
--purge removes these too, and the images: what the appliance held is gone for good.
On a machine the installer script set up, the script’s proxy drop-ins (http-proxy.conf of Docker and of the agent) are named and stay; --purge removes them as well, and Docker and the agent lose that proxy at their next restart.
These stay also with --purge:
- Docker itself, and the host’s device agent.
ironflock agent removeremoves the agent. - A file the appliance wrote that was changed since, such as the proxy settings that
ironflock agent configureset, with the drop-ins that name them, so that the agent keeps its proxy. - What the agent’s record (
/opt/ironflock/device-init/installed.json) names as the agent’s, and the sleep targets the agent masked.ironflock agent removetakes them.
When a Call Fails
When a call of the undo keeps failing (for example, a restart of a Docker that was removed by hand), the record stays. The command says which call failed and ends with an error. Run it again once that works, or with --force, which drops the record all the same and goes on past a unit that cannot be disabled or a Docker that does not answer.
While an install, an update or another change of the appliance runs, the command waits up to 30 seconds and says so. When that run goes on, it changes nothing and ends with exit code 3.
Examples
# Remove the appliance and keep its data; the command lists what goes and asks
sudo ironflock appliance remove
# Remove the appliance with all its data, without a question
sudo ironflock appliance remove --purge --yesThe answer no, or a question without a terminal and without --yes, ends the command with exit code 4.
Before you remove an appliance for good, move or release its license while it is still online (Decommissioning).