Command reference
immudb#
Simply run ./immudb -d to start immudb locally in the background.
If you want to stop immudb în that case you need to find the process ps -ax | grep immudb and then kill -15 <pid>. Windows PowerShell would be Get-Process immudb* | Stop-Process.
1immudb - the lightweight, high-speed immutable database for systems and applications.
2
3Environment variables:
4 IMMUDB_DIR=.
5 IMMUDB_NETWORK=tcp
6 IMMUDB_ADDRESS=0.0.0.0
7 IMMUDB_PORT=3322
8 IMMUDB_DBNAME=immudb
9 IMMUDB_PIDFILE=
10 IMMUDB_LOGFILE=
11 IMMUDB_MTLS=false
12 IMMUDB_AUTH=true
13 IMMUDB_DETACHED=false
14 IMMUDB_CONSISTENCY_CHECK=true
15 IMMUDB_PKEY=./tools/mtls/3_application/private/localhost.key.pem
16 IMMUDB_CERTIFICATE=./tools/mtls/3_application/certs/localhost.cert.pem
17 IMMUDB_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
18 IMMUDB_DEVMODE=true
19 IMMUDB_MAINTENANCE=false
20 IMMUDB_ADMIN_PASSWORD=immudb
21
22Usage:
23 immudb [flags]
24 immudb [command]
25
26Available Commands:
27 help Help about any command
28 version Show the immudb version
29
30Flags:
31 -a, --address string bind address (default "0.0.0.0")
32 --admin-password string admin password (default is 'immu') as plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded) (default "immudb")
33 -s, --auth enable auth
34 --certificate string server certificate file path (default "./tools/mtls/3_application/certs/localhost.cert.pem")
35 --clientcas string clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
36 --config string config file (default path are configs or $HOME. Default filename is immudb.ini)
37 --consistency-check enable consistency check monitor routine. To disable: --consistency-check=false (default true)
38 -d, --detached run immudb in background
39 --devmode enable dev mode: accept remote connections without auth
40 --dir string data folder (default "./data")
41 -h, --help help for immudb
42 --logfile string log path with filename. E.g. /tmp/immudb/immudb.log
43 --maintenance override the authentication flag
44 -m, --mtls enable mutual tls
45 --no-histograms disable collection of histogram metrics like query durations
46 --pidfile string pid path with filename. E.g. /var/run/immudb.pid
47 --pkey string server private key path (default "./tools/mtls/3_application/private/localhost.key.pem")
48 -p, --port int port number (default 3322)
49
50Use "immudb [command] --help" for more information about a command.immugw#
immugw can be found in a different repository
Simply run ./immugw -d to start immugw on the same machine as immudb (test or dev environment) or point to the remote immudb system ./immugw --immudbaddress "immudb-server".
If you want to stop immugw în that case you need to find the process ps -ax | grep immugw and then kill -15 <pid>. Windows PowerShell would be Get-Process immugw* | Stop-Process.
1immu gateway: a smart REST proxy for immudb - the lightweight, high-speed immutable database for systems and applications.
2It exposes all gRPC methods with a REST interface while wrapping all SAFE endpoints with a verification service.
3
4Environment variables:
5 IMMUGW_ADDRESS=0.0.0.0
6 IMMUGW_PORT=3323
7 IMMUGW_IMMUDB_ADDRESS=127.0.0.1
8 IMMUGW_IMMUDB_PORT=3322
9 IMMUGW_DIR=.
10 IMMUGW_PIDFILE=
11 IMMUGW_LOGFILE=
12 IMMUGW_DETACHED=false
13 IMMUGW_MTLS=false
14 IMMUGW_SERVERNAME=localhost
15 IMMUGW_PKEY=./tools/mtls/4_client/private/localhost.key.pem
16 IMMUGW_CERTIFICATE=./tools/mtls/4_client/certs/localhost.cert.pem
17 IMMUGW_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
18
19Usage:
20 immugw [flags]
21 immugw [command]
22
23Available Commands:
24 help Help about any command
25 version Show the immugw version
26
27Flags:
28 -a, --address string immugw host address (default "0.0.0.0")
29 --audit enable audit mode (continuously fetches latest root from server, checks consistency against a local root and saves the latest root locally)
30 --audit-interval duration interval at which audit should run (default 5m0s)
31 --audit-password string immudb password used to login during audit; can be plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded)
32 --audit-username string immudb username used to login during audit (default "immugwauditor")
33 --certificate string server certificate file path (default "./tools/mtls/4_client/certs/localhost.cert.pem")
34 --clientcas string clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
35 --config string config file (default path are configs or $HOME. Default filename is immugw.toml)
36 -d, --detached run immudb in background
37 --dir string program files folder (default ".")
38 -h, --help help for immugw
39 -k, --immudb-address string immudb host address (default "127.0.0.1")
40 -j, --immudb-port int immudb port number (default 3322)
41 --logfile string log path with filename. E.g. /tmp/immugw/immugw.log
42 -m, --mtls enable mutual tls
43 --pidfile string pid path with filename. E.g. /var/run/immugw.pid
44 --pkey string server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
45 -p, --port int immugw port number (default 3323)
46 --servername string used to verify the hostname on the returned certificates (default "localhost")
47
48Use "immugw [command] --help" for more information about a command.immuadmin#
For security reasons we recommend using immuadmin only on the same system as immudb. User management is restricted to localhost usage. Simply run ./immuadmin on the same machine.
1CLI admin client for immudb - the lightweight, high-speed immutable database for systems and applications.
2
3Environment variables:
4 IMMUADMIN_IMMUDB_ADDRESS=127.0.0.1
5 IMMUADMIN_IMMUDB_PORT=3322
6 IMMUADMIN_MTLS=true
7 IMMUADMIN_SERVERNAME=localhost
8 IMMUADMIN_PKEY=./tools/mtls/4_client/private/localhost.key.pem
9 IMMUADMIN_CERTIFICATE=./tools/mtls/4_client/certs/localhost.cert.pem
10 IMMUADMIN_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
11
12Usage:
13 immuadmin [command]
14
15Available Commands:
16 backup Make a copy of the database files and folders
17 database Issue all database commands
18 dump Dump database content to a file
19 help Help about any command
20 login Login using the specified username and password (admin username is immudb)
21 logout
22 print Print merkle tree
23 restore Restore the database from a snapshot archive or folder
24 service Manage immu services
25 set Update server config items: auth (none|password|cryptosig), mtls (true|false)
26 stats Show statistics as text or visually with the '-v' option. Run 'immuadmin stats -h' for details.
27 status Show heartbeat status
28 user Issue all user commands
29 version Show the immuadmin version
30
31Flags:
32 --certificate string server certificate file path (default "./tools/mtls/4_client/certs/localhost.cert.pem")
33 --clientcas string clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
34 --config string config file (default path is configs or $HOME; default filename is immuadmin.toml)
35 -h, --help help for immuadmin
36 -a, --immudb-address string immudb host address (default "127.0.0.1")
37 -p, --immudb-port int immudb port number (default 3322)
38 -m, --mtls enable mutual tls
39 --pkey string server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
40 --servername string used to verify the hostname on the returned certificates (default "localhost")
41 --tokenfile string authentication token file (default path is $HOME or binary location; the supplied value will be automatically suffixed with _admin; default filename is token-0.7.0_admin) (default "token-0.7.0")
42
43Use "immuadmin [command] --help" for more information about a command.immuclient#
Simply run ./immuclient on the same machine or connect to a remote immudb ./immuclient -a <immudb-host>
1CLI client for immudb - the lightweight, high-speed immutable database for systems and applications.
2Environment variables:
3 IMMUCLIENT_IMMUDB_ADDRESS=127.0.0.1
4 IMMUCLIENT_IMMUDB_PORT=3322
5 IMMUCLIENT_AUTH=true
6 IMMUCLIENT_MTLS=false
7 IMMUCLIENT_SERVERNAME=localhost
8 IMMUCLIENT_PKEY=./tools/mtls/4_client/private/localhost.key.pem
9 IMMUCLIENT_CERTIFICATE=./tools/mtls/4_client/certs/localhost.cert.pem
10 IMMUCLIENT_CLIENTCAS=./tools/mtls/2_intermediate/certs/ca-chain.cert.pem
11
12IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.
13
14Usage:
15 immuclient [flags]
16 immuclient [command]
17
18Available Commands:
19 audit-mode Starts immuclient as daemon in auditor mode. Run 'immuclient audit-mode help' or use -h flag for details
20 check-consistency Check consistency for the specified index and hash
21 count Count keys having the specified prefix
22 current Return the last merkle tree root and index stored locally
23 get Get item having the specified key
24 getByIndex Return an element by index
25 getRawBySafeIndex Return an element by index
26 help Help about any command
27 history Fetch history for the item having the specified key
28 inclusion Check if specified index is included in the current tree
29 iscan Iterate over all elements by insertion order
30 it Starts immuclient in CLI mode. Use 'help' or -h flag on the shell for details
31 login Login using the specified username and password
32 logout
33 rawsafeget Get item having the specified key, without parsing structured values
34 rawsafeset Set a value for the item having the specified key, without setup structured values
35 reference Add new reference to an existing key
36 safeget Get and verify item having the specified key
37 safereference Add and verify new reference to an existing key
38 safeset Add and verify new item having the specified key and value
39 safezadd Add and verify new key with score to a new or existing sorted set
40 scan Iterate over keys having the specified prefix
41 set Add new item having the specified key and value
42 status Ping to check if server connection is alive
43 use Select database
44 user Issue all user commands
45 version Show the immuclient version
46 zadd Add new key with score to a new or existing sorted set
47 zscan Iterate over a sorted set
48
49Flags:
50 --audit-password string immudb password used to login during audit; can be plain-text or base64 encoded (must be prefixed with 'enc:' if it is encoded)
51 --audit-username string immudb username used to login during audit
52 --certificate string server certificate file path (default "./tools/mtls/4_client/certs/localhost.cert.pem")
53 --clientcas string clients certificates list. Aka certificate authority (default "./tools/mtls/2_intermediate/certs/ca-chain.cert.pem")
54 --config string config file (default path are configs or $HOME. Default filename is immuclient.toml)
55 --dir string Main directory for audit process tool to initialize (default "/tmp")
56 -h, --help help for immuclient
57 -a, --immudb-address string immudb host address (default "127.0.0.1")
58 -p, --immudb-port int immudb port number (default 3322)
59 -m, --mtls enable mutual tls
60 --pkey string server private key path (default "./tools/mtls/4_client/private/localhost.key.pem")
61 --prometheus-host string Launch host of the Prometheus exporter. (default "0.0.0.0")
62 --prometheus-port string Launch port of the Prometheus exporter. (default "9477")
63 --roots-filepath string Filepath for storing root hashes after every successful audit loop. Default is tempdir of every OS. (default "/tmp/")
64 --servername string used to verify the hostname on the returned certificates (default "localhost")
65 --tokenfile string authentication token file (default path is $HOME or binary location; default filename is token-0.7.0) (default "token-0.7.0")
66 --value-only returning only values for get operations
67
68Use "immuclient [command] --help" for more information about a command.