Bobcares

Redis Docker Disable Protected Mode | How To?

by | Oct 24, 2023

We must modify the Redis setup in order to disable the protected mode for a Redis container using Docker. At Bobcares, with our Docker Hosting Support Service, we can handle your issues.

How to Disable Protected Mode for a Redis container using Docker?

“Protected mode,” a security feature of Redis, is turned on by default to block unwanted access to Redis instances. We must modify the Redis configuration in order to turn off the protected mode for a Redis container operating under Docker.

The steps are as follows:

1. Firstly, make a Redis-Docker container using the below command. This command creates a Redis container named “my-redis-container” and maps port 6379 from the container to the host system.

redis docker disable protected mode

2. To modify the Redis configuration, we can get to the container’s shell. If the Redis container has a different name, substitute “my-redis-container” for it.

redis docker disable protected mode

3. We can use a text editor to modify the Redis configuration file while we’re inside the container’s shell. We can use vi, for instance:

redis docker disable protected mode

4. Find the line in the Redis configuration file that allows protected mode. It appears as follows: protected-mode yes. To turn off protected mode, change “yes” to “no”: protected-mode no

5. Exit the text editor after saving the modifications to the Redis configuration file.

6. Lastly, to apply the modifications, restart the Redis service.

redis docker disable protected mode

Now that protected mode has been removed in the Redis container running in Docker, connections from hosts other than localhost are permitted.

[Want to learn more? Click here to reach us.]

Conclusion

We should always remember to disable the protected with prudence and in places we trust.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.