All Collections
NitroPack for Magento
Getting Started
Configure NitroPack for Magento with Redis
Configure NitroPack for Magento with Redis
Updated over a week ago

In case your webstore has a Redis load balancer installed, some extra configuration is required for Redis to work properly with the NitroPack extension for Magento.

Configure NitroPack Redis caching

In your server terminal console, run the setup:config:set command and specify parameters that are unique to NitroPack caching.

php bin/magento setup:config:set --nitropack-cache-storage_type=<value> --nitropack-cache-redis_host=<value> --nitropack-cache-redis-pass=<value> --nitropack-cache-redis_db=<value> --nitropack-cache-redis-port=<value>

Use the table below to find all details regarding the different parameters:

Command-line parameter

Value

Meaning

Default value

nitropack-cache-redis_host

Server

Fully qualified hostname, IP address, or an absolute path to a UNIX socket. The default value of 127.0.0.1 indicates Redis is installed on the Commerce server.

127.0.0.1

nitropack-cache-storage_type

Cache Type

Type of Cache Storage

redis

nitropack-cache-redis_port

Port

Redis server listen port

6379

nitropack-cache-redis_pass

Password

Configuring a Redis password enables one of its built-in security features: the auth command, which requires clients to authenticate to access the database. The password is configured directly in Redis’ configuration file: /etc/redis/redis.conf

Your chosen Redis password

nitropack-cache-redis_db

Database

Required if you use Redis for both the default and full-page cache. You must specify the database number of one of the caches; the other cache uses 0 by default Therefore by suggestion kindly use the default value 3.

3

Example command

The following example enables Redis default caching, sets the host to 127.0.0.1, and assigns the database number to 3.

bin/magento setup:config:set --nitropack-cache-storage_type=redis --nitropack-cache-redis_db=127.0.0.1 --nitropack-cache-redis-pass=<your_redis_password> --nitropack-cache-redis-port=6379 --nitropack-cache-redis-db=3

Should you have any questions, you can contact our Support team using the chat bubble on the bottom right of this page.

Did this answer your question?