Skip to content

Agent command reference

This page lists the commands the Outpost agent accepts on the endpoint, the options of the Windows installers, and the environment variables the agent reads. Most endpoints never need any of them: the installer and the console do the work. Use this page for scripted deployment, golden images, and troubleshooting.

PlatformAgent binary
WindowsC:\Program Files\Outpost\Agent\outpost-agent.exe
Linux, FreeBSD, OpenBSD/opt/outpost/outpost-agent
macOS (Preview)/usr/local/outpost/outpost-agent

Run every command except version as an administrator (Windows) or root. On Windows, run, install, uninstall, and reset ask for elevation if you start them without it.

CommandWhat it does
enrollEnrolls this computer with a token, writes its configuration and certificate, and exits. It does not install or start the service.
runRuns the agent in the foreground. The service runs the same command, so run in a terminal reproduces what the service does.
installRegisters the agent as a service that starts at boot and restarts on failure, then starts it. With --token and --server, it enrolls first.
uninstallStops and removes the service. On Linux, FreeBSD, OpenBSD, and macOS it also retires the endpoint. See uninstall.
import-config <path>Applies the connection settings in an agent.json from a downloaded installer. See import-config.
resetRemoves this computer’s enrollment identity, to prepare a golden image. See reset.
updateChecks for a newer agent and tray now and installs it. See update.
versionPrints outpost-agent and the version.
Terminal window
outpost-agent enroll --server <your-server-url> --token <enrollment-token>
FlagValue
--tokenRequired. An enrollment token from Issue token only in the console.
--serverRequired unless OUTPOST_SERVER_URL is set. The server URL the console shows with the token, starting with https://.

On success it prints enrolled: followed by the endpoint’s identifiers.

FlagValue
--serverOverrides the server URL in the configuration for this run.

Only one copy of the agent runs at a time. A second copy exits with code 3.

FlagValue
--tokenOptional. Enroll with this token before installing.
--serverOptional. The server URL for enrollment.
  • On Windows, install registers the OutpostAgent service only and refuses if it already exists. Use the installers for a complete Windows install.
  • On Linux, FreeBSD, OpenBSD, and macOS, running install over an installed agent refreshes the service definition and exits with code 5. The tarball’s install.sh treats that as an upgrade and restarts the service.
FlagValue
--keep-dataLinux, FreeBSD, OpenBSD, and macOS. Keeps the configuration and enrollment identity, so a reinstall comes back as the same endpoint.

On Linux, FreeBSD, OpenBSD, and macOS, uninstall stops and removes the service, tells your Outpost that the endpoint is retired, and deletes /etc/outpost, including the certificate and private key. It does not delete the agent binary.

On Windows, outpost-agent uninstall removes the OutpostAgent service only. To remove Outpost from a Windows computer, see Retire or uninstall the agent.

On Linux, uninstall refuses on an agent installed from a .deb or .rpm package and names the package command to use instead.

Terminal window
outpost-agent import-config agent.json
  • The file must be valid JSON with a server_url.
  • If the computer is enrolled to the client the file names, nothing changes.
  • If it is enrolled to a different client, the old certificate and key are removed and the new settings replace the old ones.
  • After applying the file, the agent deletes it, because it holds a single-use enrollment token.
FlagValue
--forceApplies the reset. Without it, reset reports what it would change and changes nothing.
--tokenPlants an enrollment token, so every computer deployed from the image enrolls itself on first boot.

reset removes the certificate, private key, and pinned server certificate, and clears the endpoint’s identity from the configuration. It keeps the server URL and the reporting intervals. See Prepare a golden image.

Terminal window
outpost-agent update [--check] [--json]
FlagValue
--checkReports whether a newer build is available and installs nothing.
--jsonPrints the result as JSON.

update asks the running service to run the same check it runs every 4 hours, and waits up to 90 seconds for the service to come back on the new version. If the service does not answer, the command updates the agent itself and restarts the service. It must run as an elevated administrator (Windows) or root.

Exit codeMeaning
0Up to date, or updated.
1The check, the install, or the restart failed.
2Bad flags.
10With --check: a newer agent or tray is available.
11Not run as an elevated administrator or root.
12Nothing done: the last update is still being checked, or another update is running.

outpost-agent-setup.exe installs the agent, the watchdog, and the tray app, and applies the configuration built into it.

OptionWhat it does
--dangerously-silent-installationSkips the consent panel. For deployment tools only.
--skip-configInstalls without applying the built-in configuration. The computer does not enroll until you give it a token.
--dir <path>Installs to another folder. The default is C:\Program Files\Outpost\Agent.
--uninstallRemoves Outpost from the computer and retires the endpoint.
--keep-dataWith --uninstall, keeps the configuration and enrollment identity.
--versionPrints the version and exits.
Exit codeMeaning
0Installed or uninstalled.
1The person at the computer declined at the consent panel.
2Bad command-line arguments.
3The installer’s payload is missing or unreadable.
4The built-in configuration is missing or unusable. Download a new installer, or use --skip-config.
5The install failed. Details are in %TEMP%\outpost-setup.log.
6Not run with administrator rights.
PropertyWhat it does
SKIPCONFIG=1Installs without the agent.json that must otherwise sit beside the MSI. The computer does not enroll until you give it a token.

The agent takes its settings from its configuration file. These are the exceptions:

VariableEffect
OUTPOST_SERVER_URLThe server URL for enroll and run. A --server flag takes precedence, and this takes precedence over the configuration file.
OUTPOST_LOG_LEVELdebug, info (the default), warn, or error.
OUTPOST_DATA_DIRMoves the agent’s data directory, which holds its configuration, certificate, and logs.
HTTPS_PROXYAn HTTP proxy for the agent’s outbound connections. Takes precedence over the proxy in the configuration.

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.