{"id":13459177,"url":"https://github.com/joeferner/redis-commander","last_synced_at":"2025-05-12T05:33:19.179Z","repository":{"id":3635151,"uuid":"4701858","full_name":"joeferner/redis-commander","owner":"joeferner","description":"Redis management tool written in node.js","archived":false,"fork":false,"pushed_at":"2025-05-08T13:42:54.000Z","size":4914,"stargazers_count":3750,"open_issues_count":63,"forks_count":480,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-05-12T02:50:25.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://joeferner.github.io/redis-commander/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeferner.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-06-18T14:30:04.000Z","updated_at":"2025-05-11T20:56:42.000Z","dependencies_parsed_at":"2024-03-27T06:23:22.130Z","dependency_job_id":"41d75415-95f2-4de2-ae8e-5b506710edf9","html_url":"https://github.com/joeferner/redis-commander","commit_stats":{"total_commits":808,"total_committers":112,"mean_commits":7.214285714285714,"dds":0.6485148514851485,"last_synced_commit":"1103a29fb5715154f248a03b7e428f32f16466f5"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fredis-commander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fredis-commander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fredis-commander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeferner%2Fredis-commander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeferner","download_url":"https://codeload.github.com/joeferner/redis-commander/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672735,"owners_count":21945482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T09:01:08.565Z","updated_at":"2025-05-12T05:33:19.157Z","avatar_url":"https://github.com/joeferner.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","CLI Tools"],"sub_categories":["Java"],"readme":"# Redis Commander\n\nRedis web management tool written in node.js\n\n![GUI image](./docs/GUI_EXAMPLE.png)\n\n# Install and Run\n\n```bash\n$ npm install -g redis-commander\n$ redis-commander\n```\n\nInstallation via `yarn` is currently not supported. Please use `npm` as package manager.\n\nOr run Redis Commander as Docker image `ghcr.io/joeferner/redis-commander` ~~rediscommander/redis-commander~~ (instructions see below).\n\nMulti-Arch images built are available at `ghcr.io/joeferner/redis-commander:latest`.\n(https://github.com/joeferner/redis-commander/pkgs/container/redis-commander)\n\n_Remark: new version are not published to Dockerhub right now._\n\n# Features\n\nWeb-UI to display and edit data within multiple different Redis servers.\nIt can connect to Redis standalone server, Sentinel based setups and Redis Cluster.\n\nIt has support for the following data types to view, add, update and delete data:\n* Strings\n* Lists\n* Sets\n* Sorted Set\n* Streams (Basic support based on HFXBus project from https://github.com/exocet-engineering/hfx-bus, only view/add/delete data)\n* ReJSON documents (Basic support, only for viewing values of ReJSON type keys)\n\n# Usage\n\n```\n$ redis-commander --help\nOptions:\n  --version                            Show version number                                                                                      [boolean]\n  --redis-port                         The port to find redis on.                                                                                [number]\n  --redis-host                         The host to find redis on.                                                                                [string]\n  --redis-socket                       The unix-socket to find redis on.                                                                         [string]\n  --redis-username                     The redis username.                                                                                       [string]\n  --redis-password                     The redis password.                                                                                       [string]\n  --redis-db                           The redis database.                                                                                       [number]\n  --redis-optional                     Set to true if no permanent auto-reconnect shall be done if server is down.             [boolean] [default: false]\n  --sentinel-port                      The port to find sentinel on.                                                                             [number]\n  --sentinel-host                      The host to find sentinel on.                                                                             [string]\n  --sentinels                          Comma separated list of sentinels with host:port.                                                         [string]\n  --sentinel-name                      The sentinel group name to use.                                                                           [string]\n  --sentinel-username                  The sentinel username to use.                                                                             [string]\n  --sentinel-password                  The sentinel password to use.                                                                             [string]\n  --clusters                           Comma separated list of redis cluster server with host:port.                                              [string]\n  --is-cluster                         Flag to use parameter from redis-host and redis-port as Redis cluster member            [boolean] [default: false]\n  --cluster-no-tls-validation          Flag to disable tls host name validation within cluster setups (needed for AWS)         [boolean] [default: false]\n  --redis-tls                          Use TLS for connection to redis server. Required for TLS connections.                   [boolean] [default: false]\n  --redis-tls-ca-cert                  Use PEM-style CA certificate key for connection to redis server. Requires \"redis-tls=true\"                [string]\n  --redis-tls-ca-cert-file             File path to PEM-style CA certificate key for connection to redis server. Requires \"redis-tls=true\", Overrides\n                                       \"redis-tls-ca-cert\" if set too.                                                                           [string]\n  --redis-tls-cert                     Use PEM-style public key for connection to redis server. Requires \"redis-tls=true\"                        [string]\n  --redis-tls-cert-file                File path to PEM-style public key for connection to redis server. Requires \"redis-tls=true\", Overrides\n                                       \"redis-tls-cert\" if set too.                                                                              [string]\n  --redis-tls-key                      Use PEM-style private key for connection to redis server. Requires \"redis-tls=true\"                       [string]\n  --redis-tls-key-file                 File path PEM-style private key for connection to redis server. Requires \"redis-tls=true\", Overrides\n                                       \"redis-tls-key\" if set too.                                                                               [string]\n  --redis-tls-server-name              Server name to confirm client connection. Server name for the SNI (Server Name Indication) TLS extension. Requires\n                                       \"redis-tls=true\"                                                                                          [string]\n  --sentinel-tls                       Enable TLS for sentinel mode. If no special \"sentinel-tls-*\" option is defined the redis TLS settings are\n                                       reused (\"redis-tls-*\"). Required for TLS sentinel connections.                          [boolean] [default: false]\n  --sentinel-tls-ca-cert               Use PEM-style CA certificate key for connection to sentinel. Requires \"sentinel-tls=true\"                 [string]\n  --sentinel-tls-ca-cert-file          File path to PEM-style CA certificate key for connection to sentinel. Requires \"sentinel-tls=true\", Overrides\n                                       \"sentinel-tls-ca-cert\" if set too.                                                                        [string]\n  --sentinel-tls-cert                  Use PEM-style public key for connection to sentinel. Requires \"sentinel-tls=true\"                         [string]\n  --sentinel-tls-cert-file             File path to PEM-style public key for connection to sentinel. Requires \"sentinel-tls=true\", Overrides\n                                       \"sentinel-tls-cert\" if set too.                                                                           [string]\n  --sentinel-tls-key                   Use PEM-style private key for connection to sentinel. Requires \"sentinel-tls=true\"                        [string]\n  --sentinel-tls-key-file              File path to PEM-style private key for connection to sentinel. Requires \"sentinel-tls=true\", Overrides\n                                       \"sentinel-tls-key\" if set too.                                                                            [string]\n  --sentinel-tls-server-name           Server name to confirm client connection. Server name for the SNI (Server Name Indication) TLS extension. Requires\n                                       \"sentinel-tls=true\"                                                                                       [string]\n  --insecure-certificate               Disable certificate check for all certificates (Redis, Sentinel, Cluster). Should not be used in\n                                       production!                                                                            [boolean] [Standard: false]\n  --noload, --nl                       Do not load connections from config.                                                                     [boolean]\n  --clear-config, --cc                 Clear configuration file.                                                                                [boolean]\n  --migrate-config                     Migrate old configuration file in $HOME to new style.                                                    [boolean]\n  --test                               Test final configuration (file, env-vars, command line).                                                 [boolean]\n  --open                               Open web-browser with Redis-Commander.                                                  [boolean] [default: false]\n  --redis-label                        The label to display for the connection.                                               [string] [default: \"local\"]\n  --read-only                          Start app in read-only mode.                                                            [boolean] [default: false]\n  --http-auth-username, --http-u       The http authorisation username.                                                        [string] [default: \"test\"]\n  --http-auth-password, --http-p       The http authorisation password.                                                            [string] [default: \"\"]\n  --http-auth-password-hash, --http-h  The http authorisation password hash.                                                       [string] [default: \"\"]\n  --address                            The address to run the server on.                                                    [string] [default: \"0.0.0.0\"]\n  --port                               The port to run the server on.                                                            [number] [default: 8081]\n  --url-prefix                         The url prefix to respond on.                                                               [string] [default: \"\"]\n  --trust-proxy                        App is run behind proxy (enable Express \"trust proxy\").                                 [boolean] [default: false]\n  --max-hash-field-size                The max number of bytes for a hash field before you must click to view it.                   [number] [default: 0]\n  --nosave, --ns                       Do not save new connections to config file.                                             [boolean] [default: false]\n  --no-log-data                        Do not log data values from redis store.                                                [boolean] [default: false]\n  --folding-char, --fc                 Character to fold keys at for tree view.                                                   [string] [default: \":\"]\n  --root-pattern, --rp                 Default root pattern for redis keys.                                                       [string] [default: \"*\"]\n  --use-scan, --sc                     Use SCAN instead of KEYS.                                                                [boolean] [default: true]\n  --scan-count                         The size of each separate scan.                                                            [number] [default: 200]\n  -h, -?, --help                       Show help                                                                                                [boolean]\n```\n\nThe connection can be established either via direct connection to redis server or indirect\nvia a sentinel instance. Most of this command line parameters map onto configuration params read from \nthe config file - see [docs/configuration.md](docs/configuration.md) and [docs/connections.md](docs/connections.md).\n\n## Configuration\n\nRedis Commander can be configured by configuration files, environment variables or using command line\nparameters. The different types of config values overwrite each other, only the last (most important)\nvalue is used.\n\nFor configuration files the `node-config` module (https://github.com/lorenwest/node-config) is used, with default to json syntax.\n\nThe order of precedence for all configuration values (from least to most important) is:\n\n- Configuration files\n\n  `default.json` - this file contains all default values and SHOULD NOT be changed\n\n  `local.json` - optional file, all local overwrites for values inside default.json should be placed here as well\n  as a list of redis connections to use at startup\n\n  `local-\u003cNODE_ENV\u003e.json` - Do not add anything else than connections to this file! Redis Commander will overwrite this whenever a\n  connection is added or removed via user interface. Inside docker container this file is used to store\n  all connections parsed from REDIS_HOSTS env var.\n  This file overwrites all connections defined inside `local.json`\n\n  There are some more possible files available to use - please check the node-config Wiki\n  for a complete list of all possible file names (https://github.com/lorenwest/node-config/wiki/Configuration-Files)\n\n- Environment variables - the full list of env vars possible (except the docker specific ones)\n  can be got from the file `config/custom-environment-variables.json` together with their mapping\n  to the respective configuration key.\n\n- Command line parameters - Overwrites everything\n\nTo check the final configuration created from files, env-vars set and command line param overwrites\nstart redis commander with additional param \"--test\". All invalid configuration keys will be listed\nin the output. The config test does not check if hostnames or ip addresses can be resolved.\n\nMore information can be found in the documentation at [docs/configuration.md](docs/configuration.md)\nand [docs/connections.md](docs/connections.md).\n\n*Remark: Errors on image startup with \"permission denied\" on config files might be caused due to\nwrong runtime users running the image. \"docker compose\" in recent versions does not pick up the\nuser defined inside the Dockerfile and uses some other user, therefor it should be explicit set inside\nthe docker-compose.yml file as shown in the example file.*\n\n## Environment Variables\n\nThese environment variables can be used starting Redis Commander as normal\napplication or inside docker container (defined inside file `config/custom-environment-variables.json`)\nand at [docs/configuration.md](docs/configuration.md):\n\n```\nHTTP_USER\nHTTP_PASSWORD\nHTTP_PASSWORD_HASH\nADDRESS\nPORT\nREAD_ONLY\nURL_PREFIX\nSIGNIN_PATH\nROOT_PATTERN\nNOSAVE\nNO_LOG_DATA\nFOLDING_CHAR\nVIEW_JSON_DEFAULT\nUSE_SCAN\nSCAN_COUNT\nFLUSH_ON_IMPORT\nREDIS_CONNECTION_NAME\nREDIS_LABEL\nCLIENT_MAX_BODY_SIZE\nBINARY_AS_HEX\n```\n\n## Additional Docker Environment Variables\n\nAll environment variables listed at \"Environment Variables\" can be used running image\nwith Docker. The following additional environment variables are available too (defined inside\ndocker startup script):\n\n```\nHTTP_PASSWORD_FILE\nHTTP_PASSWORD_HASH_FILE\nREDIS_PORT\nREDIS_HOST\nREDIS_SOCKET\nREDIS_USERNAME\nREDIS_PASSWORD\nREDIS_PASSWORD_FILE\nREDIS_TLS\nREDIS_TLS_CA_CERT\nREDIS_TLS_CA_CERT_FILE\nREDIS_TLS_CERT\nREDIS_TLS_CERT_FILE\nREDIS_TLS_KEY\nREDIS_TLS_KEY_FILE\nREDIS_TLS_SERVER_NAME\nREDIS_DB\nREDIS_HOSTS\nREDIS_OPTIONAL\nSENTINEL_PORT\nSENTINEL_HOST\nSENTINEL_NAME\nSENTINEL_USERNAME\nSENTINEL_PASSWORD\nSENTINEL_PASSWORD_FILE\nSENTINEL_TLS\nSENTINEL_TLS_CA_CERT\nSENTINEL_TLS_CA_CERT_FILE\nSENTINEL_TLS_CERT\nSENTINEL_TLS_CERT_FILE\nSENTINEL_TLS_KEY\nSENTINEL_TLS_KEY_FILE\nSENTINEL_TLS_SERVER_NAME\nSENTINELS\nK8S_SIGTERM\nCLUSTERS\nIS_CLUSTER\nCLUSTER_NO_TLS_VALIDATION\n```\n A (partial) description for the mapping onto the cli params and into the config files can be found\nat the [docs/connections.md](docs/connections.md) file.\n\nThe `K8S_SIGTERM` variable (default \"0\") can be set to \"1\" to work around kubernetes specifics\nto allow pod replacement with zero downtime. More information on how kubernetes handles termination of old pods and the\nsetup of new ones can be found within the thread [https://github.com/kubernetes/contrib/issues/1140#issuecomment-290836405]\n\nHosts can be optionally specified with a comma separated string by setting the `REDIS_HOSTS` environment variable.\n\nAfter running the container, `redis-commander` will be available at [localhost:8081](http://localhost:8081).\n\n### Using TLS secured connections\n\nBooth connections to the Redis server itself as well as to the Redis Sentinels (if used)\ncan be configured to require TLS encryption. With the simples use case just set \nthe environment vars `REDIS_TLS=1` and (if sentinels are used) `SENTINEL_TLS=1`\nto enable TLS without further checks and special configurations.\n\nThe corresponding command line parameters (starting Redis Commander locally without docker)\nare\n\n```--redis-tls --sentinel-tls```\n\nMore complex use cases are documented in the [docs/connections.md](docs/connections.md) file\nat \"Configure TLS Support\".\n\n\n### Valid host strings (used for REDIS_HOSTS)\n\nthe `REDIS_HOSTS` environment variable is a comma separated list of host definitions,\nwhere each host should follow one of these templates:\n\n`hostname`\n\n`label:hostname`\n\n`label:hostname:port`\n\n`label:hostname:port:dbIndex`\n\n`label:hostname:port:dbIndex:password`\n\nConnection strings defined with `REDIS_HOSTS` variable do not support TLS connections.\nIf remote redis server needs TLS write all connections into a config file instead\nof using `REDIS_HOSTS` (see [docs/connections.md](docs/connections.md) at the end \nwithin the more complex examples).\n\nThis environment variable `REDIS_HOSTS` does not support IPv6 addresses. It supports IPv4 or hostnames only due to ':' \nused as separator within IPv6 addresses and this fields here.\n\n### With docker-compose\n\n```yml\nversion: '3'\nservices:\n  redis:\n    container_name: redis\n    hostname: redis\n    image: redis\n\n  redis-commander:\n    container_name: redis-commander\n    hostname: redis-commander\n    image: ghcr.io/joeferner/redis-commander:latest\n    restart: always\n    environment:\n    - REDIS_HOSTS=local:redis:6379\n    ports:\n    - \"8081:8081\"\n    user: redis\n```\n\nAttention - later version of compose do not honor the \"USER\" directive from the Dockerfile anymore, \nuser must be set explicit. Otherwise, \"permission denied\" errors are shown on startup.\n\n### Without docker-compose\n\n#### Simplest\n\nIf you're running redis on `localhost:6379`, this is all you need to get started.\n\n```bash\ndocker run --rm --name redis-commander -d -p 8081:8081 \\\n  ghcr.io/joeferner/redis-commander:latest\n```\n\n#### Specify single host\n\n```bash\ndocker run --rm --name redis-commander -d -p 8081:8081 \\\n  --env REDIS_HOSTS=10.10.20.30 \\\n  ghcr.io/joeferner/redis-commander:latest\n```\n\n#### Specify multiple hosts with labels\n\n```bash\ndocker run --rm --name redis-commander -d -p 8081:8081 \\\n  --env REDIS_HOSTS=local:localhost:6379,myredis:10.10.20.30 \\\n  ghcr.io/joeferner/redis-commander:latest\n```\n\n## Kubernetes\n\nAn example deployment can be found at [k8s/redis-commander/deployment.yaml](k8s/redis-commander/deployment.yaml).\n\nIf you already have a cluster running with `redis` in the default namespace, deploy `redis-commander` with `kubectl apply -f k8s/redis-commander`. If you don't have `redis` running yet, you can deploy a simple pod with `kubectl apply -f k8s/redis`.\n\nAlternatively, you can add a container to a deployment's spec like this:\n\n```\ncontainers:\n- name: redis-commander\n  image: ghcr.io/joeferner/redis-commander\n  env:\n  - name: REDIS_HOSTS\n    value: instance1:redis:6379\n  ports:\n  - name: redis-commander\n    containerPort: 8081\n```\n\nknown issues with Kubernetes:\n\n* using REDIS_HOSTS works only with a password-less redis db. You must specify REDIS_HOST on a password\n  protected redis db\n* using REDIS_HOSTS does not work with IPv6 addresses. For connections to IPv6 addresses either use `REDIS_HOST` and `REDIS_PORT`\n  env var or a custom `config/local.json` configuration file mounted into the redis container.\n\n\n## Helm chart\n\nYou can install the application on any Kubernetes cluster using Helm.\nThere is no helm repo available currently, therefore local checkout of helm sources inside \nthis repo is needed:\n\n```sh\nhelm -n myspace install redis-web-ui ./k8s/helm-chart/redis-commander\n```\n\nMore [Documentation](k8s/helm-chart/README.md) about this Helm chart and its values.\n\n## OpenShift V3\n\nTo use the stock Node.js image builder do the following.\n\n1. Open Catalog and select the Node.js template\n1. Specify the name of the application and the URL to the [redis-command github repository](https://github.com/joeferner/redis-commander.git)\n1. Click the ```advanced options``` link\n1. (optional) specify the hostname for the route - _if one is not specified it will be generated_\n1. In the Deployment Configuration section\n   * Add ```REDIS_HOST``` environment variable whose value is the name of the redis service - e.g., ```redis```\n   * Add ```REDIS_PORT``` environment variable whose value is the port exposed of the redis service - e.g., ```6379```\n   * Add value from secret generated by the [redis template](https://github.com/sclorg/redis-container/blob/master/examples/redis-persistent-template.json):\n     * name: ```REDIS_PASSWORD```\n     * resource: ```redis```\n     * key: ```database-password```\n1. (optional) specify a label such as ```appl=redis-commander-dev1```\n   * _this label will be applied on all objects created allowing for easy deletion later via:_\n   ```bash\n   oc delete all --selector appl=redis-commander-dev1\n   ```\n\n## Helper Scripts\n### Generate BCrypted password hash\n\nRedis commander allows setting either a plain text password for http authentication or a \"bcrypt\" \npassword hash.\nTo generate a hashed password the script `bin/bcrypt-password.js` can be used. The parameter \"-p\" to set password should be given. \n\nUsage example:\n```shell script\n$ git clone https://github.com/joeferner/redis-commander.git\n$ cd redis-commander/bin\n$ node bcrypt-password.js -p myplainpass\n$2b$10BQPbC8dlxeEqB/nXOkyjr.tlafGZ28J3ug8sWIMRoeq5LSVOXpl3W\n```\n\nThis generated hash can be set inside the config file as \"server.httpAuth.passwordHash\", as env var \"HTTP_PASSWORD_HASH\"\nor on the command line as `--http-auth-password-hash`.\nRunning inside docker image a file containing this password hash can be set via env var \n`HTTP_PASSWORD_HASH_FILE`\n\n## Build images based on this one\n\nTo use this images as a base image for other images you need to call \"apk update\" inside your Dockerfile\nbefore adding other apk packages with \"apk add foo\". Afterwards, to reduce your image size, you may\nremove all temporary apk configs too again as this Dockerfile does.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fredis-commander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeferner%2Fredis-commander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeferner%2Fredis-commander/lists"}