Pack Hosting Panel

Configure Redis

How do I configure Redis at Hipex?

Many applications have various elements, like sessions and page cache, where the use of Redis can be desired. To simply add some (extra) Redis instances, you can make use of our CLI tools.

In this article, we explain how you can enable (extra) Redis instances with Hipex CLI. Redis instances will be set per domain and are available on every Hipex environment.

Setting up and enabling Redis

For setting up Redis, you need to be logged in in the concerned environment. In this environment, you can use the command redis:setup to enable Redis:

hipex redis:setup

In case there are multiple applications installed, there will be asked to select the application where the extra instance needs to be created for. In addition, there will be asked for which element of the application the Redis instance needs to be created:

Please select the application where you want to configure Redis for:
  [0] hipex.io
  [1] support.hipex.io
 > hipex.io
Please choose one of the following Redis instance types:
  [0] page
  [1] backend
  [2] session
 > session

By default the instance is created based on UNIX sockets. We also offer you the option to use a Redis instance on port/IP. With shared environments, sockets must always be used. If you have a dedicated server you can set up a redis instance on port / IP by passing the option --host_port to the setup command:

hipex redis:setup --host_port

Memory usage

As a parameter, you can easily allocate the maximum amount of memory. You can make use of the --memory parameter, the standard is 512 MB.

Please note allocating too much memory can cause serious problems, as elements like MySQL, PHP, Varnish or other services potentially will not get enough allocated memory anymore. So, increase this with small steps and monitor whether Redis has too much or too little memory.

With the command below, we'll allocate 1024 MB (1 GB) of memory to Redis.

hipex redis:setup --memory 1024

Overzicht commando

To get an explanation and overview of the possibilities of the command, you can use the option --help:

hipex redis:setup --help