Title
Create new category
Edit page index title
Edit category
Edit link
Air-gapped
Redis version 7.0.5 or higher is required.
To install Redis in an air-gapped environment, download the required packages on a preparation machine and then transfer them to the air-gapped server. The preparation machine should have internet access and run the same operating system version as the target server.
Prerequisites
Before installing the Redis service, ensure the following requirements are met.
| Requirement | Description |
|---|---|
| Operating System | Debian 12+, Ubuntu 22.04+, Rocky Linux 9+, or RHEL 9+. |
| Privileges | root or sudo privileges on both the preparation machine and the air-gapped server. |
| Hardware | 2 vCPU 32 GB RAM minimum. |
| Disk space | At least 50 GB of available storage. |
| Network access | Required port is open (default port: 6379). A minimum network bandwidth of 1 Gbps is required. A bandwidth of 5 Gbps or higher is strongly recommended for production deployments. |
| Offline Package Transfer | A USB drive or other secure transfer medium is required to move the packages to the air-gapped server. |
Debian, Ubuntu
Prepare packages
- On the preparation machine, run commands.
# add repositorysudo apt-get install lsb-release curl gpgcurl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpgsudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.listsudo apt-get update mkdir -p redis && cd redisapt-get download redis=6:8.6.2-1rl1~noble1 \ redis-server=6:8.6.2-1rl1~noble1 \ redis-tools=6:8.6.2-1rl1~noble1cd ..- Copy the
redisfolder to a USB drive or secure transfer medium. - Move it to the air-gapped server.
Install Redis
- On the target server, insert the USB drive or secure transfer medium.
- Run the commands below in the
redisfolder.
xxxxxxxxxxsudo dpkg -i ./*.deb sudo systemctl enable --now redis-server # check redis-server statussudo systemctl status redis-server- Access Redis configuration file
/etc/redis/redis.conffor editing. - Comment out the
bindsetting and setprotected-modeoption to no.
xxxxxxxxxx...# The following line should be commented# bind 127.0.0.1...# The following line should be uncommented and set to noprotected-mode no...- Restart Redis.
xxxxxxxxxxsudo systemctl restart redis-server- Run the command with Redis CLI.
xxxxxxxxxxredis-cli ping- Confirm that the response returned is PONG.
xxxxxxxxxxPONGRocky, RHEL 9
Prepare packages
- On the preparation machine, run commands.
xxxxxxxxxxsudo tee /etc/yum.repos.d/redis.repo >/dev/null <<'EOF'[Redis]name=Redisbaseurl=http://packages.redis.io/rpm/rockylinux9enabled=1gpgcheck=1EOF curl -fsSL https://packages.redis.io/gpg > /tmp/redis.keysudo rpm --import /tmp/redis.key sudo dnf makecache mkdir -p redis && cd redisdnf download --resolve --alldeps --downloaddir . redis-8.6.2-1.x86_64cd ..- Copy the redis folder to a USB drive or secure transfer medium.
- Move it to the air-gapped server.
Install Redis
- On the target server, insert the USB drive or secure transfer medium.
- Run the commands below in the
redisfolder.
xxxxxxxxxxsudo dnf install -y ./*.rpm --disablerepo '*' sudo systemctl enable --now redis # check redis-server statussudo systemctl status redisSometimes, other dependencies require upgrading. Example:

You should manually download the dependencies using the command dnf download --resolve --alldeps --downloaddir . <package_names> . Then copy them to the redis folder and install again.
- Access Redis configuration file
/etc/redis/redis.conffor editing. - Comment out the
bindsetting and setprotected-modeoption to no.
xxxxxxxxxx...# The following line should be commented# bind 127.0.0.1...# The following line should be uncommented and set to noprotected-mode no...- Restart Redis.
xxxxxxxxxxsudo systemctl restart redis- Run the command with Redis CLI.
xxxxxxxxxxredis-cli ping- Confirm that the response returned is PONG.
xxxxxxxxxxPONG