The gadka admin tool
Run gadka admin as root on the server to create accounts, install license keys or back up a SQLite database.
The /usr/local/bin/gadka executable serves as both the server and its administration tool. Run the commands on the server as root.
Command syntax
sudo gadka --config /etc/gadka/gadka.yaml admin <polecenie>Replace <polecenie> with the command you want to run. You can use the GADKA_CONFIG environment variable in place of the --config flag.
If you see sudo: gadka: command not found, use the full path, as in sudo /usr/local/bin/gadka ….
Administration commands
| Command | Flags | What it does |
|---|---|---|
admin tenant-create | --slug and --name (both required) | Creates a workspace |
admin user-create | --tenant, --email, and --name (required), plus --role (owner, admin, or the default, member) | Creates a local account and reads the password from standard input |
admin license server-id | None | Prints the Server ID |
admin license request | None | Prints the installation code needed to purchase a key |
admin license install | --file (required) | Validates and installs the license key |
admin backup | --out (required) | Makes a consistent copy of a live SQLite database |
Other commands
| Command | Flags | What it does |
|---|---|---|
serve | --roles (defaults to api,gateway,worker) | Starts the server. The systemd service uses this command. |
migrate up | None | Updates the database schema to the current version |
migrate status | None | Shows migration status |
healthcheck | --url (defaults to http://127.0.0.1:9090/readyz) | Exits with code 0 when the server is ready |
--version | None | Prints the program version |
In the Free and Standard editions, the server runs as one process with all roles. Running serve with only some of the roles is a deployment across multiple nodes and requires Enterprise.
Examples
Create a workspace and its owner:
sudo gadka --config /etc/gadka/gadka.yaml admin tenant-create --slug firma --name "Firma Sp. z o.o."
sudo gadka --config /etc/gadka/gadka.yaml admin user-create --tenant firma --email jan@example.com --name "Jan Kowalski" --role ownerRead the password from a file. Delete the file immediately after use.
sudo gadka --config /etc/gadka/gadka.yaml admin user-create --tenant firma --email ola@example.com --name "Ola Nowak" < haslo.txtPrint the installation code and install a license key:
sudo gadka --config /etc/gadka/gadka.yaml admin license request
sudo gadka --config /etc/gadka/gadka.yaml admin license install --file gadka-license.txtBack up the database:
sudo gadka --config /etc/gadka/gadka.yaml admin backup --out /var/lib/gadka/gadka-kopia.dbPasswords, roles and account limits
The tool has no commands for resetting passwords or 2FA, deleting accounts, or changing roles. To change roles, use the app. See Users and roles.
Account creation commands enforce the same license limits as the app.