Skip to content

Commit ea3d4d4

Browse files
Adding information to presetup database connections in Redis Insight (#1253)
* Adding information to presetup database connactions using env variables or from a file * Apply suggestions from code review Co-authored-by: David Dougherty <david.dougherty@redis.com> * Update configuration.md * Update configuration.md --------- Co-authored-by: David Dougherty <david.dougherty@redis.com>
1 parent 30847dd commit ea3d4d4

File tree

1 file changed

+52
-9
lines changed

1 file changed

+52
-9
lines changed

content/operate/redisinsight/configuration.md

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,62 @@ linkTitle: Configuration settings
77
title: Redis Insight configuration settings
88
weight: 5
99
---
10-
## Environment variables
10+
## Configuration environment variables
1111

1212
| Variable | Purpose | Default | Additional info |
1313
| --- | --- | --- | --- |
14-
| RI_APP_PORT | The port that Redis Insight listens on | <ul><li> Docker: 5540 <li> desktop: 5530 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
15-
| RI_APP_HOST | The host that Redis Insight connects to | <ul><li> Docker: 0.0.0.0 <li> desktop: 127.0.0.1 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
16-
| RI_SERVER_TLS_KEY | Private key for HTTPS | n/a | Private key in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
17-
| RI_SERVER_TLS_CERT | Certificate for supplied private key | n/a | Public certificate in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
18-
| RI_ENCRYPTION_KEY | Key to encrypt data with | n/a | Available only for Docker. <br> Redis insight stores sensitive information (database passwords, Workbench history, etc.) locally (using [sqlite3](https://github.com/TryGhost/node-sqlite3)). This variable allows you to store sensitive information encrypted using the specified encryption key. <br />Note: The same encryption key should be provided for subsequent `docker run` commands with the same volume attached to decrypt the information. |
14+
| RI_APP_PORT | The port that Redis Insight listens on. | <ul><li> Docker: 5540 <li> desktop: 5530 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
15+
| RI_APP_HOST | The host that Redis Insight connects to. | <ul><li> Docker: 0.0.0.0 <li> desktop: 127.0.0.1 </ul> | See [Express Documentation](https://expressjs.com/en/api.html#app.listen)|
16+
| RI_SERVER_TLS_KEY | Private key for HTTPS. | n/a | Private key in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
17+
| RI_SERVER_TLS_CERT | Certificate for supplied private key. | n/a | Public certificate in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). Can be a path to a file or a string in PEM format.|
18+
| RI_ENCRYPTION_KEY | Key to encrypt data with. | n/a | Available only for Docker. <br> Redis insight stores sensitive information (database passwords, Workbench history, etc.) locally (using [sqlite3](https://github.com/TryGhost/node-sqlite3)). This variable allows you to store sensitive information encrypted using the specified encryption key. <br />Note: The same encryption key should be provided for subsequent `docker run` commands with the same volume attached to decrypt the information. |
1919
| RI_LOG_LEVEL | Configures the log level of the application. | `info` | Supported logging levels are prioritized from highest to lowest: <ul> <li>error<li> warn<li>info<li> http<li> verbose<li> debug<li> silly</ul> |
20-
| RI_FILES_LOGGER | Logs to file | `true` | By default, you can find log files in the following folders: <ul> <li> Docker: `/data/logs` <li> desktop: `<user-home-dir>/.redisinsight-app/logs` </ul>|
21-
| RI_STDOUT_LOGGER | Logs to STDOUT | `true` | |
22-
| RI_PROXY_PATH | Configures a subpath for a proxy | n/a | Available only for Docker. |
20+
| RI_FILES_LOGGER | Logs to file. | `true` | By default, you can find log files in the following folders: <ul> <li> Docker: `/data/logs` <li> desktop: `<user-home-dir>/.redisinsight-app/logs` </ul>|
21+
| RI_STDOUT_LOGGER | Logs to STDOUT. | `true` | |
22+
| RI_PROXY_PATH | Configures a subpath for a proxy. | n/a | Available only for Docker. |
23+
| RI_DATABASE_MANAGEMENT | When set to `false`, this disables the ability to manage database connections (adding, editing, or deleting). | `true` | |
24+
25+
## Preconfigure database connections
26+
Redis Insight allows you to preconfigure database connections using environment variables or a JSON file, enabling centralized and efficient configuration.
27+
There are two ways to preconfigure database connections in Redis Insight Electron and Docker:
28+
1. Use environment variables.
29+
1. Use a JSON file.
30+
31+
### Preconfigure database connections using environment variables
32+
Redis Insight allows you to preconfigure database connections using environment variables.
33+
34+
**NOTES**:
35+
- To configure multiple database connections, replace the asterisk (*) in each environment variable with a unique identifier for each database connection. If setting up only one connection, you can omit the asterisk, and Redis Insight will default to using 0 as the ID.
36+
- If you modify environment variables, the changes will take effect after restarting Redis Insight.
37+
- If you restart Redis Insight without these environment variables, all previously added database connections will be removed.
38+
39+
| Variable | Purpose | Default | Additional info |
40+
| --- | --- | --- | --- |
41+
| RI_REDIS_HOST* | Host of a Redis database. | N/A | |
42+
| RI_REDIS_PORT* | Port of a Redis database. | `6379` | |
43+
| RI_REDIS_ALIAS* | Alias of a database connection. | `{host}:{port}` | |
44+
| RI_REDIS_USERNAME* | Username to connect to a Redis database. | `default` | |
45+
| RI_REDIS_PASSWORD* | Password to connect to a Redis database. | No password | |
46+
| RI_REDIS_TLS* | Indicates whether TLS certificates should be used to connect. | `FALSE` | Accepts `TRUE` or `FALSE` |
47+
| RI_REDIS_TLS_CA_BASE64* | CA certificate in base64 format. | N/A | Specify a CA certificate in this environment variable or provide a file path using `RI_REDIS_TLS_CA_PATH*`. |
48+
| RI_REDIS_TLS_CA_PATH* | Path to the CA certificate file. | N/A | |
49+
| RI_REDIS_TLS_CERT_BASE64* | Client certificate in base64 format. | N/A | Specify a client certificate in this environment variable or provide a file path using `RI_REDIS_TLS_CERT_PATH*`. |
50+
| RI_REDIS_TLS_CERT_PATH* | Path to the Client certificate file. | N/A | |
51+
| RI_REDIS_TLS_KEY_BASE64* | Private key for the client certificate in base64 format. | N/A | Indicate a private key in this environment variable or use another variable to get it from a file. |
52+
| RI_REDIS_TLS_KEY_PATH* | Path to private key file. | N/A | |
53+
54+
### Preconfigure database connections using a JSON file
55+
Redis Insight also allows you to preconfigure database connections using a JSON file.
56+
57+
**NOTES**
58+
- The JSON file format should match the one used when exporting database connections from Redis Insight.
59+
- The `id` field in the JSON file should include unique identifiers to avoid conflicts for database connections.
60+
- Changes to the JSON file will take effect after restarting Redis Insight.
61+
- If the JSON file is removed, all database connections added via the file will be removed.
62+
63+
| Variable | Purpose | Default | Additional info |
64+
| --- | --- | --- | --- |
65+
| RI_PRE_SETUP_DATABASES_PATH | Path to a JSON file containing the database connections to preconfigure | |
2366

2467
## Use Redis Insight behind a reverse proxy
2568

0 commit comments

Comments
 (0)