The opsgate command
Manage the agent on your server. Every command runs with sudo.
For the app on computers, see the
opsgate-devicecommand in Your computer.
| Command | What it does |
|---|---|
sudo opsgate status |
Service state, connector URL, plan and usage, permissions |
sudo opsgate url |
Prints the connector URL |
sudo opsgate password |
Generates a new login password (shown once) and signs out every connected app |
sudo opsgate password --set |
Lets you type your own password (12+ characters) |
sudo opsgate token create NAME |
Creates a static token for Claude Code, Codex, scripts (shown once) |
sudo opsgate token list / revoke NAME |
Lists or revokes static tokens |
sudo opsgate license KEY |
Switches to another license key (checked with OpsGates Cloud first) |
sudo opsgate allow-write PATH… / deny-write PATH… |
Folders the AI may modify (with your confirmation) |
sudo opsgate allow-read PATH… / deny-read PATH… |
Extra folders it may read |
sudo opsgate allow-restart SVC… / deny-restart SVC… |
Services it may restart or reload |
sudo opsgate access [readonly network asterisk full] |
Choose what the AI may do: a menu, or name the profiles |
sudo opsgate permissions |
Shows everything that is allowed |
sudo opsgate db DATABASE |
Read-only access for db_query to a MySQL/MariaDB database |
sudo opsgate config get / set KEY=VALUE / unset KEY |
Advanced settings (list) |
sudo opsgate logs [-f] |
Service logs |
sudo opsgate audit [N] |
The last N tool calls (default 20) |
sudo opsgate doctor [--token T] |
End-to-end check; with a token it also tests the tools |
sudo opsgate 2fa on / off |
Adds an authenticator-app code to the server's sign-in page |
sudo opsgate restart |
Restarts the agent |
sudo opsgate update |
Installs the latest version, keeping your settings (rolls back by itself if it fails) |
sudo opsgate autoupdate on [HH:MM] / off / status |
Automatic updates at night, only signed versions |
sudo opsgate uninstall [--purge] |
Removes the agent |