Redis

Configuration

The following configuration is a production-ready .conf file which:

  1. Binds to 0.0.0.0

  2. Disables default user

  3. Forces use of a password

  4. Prevents users from running configuration commands

  5. Creates a app user named user with password password (change this according to the comments in the file)

# security configurations as documented at https://redis.io/topics/security
bind 0.0.0.0
rename-command CONFIG ""

# disable default user
requirepass password
user default off -@all

# setup app user
# to generate the password, run `printf -- 'password' | sha256sum | cut -f 1 -d ' '`
# the following password (after the '#' character) is the sha256 of "password" without the quotes
user user on ~* +ping +client +@read +@write +@set +@list #5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8

Docker

Image

Compose

Last updated