OmniDB Config Tool
Note: the standalone omnidb-config/omnidb-config-app/
omnidb-config-server CLI utility described on this page belonged to the
previous Python/Django-based build and is not part of the current release. The
single omnidb-server binary accepts only a handful of command-line options:
-A/--app (desktop app mode), -H/--host (listening
address), -p/--port (listening port), -d/--homedir
(choose the home directory) and --set-password (set a user’s password, see below) —
all described in the Command options section of
Deploying omnidb-server. There is no configuration file.
The maintenance tasks the old tool offered can still be done manually, described below.
Home directory
OmniDB stores everything — the omnidb.db database (users, connections, and
other app data) and a temp folder for exported files — in a single home
directory. By default this is ~/.omnidb/omnidb-app (desktop mode) or
~/.omnidb/omnidb-server (server mode); pass -d /some/path to use a
different one (the directory must already exist). If the operating system offers no secret store
for the encryption key of saved passwords, the same directory also holds that key, in the file
.connection_secret_key — see Security and Multi-user Server.
When you back up or move omnidb.db, take that file along too.
Create a user
There is currently no CLI option to create a user without opening OmniDB.
On first run against an empty home directory, OmniDB creates a default
admin superuser automatically — in server mode with a random password printed
once to the server’s log output (the line containing initial login: admin / …). Sign in with it and create
further users under Settings > Account > Manage Users, or change the password under
Settings > Password.
Set or reset a password
If the one-time initial admin password was lost (or you want to set your own
before the first sign-in), set the password of any existing user directly in the app
database, without starting the server:
user@machine:~$ omnidb-server --set-password admin
user@machine:~$ omnidb-server --set-password admin -d /path/to/homedir
Without -d it uses the default server home directory
(~/.omnidb/omnidb-server). In a terminal it asks for the new password twice,
without echoing it; otherwise it reads the password from the first line of standard
input, which is handy in scripts:
user@machine:~$ printf '%s\n' "$PW" | omnidb-server --set-password admin
The password is never passed as a command-line argument, so it doesn’t end up in
ps output or the shell history. It must be at least 8 characters long, and the
user must already exist. The option is refused together with -A — the desktop app
signs in automatically and has no password to manage. It can also be run while the server
is running: the new password works immediately for new sign-ins, while users who are already
signed in stay signed in until their session expires or the server restarts.
Vacuum
OmniDB has a single SQLite database, omnidb.db, storing all users,
connections, and other OmniDB-related data. Since it’s a plain SQLite file, you
can vacuum it with any SQLite client while OmniDB isn’t running, e.g.:
user@machine:~$ sqlite3 ~/.omnidb/omnidb-app/omnidb.db 'VACUUM;'
Reset database
If you wish to wipe out all OmniDB information and get a clean database as it
was just installed, quit OmniDB and delete (or move aside) the home directory’s
omnidb.db file. A new, empty one — with a fresh default admin
user (in server mode with a newly generated one-time password printed to the log) — is created automatically the next time OmniDB starts. Use this with
caution: it cannot be undone.
Delete temporary files
Exported query results (CSV/XLSX/etc.) are written to the temp folder
inside the home directory. It’s safe to delete its contents manually at any
time while OmniDB isn’t running; OmniDB re-creates it as needed.