Documentation contents

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

CommandFlagsWhat 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-idNonePrints the Server ID
admin license requestNonePrints 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

CommandFlagsWhat it does
serve--roles (defaults to api,gateway,worker)Starts the server. The systemd service uses this command.
migrate upNoneUpdates the database schema to the current version
migrate statusNoneShows migration status
healthcheck--url (defaults to http://127.0.0.1:9090/readyz)Exits with code 0 when the server is ready
--versionNonePrints 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 owner

Read 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.txt

Print 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.txt

Back up the database:

sudo gadka --config /etc/gadka/gadka.yaml admin backup --out /var/lib/gadka/gadka-kopia.db

Passwords, 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.

Server setup and backups