{"id":39202,"date":"2021-10-20T12:30:00","date_gmt":"2021-10-20T17:30:00","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=39202"},"modified":"2022-06-03T03:31:30","modified_gmt":"2022-06-03T08:31:30","slug":"how-to-install-and-secure-redis-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/","title":{"rendered":"How to Install and Secure Redis on Ubuntu 20.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"742\" height=\"372\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg\" alt=\"how to install and secure redis on ubuntu 20.04\" class=\"wp-image-39279\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04-300x150.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04-150x75.jpg 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<p>Redis (short for Remote Dictionary Server), is an open-source in-memory data structure store. It\u2019s used as a flexible, highly available key-value database that maintains a high level of performance.&nbsp; It helps to reduce time delays and increase the performance of your application by accessing in microseconds.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/install-and-secure-redis-on-ubuntu-20.04.jpg\" alt=\"\" class=\"wp-image-39280\" width=\"162\" height=\"162\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/install-and-secure-redis-on-ubuntu-20.04.jpg 400w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/install-and-secure-redis-on-ubuntu-20.04-300x300.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/install-and-secure-redis-on-ubuntu-20.04-150x150.jpg 150w\" sizes=\"(max-width: 162px) 100vw, 162px\" \/><\/figure><\/div>\n\n\n\n<p>One of the best features of Redis is the huge range of data types or data structures that it supports, such as Strings, Hashes, Lists, Sets, and more. Redis is written in the C programming language. In this tutorial, We will show you how to install and secure Redis Server on Ubuntu 20.04.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f13ece72adf\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f13ece72adf\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#Requirements\" >Requirements:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#1-Log-in-to-the-Server-Update-the-Server-OS-Packages\" >1: Log in to the Server &amp; Update the Server OS Packages<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#2-Install-Redis-on-Ubuntu-2004\" >2. Install Redis on Ubuntu 20.04<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#3-Check-Redis-Version\" >3. Check Redis Version<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#4-How-to-configure-Redis-server\" >4. How to configure Redis server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#5-Check-Redis-Connection\" >5. Check Redis Connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#6-Managing-the-Redis-Service\" >6: Managing the Redis Service<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#7-How-to-Secure-Redis\" >7. How to Secure Redis<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-requirements\"><span class=\"ez-toc-section\" id=\"Requirements\"><\/span><strong>Requirements:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>For the purposes of this tutorial, we will use an <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu20.04 VPS<\/a>.<\/li><li>Access to the root user account (or a user with sudo privileges)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-log-in-to-the-server-update-the-server-os-packages\"><span class=\"ez-toc-section\" id=\"1-Log-in-to-the-Server-Update-the-Server-OS-Packages\"><\/span>1: Log in to the Server &amp; Update the Server OS Packages<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>First, log in to your Ubuntu 20.04 server via SSH as the root user:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\n\n\n\n<p>Don\u2019t forget to replace <strong>IP_Address<\/strong> and <strong>Port_Number<\/strong> with your server\u2019s actual IP address and the SSH port number. Also, you should replace \u2018root\u2019 with the username of the admin account if needed.<\/p>\n\n\n\n<p>Once you are in, run the following commands to update the package index and upgrade all installed packages to the latest available version<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get update \nsudo apt-get upgrade<\/pre>\n\n\n\n<p>Once the upgrades are completed, we can move on to the next step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-install-redis-on-ubuntu-20-04\"><span class=\"ez-toc-section\" id=\"2-Install-Redis-on-Ubuntu-2004\"><\/span>2. Install Redis on Ubuntu 20.04<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>When an update is completed, you will download and install it from the official Ubuntu repositories. Redis version 5.0.x is included by default on Ubuntu 20.04 repositories.<\/p>\n\n\n\n<p>Run the following command to install Redis on your server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-get install redis-server<\/pre>\n\n\n\n<p>With this command, you will also download and install all the required dependencies.<\/p>\n\n\n\n<p>Once the installation is completed, the Redis service will start automatically. To check and verify the status of your Redis service, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status redis-server<\/pre>\n\n\n\n<p>You should receive the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u25cf redis-server.service - Advanced key-value store\nLoaded: loaded (\/lib\/systemd\/system\/redis-server.service; enabled; vendor preset: enabled)\nActive: active (running) since Sat 2021-09-25 11:01:30 UTC; 12min ago\nDocs: http:\/\/redis.io\/documentation,\nman:redis-server(1)\nMain PID: 199086 (redis-server)\nTasks: 4 (limit: 2279)\nMemory: 2.0M\nCGroup: \/system.slice\/redis-server.service\n\u2514\u2500199086 \/usr\/bin\/redis-server 127.0.0.1:6379<\/pre>\n\n\n\n<p>The default port of Redis is <code>6379<\/code> and IP <code>127.0.0.1<\/code> is localhost.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-check-redis-version\"><span class=\"ez-toc-section\" id=\"3-Check-Redis-Version\"><\/span>3. Check Redis Version<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can check the Redis version using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ redis-cli -v<\/pre>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">redis-cli 5.0.7<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-4-how-to-configure-redis-server\"><span class=\"ez-toc-section\" id=\"4-How-to-configure-Redis-server\"><\/span>4. How to configure Redis server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Redis can start without a configuration file using a built-in default configuration. Now you need to make one important configuration change in Redis. Open the Redis config, <code>redis.conf<\/code> with your favorite editor. We will use nano. You are free to use any other text editor if you prefer:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/redis\/redis.conf<\/pre>\n\n\n\n<p>You need to find a <em>supervised<\/em> directive. By default, this line is set to <code>no<\/code>. However, to manage Redis as a service you will change it to <code>systemd<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># If you run Redis from upstart or systemd, Redis can interact with your\n# supervision tree. Options:\n# supervised no - no supervision interaction\n# supervised upstart - signal upstart by putting Redis into SIGSTOP mode\n# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET\n# supervised auto - detect upstart or systemd method based on\n# UPSTART_JOB or NOTIFY_SOCKET environment variables\n# Note: these supervision methods only signal \"process is ready.\"\n# They do not enable continuous liveness pings back to your supervisor.\nsupervised systemd<\/pre>\n\n\n\n<p>To make Redis aware of this, you need to restart it with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart redis-server<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-5-check-redis-connection\"><span class=\"ez-toc-section\" id=\"5-Check-Redis-Connection\"><\/span>5. Check Redis Connection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You also need to verify the connection with the Redis server using the <strong>redis-cli<\/strong> tool. To connect with this command-line client, enter the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">redis-cli<\/pre>\n\n\n\n<p>To test the connectivity, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ping<\/pre>\n\n\n\n<p>The output should respond with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">PONG<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-6-managing-the-redis-service\"><span class=\"ez-toc-section\" id=\"6-Managing-the-Redis-Service\"><\/span>6: Managing the Redis Service<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To <strong>stop<\/strong> your service, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl stop redis-server<\/pre>\n\n\n\n<p>To <strong>start<\/strong> your service, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start redis-server<\/pre>\n\n\n\n<p>To <strong>enable<\/strong> your service, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable redis-server<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-7-how-to-secure-redis\"><span class=\"ez-toc-section\" id=\"7-How-to-Secure-Redis\"><\/span>7. How to Secure Redis<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Redis includes an authentication feature as an additional security layer. The feature is not enabled by default. To enable the password authentication, open the Redis configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/etc\/redis\/redis.conf<\/pre>\n\n\n\n<p>Scrolling through the file, there will be a section called <em>SECURITY<\/em> , where this entry will be shown:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># requirepass foobared<\/pre>\n\n\n\n<p>and replace <code>foobared<\/code> with the password of your choice.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">requirepass your_strong_password<\/pre>\n\n\n\n<p><strong>Note:<\/strong> Do not forget to uncomment and change <code>your_strong_password<\/code> with your strong password.<\/p>\n\n\n\n<p>And restart the Redis service for the changes to take effect.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl restart redis.service<\/pre>\n\n\n\n<p>Now the password authentication for Redis has been enabled.<\/p>\n\n\n\n<p>To test that the password works, open up the Redis client:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">redis-cli<\/pre>\n\n\n\n<p>Once you&#8217;re connected to the server, try the ping with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ping \"hello world\"<\/pre>\n\n\n\n<p>Now you will get the result as below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"550\" height=\"49\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-and-securing-redis-on-ubuntu-20.04.jpg\" alt=\"installing and securing redis on ubuntu 20.04\" class=\"wp-image-39281\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-and-securing-redis-on-ubuntu-20.04.jpg 550w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-and-securing-redis-on-ubuntu-20.04-300x27.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installing-and-securing-redis-on-ubuntu-20.04-150x13.jpg 150w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p>To authenticate, just use the <em>auth<\/em> command, as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">auth your_strong_password<\/pre>\n\n\n\n<p>Below is the result after you&#8217;re authenticated to the Redis Server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"550\" height=\"93\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-and-securing-redus-on-an-ubuntu-20.04.jpg\" alt=\"installation and securing redus on an ubuntu 20.04\" class=\"wp-image-39282\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-and-securing-redus-on-an-ubuntu-20.04.jpg 550w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-and-securing-redus-on-an-ubuntu-20.04-300x51.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/installation-and-securing-redus-on-an-ubuntu-20.04-150x25.jpg 150w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/figure>\n\n\n\n<p>That\u2019s it! The installation of Redis Server on Ubuntu 20.04 has been completed, and the basic security for Redis Server has been applied.<\/p>\n\n\n\n<p>Of course, you don\u2019t need to install and secure Redis on Ubuntu 20.04 yourself if you use one of our fully managed <strong><a href=\"https:\/\/www.rosehosting.com\/linux-vps-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">VPS Hosting<\/a><\/strong> services, in which case you can simply ask our expert Linux admins to install and secure it for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-1024x851.png?v=1633956686\" alt=\"how to install redis on an ubuntu 20.04\" class=\"wp-image-39283\" width=\"159\" height=\"131\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-1024x851.png 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-300x249.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-150x125.png 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-768x639.png 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04-1320x1098.png 1320w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-redis-on-an-ubuntu-20.04.png 1323w\" sizes=\"(max-width: 159px) 100vw, 159px\" \/><\/figure><\/div>\n\n\n\n<p>P.S. If you liked this post on how to install and secure Redis on Ubuntu 20.04 please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Redis (short for Remote Dictionary Server), is an open-source in-memory data structure store. It\u2019s used as a flexible, highly available &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install and Secure Redis on Ubuntu 20.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#more-39202\" aria-label=\"Read more about How to Install and Secure Redis on Ubuntu 20.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":39279,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[1603,433,1839],"class_list":["post-39202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-how-to-install","tag-redis","tag-ubuntu-20-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting\" \/>\n<meta property=\"og:description\" content=\"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-20T17:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:31:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg?v=1633950364\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting\" \/>\n<meta name=\"twitter:description\" content=\"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install and Secure Redis on Ubuntu 20.04\",\"datePublished\":\"2021-10-20T17:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/\"},\"wordCount\":763,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg\",\"keywords\":[\"how to install\",\"redis\",\"Ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/\",\"name\":\"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg\",\"datePublished\":\"2021-10-20T17:30:00+00:00\",\"dateModified\":\"2022-06-03T08:31:30+00:00\",\"description\":\"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install and secure redis on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-secure-redis-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install and Secure Redis on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting","description":"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting","og_description":"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2021-10-20T17:30:00+00:00","article_modified_time":"2022-06-03T08:31:30+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg?v=1633950364","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting","twitter_description":"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install and Secure Redis on Ubuntu 20.04","datePublished":"2021-10-20T17:30:00+00:00","dateModified":"2022-06-03T08:31:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/"},"wordCount":763,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg","keywords":["how to install","redis","Ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/","name":"How to Install and Secure Redis on Ubuntu 20.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg","datePublished":"2021-10-20T17:30:00+00:00","dateModified":"2022-06-03T08:31:30+00:00","description":"In this guide, you will learn how to install and secure Redis on Ubuntu 20.04. Redis supports different kinds of abstract data structures.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2021\/10\/how-to-install-and-secure-redis-on-ubuntu-20.04.jpg","width":742,"height":372,"caption":"how to install and secure redis on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-secure-redis-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install and Secure Redis on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=39202"}],"version-history":[{"count":6,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39202\/revisions"}],"predecessor-version":[{"id":39284,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/39202\/revisions\/39284"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/39279"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=39202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=39202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=39202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}