Command-line reference
The Erde server executable, Erde.Server.exe, accepts a small set of command-line sub-commands for licensing, administrator recovery, and support diagnostics. This page lists every flag and the key configuration settings that control the server, with where each value is set and whether it is a secret.
You run these commands from the install directory on the Erde host (for example C:\Program Files\Erde\api). For the licensing tasks behind the flags, see Activate and manage your license; for the wizard that writes the configuration, see Complete first-run setup.
CLI sub-commands
Each sub-command runs and exits without starting the web server. The license commands (--activate, --refresh-license, --deactivate-license) and --support-bundle are detected before any normal-boot logic, so they short-circuit both the first-run setup wizard and the running application — --support-bundle works even on an unconfigured or broken install, which is exactly when support needs it. --reset-admin needs the database connection from appsettings.Production.json, so it runs only once the server has been configured; run before first-run setup, it prints a clear "not configured yet" error and exits rather than launching the wizard.
| Flag | What it does | When to use it |
|---|---|---|
--activate | Sends your license key and this machine's identifiers to the license issuer, then writes the signed license.bin next to the executable. | At install time, or to license an existing server from the command line. |
--refresh-license | Re-issues the license with updated claims (Software Maintenance Agreement (SMA) expiry, edition) on the same machine. Reads the key from the existing license.bin. | After you renew your SMA or change edition. |
--deactivate-license | Releases this installation's activation slot at the issuer, then deletes the local license.bin. | When you decommission a server or move Erde to new hardware. |
--reset-admin | Resets the administrator's password (or creates the admin account if it is missing) and ensures the Admin role is assigned. The reset also clears any account lockout, resets the failed-sign-in counter, and revokes the account's refresh tokens, so a locked-out admin is signed in again immediately. | When the admin password is lost, the account is locked out, or the admin account was deleted. Requires physical server access. |
--support-bundle | Zips recent server logs, a secret-redacted copy of the configuration, and license/database/storage diagnostics into one file to send to support. See Collect a support bundle. | Whenever support asks for diagnostics — including when the server won't start or was never configured. |
Arguments
The license commands take their values as the next token after the flag. The table notes which arguments each command accepts.
| Command | Argument | Required | Notes |
|---|---|---|---|
--activate | --key | Yes | Your license key (for example XXXX-XXXX-XXXX-XXXX). The command exits with ERROR: --key is required. if omitted. |
--activate | --server | No | License-issuer URL. Defaults to https://license.erde.dev. |
--refresh-license | --server | No | License-issuer URL. Defaults to https://license.erde.dev. No key is passed — it is read from license.bin. |
--deactivate-license | --server | No | License-issuer URL. Defaults to https://license.erde.dev. |
--reset-admin | --password | Yes* | The new password, inline. Exposes it in process listings and audit logs — prefer --password-file. |
--reset-admin | --password-file | Yes* | Path to a file holding the new password. The tool reads, trims, then deletes the file. Takes precedence over --password. |
--support-bundle | --out | No | Where to write the zip. A directory gets a timestamped file name inside it; a file path is used as-is. Defaults to the current directory. |
--support-bundle | --days | No | How many days of logs to include, 1–90. Defaults to 7. Total log size is capped at 50 MB (newest files win). |
* --reset-admin requires exactly one of --password or --password-file. With neither, it prints usage and exits.
The --server value must be an absolute https URL (http is accepted only for a loopback address such as http://localhost); any other --server is rejected with an error before the issuer is contacted, so a mistyped or tampered URL can't send your license key in the clear.
Example invocations, run from the install directory:
& "C:\Program Files\Erde\api\Erde.Server.exe" --activate --key YOUR-KEY --server https://license.erde.dev
& "C:\Program Files\Erde\api\Erde.Server.exe" --refresh-license
& "C:\Program Files\Erde\api\Erde.Server.exe" --deactivate-license
& "C:\Program Files\Erde\api\Erde.Server.exe" --reset-admin --password-file C:\temp\pw.txt
& "C:\Program Files\Erde\api\Erde.Server.exe" --support-bundle --out C:\temp
On success each command returns exit code 0; on failure it prints an error and returns 1. --activate and --refresh-license print the customer, edition, and SMA expiry. --deactivate-license prints the customer and the slots remaining (RemainingSlots / MaxActivations), then confirms the installation is no longer licensed. --reset-admin prints a confirmation. --support-bundle prints the output path and a summary of what was collected; anything it could not collect is recorded as a warning inside the bundle rather than failing the command.
Only --refresh-license and --reset-admin print a reminder to restart Erde; --activate and --deactivate-license do not.
--reset-admin acts on the administrator email captured during first-run setup — it takes only a password, never an email, so there is no wrong email to type. In the normal case that is exactly the admin account you want back.
The one exception: if an Administrator later changed the admin account's email inside the app, that change is not reflected in the setup configuration. --reset-admin then no longer finds a match on the original email and instead creates a new administrator at that original email. You can sign in with it — it holds the Admin role — and then unlock or correct the original account from there.
The command prints the email it acted on, which tells you which case you are in — so you do not need to know the email beforehand:
Admin password reset successfully for: <email>— it recovered your existing account.Admin user created: <email>— it found no match and made a new account (the email-was-changed case above).
How a command is selected
The server checks the flags in a fixed order at startup. This is why the license commands work whether or not the server has been configured, while --reset-admin and the setup wizard do not.
Figure: command selection at startup. The license flags and --support-bundle are checked first and run in any install state; --reset-admin runs only after the server has been configured (it errors out if run earlier); the setup wizard runs only when no production configuration exists.
Configuration settings
The server reads its settings from JSON configuration. Shipped defaults live in appsettings.json next to the binary. In development, secrets come from .NET User Secrets, not from the appsettings files. In production, the first-run wizard writes the real values — including the generated secrets — to appsettings.Production.json, which the server layers over the defaults on every boot.
The table below lists the key settings. Keys use the Section:Property form. Secrets are marked Yes in the Secret column; every secret-bearing field is excluded from logs.
| Key | Purpose | Where set | Secret |
|---|---|---|---|
Database:Provider | Selects the database engine. Valid values are postgresql and sqlserver. | Dev: appsettings / User Secrets. Prod: wizard (appsettings.Production.json). | No |
ConnectionStrings:Platform | Connection string for the Platform database (identity, settings, tenancy). | Dev: User Secrets. Prod: wizard. | No |
ConnectionStrings:App | Connection string used to seed the default Application database record. | Dev: User Secrets. Prod: wizard. | No |
Jwt:Key | Signs authentication tokens. A generated 256-bit key. | Dev: User Secrets. Prod: wizard (generated). | Yes |
Jwt:Issuer | Token issuer. Default Erde. | appsettings / wizard. | No |
Jwt:Audience | Token audience. Default Erde. | appsettings / wizard. | No |
Jwt:ExpiryMinutes | Access-token lifetime in minutes. Default 15. | appsettings / wizard. | No |
Tokens:TokenHashSecret | HMAC secret that protects refresh tokens. A generated 256-bit key. | Dev: User Secrets. Prod: wizard (generated). | Yes |
Tokens:RefreshTokenExpiryDays | Refresh-token lifetime in days. Default 7. | appsettings / wizard. | No |
Tokens:RefreshTokenLengthBytes | Refresh-token length in bytes. Default 32. | appsettings / wizard. | No |
Encryption:AesKeyBase64 | AES-256 key that encrypts sensitive data stored in the database. A generated 256-bit key. | Dev: User Secrets. Prod: wizard (generated). | Yes |
Support:EmailAddress | Address that issue reports are sent to — the Erde vendor, not your IT. Shipped default support@erde.dev. | appsettings (override per install). | No |
Licensing:ServerUrl | License-issuer base URL. Shipped default https://license.erde.dev. | appsettings. | No |
FileStorage:BasePath | Root directory for uploaded files. The wizard writes C:\ProgramData\Erde\storage\. | Prod: wizard. | No |
FileStorage:MaxFileSizeBytes | Maximum upload size in bytes. Default 104857600 (100 MB). | appsettings. | No |
FileStorage:DeletedFileRetentionDays | Days a soft-deleted file keeps its bytes on disk before purge. Default 30. | appsettings (optional). | No |
FileStorage:AllowedExtensions | Allowed file extensions. Configuration can extend the default set but never shrink it; at runtime the seeded database value is authoritative. | appsettings. | No |
The default FileStorage:AllowedExtensions set is .xlsx, .xls, .docx, .doc, .csv, .txt, .pdf, .jpg, .jpeg, .png, .gif, and .bmp (case-insensitive).
appsettings.Production.json holds Encryption:AesKeyBase64, the key that decrypts sensitive database values. If you lose it, that data becomes unreadable. Back it up alongside the database.