Skip to content

Commit 78551d1

Browse files
Adding information to presetup database connactions using env variables or from a file
1 parent 804012f commit 78551d1

File tree

1 file changed

+51
-9
lines changed

1 file changed

+51
-9
lines changed

content/operate/redisinsight/configuration.md

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,61 @@ 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+
24+
## Pre-setup database connections
25+
Redis Insight allows you to pre-setup database connections using environment variables or a JSON file, enabling centralized and efficient configuration.
26+
There are two ways to pre-setup database connections in Redis Insight Electron and Docker:
27+
1. Using environment variables
28+
2. Using a JSON file
29+
30+
### Pre-setup database connections using environment variables
31+
Redis Insight allows you to pre-setup database connections using environment variables.
32+
33+
**NOTES**:
34+
- 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.
35+
- If you modify environment variables, the changes will take effect after restarting Redis Insight.
36+
- If you restart Redis Insight without these environment variables, all previously added database connections will be removed.
37+
38+
| Variable | Purpose | Default | Additional info |
39+
| --- | --- | --- | --- |
40+
| RI_REDIS_HOST* | Host of a Redis database. | N/A | |
41+
| RI_REDIS_PORT* | Port of a Redis database. | `6379` | |
42+
| RI_REDIS_NAME* | Alias of a database connection. | `{host}:{port}` | |
43+
| RI_REDIS_USERNAME* | Username to connect to a Redis database. | `default` | |
44+
| RI_REDIS_PASSWORD* | Password to connect to a Redis database. | No password | |
45+
| RI_REDIS_TLS* | Indicates whether TLS certificates should be used to connect. | `FALSE` | Accepts `TRUE` or `FALSE` |
46+
| 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*`. |
47+
| RI_REDIS_TLS_CA_PATH* | Path to the CA certificate file. | N/A | |
48+
| 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*`. |
49+
| RI_REDIS_TLS_CERT_PATH* | Path to the Client certificate file. | N/A | |
50+
| 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. |
51+
| RI_REDIS_TLS_KEY_PATH* | Path to private key file. | N/A | |
52+
53+
### Pre-setup database connections using a JSON file
54+
Redis Insight also allows you to pre-setup database connections using a JSON file.
55+
56+
**NOTES**
57+
- The JSON file format should match the one used when exporting database connections from Redis Insight.
58+
- The `id` field in the JSON file should include unique identifiers to avoid conflicts for database connections.
59+
- Changes to the JSON file will take effect after restarting Redis Insight.
60+
- If the JSON file is removed, all database connections added via the file will be removed.
61+
62+
| Variable | Purpose | Default | Additional info |
63+
| --- | --- | --- | --- |
64+
| RI_PRE_SETUP_DATABASES_PATH | Path to a JSON file containing the database connections to pre-setup | |
2365

2466
## Use Redis Insight behind a reverse proxy
2567

0 commit comments

Comments
 (0)