{
  "schema_version": 2,
  "id": "operate/rs/installing-upgrading/install/customize-install-directories",
  "title": "Customize installation directories",
  "url": "https://redis.io/docs/latest/operate/rs/installing-upgrading/install/customize-install-directories/",
  "summary": "Customize Redis Software installation directories.",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-09-24T09:16:34+01:00",
  "page_type": "content",
  "content_hash": "45e9ded922fde75bf74b00c1a7135ff9489e87c46ec285bd4f5bd5e918ed277b",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "When you install Redis Software on Red Hat Enterprise Linux, you can customize the installation directories.\n\nThe files are installed in the `redislabs` directory located in the path that you specify."
    },
    {
      "id": "considerations",
      "title": "Considerations",
      "role": "content",
      "text": "- When you install with custom directories, the installation does not run as an RPM file.\n\n- If a `redislabs` directory already exists in the path that you specify, the installation fails.\n\n- All nodes in a cluster must be installed with the same file locations.\n\n- Custom installation directories are not supported for databases using Auto Tiering.\n\n- [Configure different mount points for data and log directories](#config-diff-data-log-dirs)."
    },
    {
      "id": "specify-file-locations",
      "title": "Specify file locations",
      "role": "content",
      "text": "You can specify these file locations:\n\n| Files               | Installer flag | Example parameter | Example file location |\n| ------------------- | -------------- | ----------------- | --------------------- |\n| Binaries files      | --install-dir  | /opt              | /opt/redislabs        |\n| Configuration files | --config-dir   | /etc/opt          | /etc/opt/redislabs    |\n| Data and log files  | --var-dir      | /var/opt          | /var/opt/redislabs    |\n\nThese files are not in the custom directories:\n\n- OS files\n    - /etc/cron.d/redislabs\n    - /etc/firewalld/services\n    - /etc/firewalld/services/redislabs-clients.xml\n    - /etc/firewalld/services/redislabs.xml\n    - /etc/ld.so.conf.d/redislabs_ldconfig.conf.tmpl\n    - /etc/logrotate.d/redislabs\n    - /etc/profile.d/redislabs_env.sh\n    - /usr/lib/systemd/system/rlec_supervisor.service.tmpl\n    - /usr/share/selinux/mls/redislabs.pp\n    - /usr/share/selinux/targeted/redislabs.pp\n\n- Installation reference files\n    - /etc/opt/redislabs/redislabs_custom_install_version\n    - /etc/opt/redislabs/redislabs_env_config.sh\n\nTo specify directories during [installation](https://redis.io/docs/latest/operate/rs/installing-upgrading/install/install-on-linux), include installer flags as [command-line options](https://redis.io/docs/latest/operate/rs/installing-upgrading/install/install-script) when you run the `install.sh` script. For example:\n\n[code example]"
    },
    {
      "id": "config-diff-data-log-dirs",
      "title": "Configure different mount points for data and log directories",
      "role": "configuration",
      "text": "To configure different mount points for data and log directories, use symbolic links:\n\n1. Create a symbolic link for the data directory:\n\n    [code example]\n\n1. Create a symbolic link for the log directory:\n\n    [code example]"
    },
    {
      "id": "customize-storage-paths",
      "title": "Customize storage paths",
      "role": "content",
      "text": "When you install Redis Software to custom directories, you can specify custom storage paths for persistent and ephemeral storage during [cluster setup](https://redis.io/docs/latest/operate/rs/clusters/new-cluster-setup) or when [adding nodes](https://redis.io/docs/latest/operate/rs/clusters/add-node).\n\n\n1. Specify the custom file location with the `--var-dir` option when you install Redis Software:\n\n    [code example]\n\n2. Grant the `redislabs` user access to the custom directories:\n   [code example]\n\n3. Confirm the storage path is properly mounted:\n   [code example]\n\n4. Verify the directory exists and is accessible:\n   [code example]\n\nFor more information about storage requirements, see [Persistent and ephemeral node storage](https://redis.io/docs/latest/operate/rs/installing-upgrading/install/plan-deployment/persistent-ephemeral-storage)."
    },
    {
      "id": "limitations",
      "title": "Limitations",
      "role": "limits",
      "text": "Several Redis Software installation reference files are installed to the directory `/etc/opt/redislabs/` even if you use custom installation directories.\n\nAs a workaround to install Redis Software without using any root directories, do the following before installing Redis Software:\n\n1. Create all custom, non-root directories you want to use with Redis Software.\n\n1. Mount `/etc/opt/redislabs` to one of the custom, non-root directories."
    }
  ],
  "examples": [
    {
      "id": "specify-file-locations-ex0",
      "language": "sh",
      "code": "sudo ./install.sh --install-dir <path> --config-dir <path> --var-dir <path>",
      "section_id": "specify-file-locations"
    },
    {
      "id": "config-diff-data-log-dirs-ex0",
      "language": "sh",
      "code": "ln -s /var/opt/redislabs/data </path/to/data/mount/point>",
      "section_id": "config-diff-data-log-dirs"
    },
    {
      "id": "config-diff-data-log-dirs-ex1",
      "language": "sh",
      "code": "ln -s /var/opt/redislabs/log </path/to/log/mount/point>",
      "section_id": "config-diff-data-log-dirs"
    },
    {
      "id": "customize-storage-paths-ex0",
      "language": "sh",
      "code": "sudo ./install.sh --var-dir <path>",
      "section_id": "customize-storage-paths"
    },
    {
      "id": "customize-storage-paths-ex1",
      "language": "sh",
      "code": "$ sudo chown -R redislabs:redislabs /path/to/custom/storage\n   $ sudo chmod -R 755 /path/to/custom/storage",
      "section_id": "customize-storage-paths"
    },
    {
      "id": "customize-storage-paths-ex2",
      "language": "sh",
      "code": "$ df -h /path/to/custom/storage\n   $ mount | grep /path/to/custom/storage",
      "section_id": "customize-storage-paths"
    },
    {
      "id": "customize-storage-paths-ex3",
      "language": "sh",
      "code": "ls -l /path/to/custom/storage",
      "section_id": "customize-storage-paths"
    }
  ]
}
