Go to your redis.conf file inside /etc/redis/ and press Ctrl + W to search, type in
requirepass and it will take you to the security portion of that document, uncomment the requirepass by removing the # to the left, leave a space after
requirepass, and enter a long password. Something you've never used, and something that won't be cracked anytime soon, I use a 52 character string. Some use more. Then save that document, go to your nodebb config.json file, and enter the password into the password field.
Might need to restart redis and nodebb, make sure you run bg-save first though or you may lose posts if they've been made recently.