{"id":8755,"date":"2023-06-30T09:18:12","date_gmt":"2023-06-30T09:18:12","guid":{"rendered":"https:\/\/truehost.com\/support\/?p=8755"},"modified":"2024-06-07T12:37:59","modified_gmt":"2024-06-07T12:37:59","slug":"how-to-install-free-ssl-on-a-vps-using-certbot","status":"publish","type":"post","link":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/","title":{"rendered":"How To Install Free SSL On A VPS Using Certbot"},"content":{"rendered":"\n<p>Are you looking to install a free Let&#8217;s Encrypt SSL on your VPS operating system? Don&#8217;t worry, we&#8217;ve got you covered. Follow these simple steps:<\/p>\n\n\n\n<p>Step 1 &#8211; Prepare the VPS<\/p>\n\n\n\n<p>Before we <a href=\"https:\/\/truehost.com\/support\/ssl-installation\/\" target=\"_blank\" rel=\"noreferrer noopener\">begin installing the SSL<\/a>, let&#8217;s make sure your VPS meets the following criteria:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Your VPS should have a web server running, such as Apache or NGINX.<\/li><li>The website hosted on your VPS should be accessible via the domain name and not just the IP address.<\/li><li>Ensure that your domain is fully propagated and pointing to your VPS child nameservers. Installing an SSL while the domain is still propagating may result in a self-signed certificate, causing potential errors when accessing your website.<\/li><\/ul>\n\n\n\n<p>Step 2 &#8211; Install Dependencies<\/p>\n\n\n\n<p>Certbot, the tool we&#8217;ll be using, recommends using Snapd for installation. However, since Hostinger Linux-based VPS doesn&#8217;t support snaps, we&#8217;ll use Python instead. Here&#8217;s what you need to do:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/truehost.com\/support\/how-to-connect-to-vps-via-ssh\/\" target=\"_blank\" rel=\"noreferrer noopener\">Connect to your VPS using SSH.<\/a><\/li><li>Install the necessary dependencies (Python 3.6+, venv, and Augeas) based on your operating system.<\/li><\/ul>\n\n\n\n<p>For APT-based distributions (Debian, Ubuntu):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo apt updatesudo apt install python3 python3-venv libaugeas0<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>For RPM-based distributions (Fedora, CentOS):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo dnf install python3 augeas-libs<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Please note:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If you&#8217;re using an older distribution without dnf, use yum instead.<\/li><li>Some RHEL-based distributions may require python3x instead of python3 (e.g., python38). Please refer to your Linux distribution&#8217;s documentation for specifics.<\/li><\/ul>\n\n\n\n<p>Step 3 &#8211; Install Certbot<\/p>\n\n\n\n<p>To avoid conflicts with previous versions, remove any existing Certbot packages before installing the latest version. You can use your package manager (apt, dnf, yum, etc.) for this task.<\/p>\n\n\n\n<p>Once you&#8217;ve cleared the way, follow these steps:<\/p>\n\n\n\n<p>1. Set up a Python virtual environment:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo python3 -m venv \/opt\/certbot\/sudo \/opt\/certbot\/bin\/pip install &#8211;upgrade pip<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>2. Install Certbot for Apache:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo \/opt\/certbot\/bin\/pip install certbot certbot-apache<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Or install Certbot for NGINX:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo \/opt\/certbot\/bin\/pip install certbot certbot-nginx<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>3. Create a symbolic link for easy execution:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo ln -s \/opt\/certbot\/bin\/certbot \/usr\/bin\/certbot<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>4. Install and activate SSL for your websites. Let Certbot handle the configurations automatically. Use the following command for Apache:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo certbot &#8211;apache<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Or use this command for NGINX:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">sudo certbot &#8211;nginx<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Note:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If you prefer obtaining only the certificates and configuring the SSL manually, add &#8220;certonly&#8221; after certbot and before &#8211;apache or &#8211;nginx.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>To ensure your SSL remains valid beyond the initial 90-day period, we recommend setting up automatic renewal. Execute the following command:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th scope=\"col\">echo 0 0,12 * * * root \/opt\/certbot\/bin\/python -c &#8216;import random; import time; time.sleep(random.random() * 3600)&#8217; &amp;&amp; sudo certbot renew -q | sudo tee -a \/etc\/crontab &gt; \/dev\/null<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>That&#8217;s it! You can now open your website in an incognito window to verify that the SSL is installed and functioning correctly<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking to install a free Let&#8217;s Encrypt SSL on your VPS operating system? Don&#8217;t worry, we&#8217;ve got you covered. Follow these simple steps: Step 1 &#8211; Prepare the VPS Before we begin installing the SSL, let&#8217;s make sure your VPS meets the following criteria: Your VPS should have a web server running, such [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[257],"tags":[],"class_list":["post-8755","post","type-post","status-publish","format-standard","hentry","category-emails"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Install Free SSL On A VPS Using Certbot -<\/title>\n<meta name=\"description\" content=\"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install Free SSL On A VPS Using Certbot -\" \/>\n<meta property=\"og:description\" content=\"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-30T09:18:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-07T12:37:59+00:00\" \/>\n<meta name=\"author\" content=\"kt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/\"},\"author\":{\"name\":\"kt\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/person\\\/13b0dca8f0a4699018d92ad9869668c8\"},\"headline\":\"How To Install Free SSL On A VPS Using Certbot\",\"datePublished\":\"2023-06-30T09:18:12+00:00\",\"dateModified\":\"2024-06-07T12:37:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/\"},\"wordCount\":474,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"articleSection\":[\"Emails\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/\",\"name\":\"How To Install Free SSL On A VPS Using Certbot -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\"},\"datePublished\":\"2023-06-30T09:18:12+00:00\",\"dateModified\":\"2024-06-07T12:37:59+00:00\",\"description\":\"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/how-to-install-free-ssl-on-a-vps-using-certbot\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install Free SSL On A VPS Using Certbot\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/#\\\/schema\\\/person\\\/13b0dca8f0a4699018d92ad9869668c8\",\"name\":\"kt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g\",\"caption\":\"kt\"},\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/author\\\/truehost\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install Free SSL On A VPS Using Certbot -","description":"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!","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:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Free SSL On A VPS Using Certbot -","og_description":"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!","og_url":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/","article_published_time":"2023-06-30T09:18:12+00:00","article_modified_time":"2024-06-07T12:37:59+00:00","author":"kt","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kt","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/#article","isPartOf":{"@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/"},"author":{"name":"kt","@id":"https:\/\/truehost.com\/support\/#\/schema\/person\/13b0dca8f0a4699018d92ad9869668c8"},"headline":"How To Install Free SSL On A VPS Using Certbot","datePublished":"2023-06-30T09:18:12+00:00","dateModified":"2024-06-07T12:37:59+00:00","mainEntityOfPage":{"@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/"},"wordCount":474,"commentCount":0,"publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"articleSection":["Emails"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/","url":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/","name":"How To Install Free SSL On A VPS Using Certbot -","isPartOf":{"@id":"https:\/\/truehost.com\/support\/#website"},"datePublished":"2023-06-30T09:18:12+00:00","dateModified":"2024-06-07T12:37:59+00:00","description":"Secure your VPS with free SSL quickly and easily using Certbot. Learn how to install it in this step-by-step guide - get started now!","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/how-to-install-free-ssl-on-a-vps-using-certbot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How To Install Free SSL On A VPS Using Certbot"}]},{"@type":"WebSite","@id":"https:\/\/truehost.com\/support\/#website","url":"https:\/\/truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/truehost.com\/support\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/truehost.com\/support\/#\/schema\/person\/13b0dca8f0a4699018d92ad9869668c8","name":"kt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b15c3006fe3bf174dea56e93ccc38a5ca0aa2f465be4368c6e1dc5fe306f971a?s=96&r=g","caption":"kt"},"url":"https:\/\/truehost.com\/support\/author\/truehost\/"}]}},"_links":{"self":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/posts\/8755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/comments?post=8755"}],"version-history":[{"count":2,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/posts\/8755\/revisions"}],"predecessor-version":[{"id":8760,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/posts\/8755\/revisions\/8760"}],"wp:attachment":[{"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/media?parent=8755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/categories?post=8755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truehost.com\/support\/wp-json\/wp\/v2\/tags?post=8755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}