{"id":498,"date":"2022-09-18T07:00:49","date_gmt":"2022-09-18T13:00:49","guid":{"rendered":"https:\/\/rewaant.com\/blog\/?p=498"},"modified":"2022-12-19T15:06:52","modified_gmt":"2022-12-19T22:06:52","slug":"hosting-ghost-on-ubuntu-or-debian","status":"publish","type":"post","link":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/","title":{"rendered":"Complete guide to hosting Ghost CMS on Ubuntu or Debian"},"content":{"rendered":"\n<h3 class=\"table-of-contents wp-block-heading\">Table of Contents<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"#overview\">Overview<\/a><\/li>\n\n\n\n<li><a href=\"#setting-up-vps\">Setting up your VPS<\/a><\/li>\n\n\n\n<li><a href=\"#updating-dns-records\">Updating DNS records to point the domain<\/a><\/li>\n\n\n\n<li><a href=\"#server-setup\">Setting up your server for serving Ghost<\/a><\/li>\n\n\n\n<li><a href=\"#setting-up-publication\">Setting up the publication and going live<\/a><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"overview\">Overview<\/h2>\n\n\n\n<p><a href=\"http:\/\/Ghost.org\" target=\"_blank\" rel=\"noreferrer noopener\">Ghost.org<\/a> is a modern, open-source CMS and a full-fledged publishing platform used by content creators, news outlets, businesses, bloggers, and professional publishers. There are many CMS options to choose from but one thing that differentiates Ghost from all the other solutions is an exceptional focus on being the most approachable publishing solution.<\/p>\n\n\n\n<p>While you can build almost anything with WordPress, Ghost\u2019s competency as a CMS which is primarily focused on content creation, publishing, and building your audience sets it apart in an ocean of platforms. Other attributes like embracing minimalism while also providing common tools for publishing such as newsletters and membership features out of the box and on top of it being open source gives it a serious edge and we suggest you give them serious consideration if those are your goals. Not to mention, these features may require plugins\/extensions and third-party solutions with alternatives.<\/p>\n\n\n\n<p>Another thing to mention is that Ghost is built on top of a modern tech stack using Node.js which makes it fast and snappy as compared to many alternatives. Safe to say your content will be in good hands.<\/p>\n\n\n\n<p>Ghost comes in two flavors:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ghost Pro: Think of this as being similar to <a href=\"http:\/\/WordPress.com\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.com<\/a>. We recommend visiting the official <a href=\"https:\/\/ghost.org\/pricing\/\" target=\"_blank\" rel=\"noreferrer noopener\">pricing page<\/a>, analyzing your requirements, calculating estimated costs, and reading the FAQs to see if this will be a good option. They don\u2019t offer a free plan but you can sign up with a 14-day free trial. However, we\u2019ll NOT be focusing on this offering in this guide.<\/li>\n\n\n\n<li>Self-hosting Ghost: Ghost is open source software which means you can use it as a self-hosted publishing platform (just like <a href=\"http:\/\/WordPress.org\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.org<\/a>) on your own server if you want complete control over your publication, have some cost constraints and you plan on using a cost-effective VPS or for any other reason. You lose official support and bear additional responsibilities of managing everything on your own with this option but the official community forums are generally helpful in case you need some help. This also gives you complete control.<\/li>\n<\/ol>\n\n\n\n<p>In this comprehensive guide, we\u2019ll try to help you set up an Ubuntu production server from scratch, configure an ideal production environment, set things up with your domain, and install Ghost to get started on serving your audience. You can also use DigitalOcean, AWS, GCP, or other cloud platforms as per your preference but the process varies from platform to platform.<\/p>\n\n\n\n<p>Let\u2019s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-up-vps\">Setting up your VPS<\/h2>\n\n\n\n<p>If you already have a VPS up and running, you can skip to the next section. For simplicity, we\u2019ll be using Linode in our reference material but the principles should apply to other cloud providers as well.<\/p>\n\n\n\n<p>Once you have signed in\/up on Linode, you\u2019ll see a screen similar to the one below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/1-1024x503.jpeg\" alt=\"\" class=\"wp-image-500\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/1-980x482.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/1-480x236.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Click on the &#8220;Create Linode&#8221;. This should take you to a detailed screen where you can customize an instance. We\u2019re using Ubuntu 22.04 LTS as our distribution, for most use cases we recommend you choose Ubuntu\u2019s latest LTS release. The region of choice should be closest to your or your ideal traffic location geographically. We\u2019re setting up a test server so we\u2019ll choose London.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/2-1024x503.jpeg\" alt=\"\" class=\"wp-image-502\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/2-980x481.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/2-480x236.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>For the plan, we\u2019re selecting &#8220;Shared CPU, Linode (4GB)&#8221; which goes for $20\/month. This should be more than enough for most individual publishers starting out with not much traffic.<\/p>\n\n\n\n<p>The label is just for your reference, set it as per your preference. You can skip the tags for now.<\/p>\n\n\n\n<p>Set a strong root password that you can remember or write it down somewhere. This is very important!<\/p>\n\n\n\n<p>SSH Keys are the recommended way to authenticate and administer your remote servers for multiple reasons. More on this later.<\/p>\n\n\n\n<p>Skip the VLAN section.<\/p>\n\n\n\n<p>We highly recommend choosing a backup plan, can\u2019t count how many times clients have reached out with bad news that their site\u2019s gone (wiped out) and they\u2019re looking for options to somehow retrieve all their lost efforts. Bad for them they didn\u2019t have backups in place.<\/p>\n\n\n\n<p>Backups in Linode are priced according to the plan you choose. In our case, it\u2019s $5\/month, for the $5\/month instance they go for $2\/month. Keep in mind the pricing included here is just for reference and as of the day, it\u2019s last updated. Please check the updated pricing on Linode\u2019s official pricing pages.<\/p>\n\n\n\n<p>You can skip the Private IP section for now.<\/p>\n\n\n\n<p>Review the summary, check the required checkboxes and hit &#8220;Create Linode&#8221;<\/p>\n\n\n\n<p>You should get a notification that your Linode is being created. Soon, the status should be changed to running and you should see a similar screen. Please note your instance\u2019s IP address and the ssh command as we\u2019ll need them in the next steps to set things up.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"539\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/3-1024x539.jpeg\" alt=\"\" class=\"wp-image-503\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/3-980x516.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/3-480x253.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"updating-dns-records\">Updating DNS records to point the domain<\/h2>\n\n\n\n<p>Before setting up the instance, we\u2019ll get the domain part out of the way. In our case, we\u2019ll be using this server for a Ghost publication reachable on a subdomain <a href=\"https:\/\/ghost.rewaant.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/ghost.rewaant.com<\/a><\/p>\n\n\n\n<p>We use Cloudflare, adding\/updating records for your domain might vary depending on the platform you use for managing the domain\u2019s nameservers.<\/p>\n\n\n\n<p>For the most part, you just need to add an A and a CNAME record for your Ghost publication to be accessible publicly.<\/p>\n\n\n\n<p>Add an <strong>A<\/strong> record with the following configuration:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>We\u2019re putting &#8220;<code>ghost<\/code>&#8220;in the Name field. If you\u2019re pointing the apex\/root domain to the server, use &#8220;@&#8221;. If your domain is <code>example.com<\/code>, use &#8220;@&#8221; in the Name field so <code>https:\/\/example.com<\/code> points to your publication.<\/li>\n\n\n\n<li>Put in the IPv4 address of your Ubuntu server. This is the IP address you noted down while creating the Linode instance. This will be your server\u2019s IP address if you already had a server setup and didn\u2019t follow the previous section.<\/li>\n\n\n\n<li>TTL field should be set to Auto, and hit &#8220;Save&#8221;.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1017\" height=\"157\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/4.jpeg\" alt=\"\" class=\"wp-image-504\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/4.jpeg 1017w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/4-980x151.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/4-480x74.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1017px, 100vw\" \/><\/figure>\n\n\n\n<p>Add a <strong>CNAME<\/strong> record with the following configuration:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>We\u2019re putting in <code>\"www.ghost<\/code>&#8221; in the Name field. If you\u2019re pointing the apex\/root domain, use &#8220;<code>www<\/code>&#8220;. If your domain is <code>example.com<\/code>, use &#8220;<code>www<\/code>&#8221; in the Name field so <code>https:\/\/www.example.com<\/code> points to your publication.<\/li>\n\n\n\n<li>We\u2019re putting &#8220;<code>ghost.rewaant.com<\/code>&#8221; in the Target field. We\u2019re doing this because we want all requests for &#8220;<a href=\"http:\/\/www.ghost.rewaant.com\" target=\"_blank\" rel=\"noreferrer noopener\"><code>www.ghost.rewaant.com<\/code><\/a>&#8221; to be resolved to <code>ghost.rewaant.com<\/code>. If your domain is <a href=\"http:\/\/example.com\" target=\"_blank\" rel=\"noreferrer noopener\"><code>example.com<\/code><\/a> use &#8220;<code>example.com<\/code>&#8221; in the Target field so all requests to &#8220;<a href=\"http:\/\/www.ghost.rewaant.com\" target=\"_blank\" rel=\"noreferrer noopener\"><code>www.example.com<\/code><\/a>&#8221; will be resolved to &#8220;<a href=\"http:\/\/www.ghost.rewaant.com\" target=\"_blank\" rel=\"noreferrer noopener\"><code>example.com<\/code><\/a>&#8220;.<\/li>\n\n\n\n<li>Hit &#8220;Save&#8221;.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"157\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/5.jpeg\" alt=\"\" class=\"wp-image-505\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/5.jpeg 1019w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/5-980x151.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/5-480x74.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1019px, 100vw\" \/><\/figure>\n\n\n\n<p>If this doesn\u2019t work as expected, or you\u2019re trying to set up a different structure, we recommend you follow a domain-specific guide or post your detailed issue directly in the comments section below.<\/p>\n\n\n\n<p>You can now ping your domain to check connectivity. That\u2019s it, we\u2019re good to go to the next step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"server-setup\">Setting up your server for serving Ghost<\/h2>\n\n\n\n<p>To connect to your VPS, you can either use a web console provided by most cloud providers or a terminal window on your computer. If you\u2019re using Linode, the web console is called LISH console (click \u201cLaunch LISH Console\u201d). You can also connect via a local terminal session using the ssh command directly on a terminal window. Important: If you\u2019re using Windows, you\u2019ll need to use a third-party software called Putty to connect to your instance. We\u2019ll post a guide on how to connect to an instance via SSH on Windows using Putty and PuttyGen.<\/p>\n\n\n\n<p>Once connected, you should see a window similar to the one below. Type in \u201cyes\u201d to continue, it\u2019ll then ask for the root password. Type in the root password you set while creating the instance.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/6-1024x588.png\" alt=\"\" class=\"wp-image-506\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/6-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/6-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/7-1024x588.png\" alt=\"\" class=\"wp-image-507\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/7-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/7-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>We\u2019ll start with performing system updates and securing our server. If you\u2019re setting up a production server, we highly recommend you set up key-based authentication and disable password-based authentication. We also recommend you do this before following the remaining steps of this guide. You can learn more about how to do this by following our concise guide: <a href=\"https:\/\/rewaant.com\/blog\/setup-ssh-keys-on-your-linux-server\/\">How to setup SSH keys on your Linux server<\/a><\/p>\n\n\n\n<p>To perform updates, type in the following commands:<\/p>\n\n\n\n<p>apt update &amp;&amp; apt upgrade \u2192 Once you run this command, you\u2019ll see a somewhat similar output. Type in Y to continue. This should take a little while to complete but should upgrade all the packages and libraries.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"2032\" height=\"1167\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/8-1024x588.png\" alt=\"\" class=\"wp-image-508\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/8-1024x588.png 2032w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/8-1280x735.png 1280w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/8-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/8-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) and (max-width: 1280px) 1280px, (min-width: 1281px) 2032px, 100vw\" \/><\/figure>\n\n\n\n<p>reboot \u2192 It\u2019s recommended to reboot after processing updates. Allow a minute or two and reconnect via SSH following steps 1 and 2.<\/p>\n\n\n\n<p>To set up the timezone, type in the following commands:<\/p>\n\n\n\n<p>dpkg-reconfigure tzdata \u2192 This should take you to the following screen, Choose the timezone with the up\/down arrow &amp; enter keys then use the tab key to navigate and hit \u201cOk\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/9-1024x588.png\" alt=\"\" class=\"wp-image-509\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/9-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/9-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/10-1024x588.png\" alt=\"\" class=\"wp-image-510\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/10-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/10-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>You should now get back to the console.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/11-1024x588.png\" alt=\"\" class=\"wp-image-511\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/11-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/11-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Before proceeding further, we recommend not using root for system administration. It\u2019s highly recommended to set up a new (less privileged) user for server administration. Type in the following commands to add a less privileged user:<\/p>\n\n\n\n<p><code>adduser *preferred_username*<\/code> \u2192 Type in your username in place of <code>*\u201cpreferred_username\u201d*<\/code>, we\u2019ll be using \u201c<code>rewaant<\/code>\u201d so the command becomes <code>adduser rewaant<\/code>. This will now ask for a new password, set a strong password. Type in the Full Name and skip the info for defaults that you don\u2019t want to populate. Type in <code>Y<\/code> to continue and your new user should be created.<\/p>\n\n\n\n<p>Type in <code>adduser *preferred_username* sudo<\/code> \u2192 Replace <code>*\u201cpreferred_username\u201d*<\/code> with your username. In our case, the command becomes <code>adduser rewaant sudo<\/code>. This command adds the new user to the sudo group which grants root privileges to the user when prefixed with <code>sudo<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/12-1024x588.png\" alt=\"\" class=\"wp-image-512\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/12-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/12-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Disconnect and reconnect using the ssh command replacing \u201croot\u201d with the new user. The updated ssh command becomes ssh <em>preferred_username<\/em>@<em>server_ip_address<\/em>. In our case, this becomes ssh rewaant@176.58.98.58. You should now be able to authenticate with the newly created user.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/13-1024x588.png\" alt=\"\" class=\"wp-image-513\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/13-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/13-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Next, we\u2019ll harden access through SSH and set up a firewall. Please follow our guide that explains how to do both here: <a href=\"https:\/\/rewaant.com\/blog\/hardening-ssh-on-your-linux-server\/\">Hardening SSH on your Linux server<\/a><\/p>\n\n\n\n<p>Now that we have a server setup, domain pointed, and our server secured, we can proceed to set up the stack and install ghost itself on the server. According to the official Ghost docs, we have the following prerequisites:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04 or Ubuntu 22.04 \u2192 Check<\/li>\n\n\n\n<li>NGINX (minimum of 1.9.5 for SSL)<\/li>\n\n\n\n<li>A&nbsp;<strong><a href=\"https:\/\/ghost.org\/docs\/faq\/node-versions\/\">supported version<\/a><\/strong>&nbsp;of&nbsp;<strong><a href=\"https:\/\/nodejs.org\/\">Node.js<\/a><\/strong><\/li>\n\n\n\n<li>MySQL 8<\/li>\n\n\n\n<li>Systemd \u2192 Check<\/li>\n\n\n\n<li>A server with at least 1GB memory \u2192 Check<\/li>\n\n\n\n<li>A registered domain name \u2192 Check<\/li>\n<\/ul>\n\n\n\n<p>We\u2019ll start with installing NGINX (Web Server), MySQL (Database Server), and the recent LTS version of Node.js. Execute the following commands:<\/p>\n\n\n\n<p>sudo apt-get install nginx \u2192 This will install Nginx. Also, make sure to allow ufw for HTTP and HTTPS connection with this command: sudo ufw allow &#8216;Nginx Full&#8217;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/14-1024x588.png\" alt=\"\" class=\"wp-image-514\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/14-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/14-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>sudo apt-get install mysql-server \u2192 This will install the MySQL database server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/15-1024x588.png\" alt=\"\" class=\"wp-image-515\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/15-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/15-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>curl -sL https:\/\/deb.nodesource.com\/setup_16.x | sudo -E bash \u2192 This will add the APT repo for Node 16 to the package manager&#8217;s sources.<\/p>\n\n\n\n<p>sudo apt-get install -y nodejs \u2192 This will install Node.js<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/16-1024x588.png\" alt=\"\" class=\"wp-image-517\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/16-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/16-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Next, we\u2019ll install the Ghost-CLI which is a command line utility to install and manage Ghost installations. Execute sudo npm install ghost-cli@latest -g \u2192 This will install the latest version of ghost-cli globally.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/17-1024x588.png\" alt=\"\" class=\"wp-image-518\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/17-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/17-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Before we install Ghost, it\u2019s highly recommended that you secure MySQL. We\u2019ll do it with the following commands:<\/p>\n\n\n\n<p><code>sudo mysql<\/code> \u2192 This will log you in to MySQL as root.<\/p>\n\n\n\n<p><code>ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by *'your_new_password'*;<\/code> \u2192 This will set a root password. Make sure to replace <code>*'your_new_password'<\/code>* with your password of choice and remember this for future reference or save\/write it down.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/18-1024x588.png\" alt=\"\" class=\"wp-image-519\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/18-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/18-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>Run sudo mysql_secure_installation. Type in the root password set in the previous step, type in \u201cNo\u201d for Validate Password Component, Type in \u201cNo\u201d for the prompt to change the root password, type in Y to remove anonymous users, type in Y to disallow root login remotely, type in Y to remove test database, type in Y to reload privilege tables now and hit Return. It should now output an \u201cAll done!\u201d message.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/19-1024x588.png\" alt=\"\" class=\"wp-image-520\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/19-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/19-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/20-1024x588.png\" alt=\"\" class=\"wp-image-521\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/20-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/20-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>We\u2019re now ready to install ghost. Execute the following commands:<\/p>\n\n\n\n<p><code>sudo mkdir -p \/var\/www\/*sitename*<\/code> \u2192 Creates a directory to host your site. In our case, this command becomes <code>sudo mkdir -p \/var\/www\/ghost.rewaant.com<\/code><\/p>\n\n\n\n<p><code>sudo chown *&lt;username&gt;*:*&lt;username&gt;* \/var\/www\/*sitename<\/code> \u2192* Changes the directory owner to our limited user. This helps us run the ghost install script. In our case, this command becomes <code>sudo chown rewaant:rewaant \/var\/www\/ghost.rewaant.com<\/code><\/p>\n\n\n\n<p><code>sudo chmod 775 \/var\/www\/ghost.rewaant.com<\/code> \u2192 Sets the proper directory permissions.<\/p>\n\n\n\n<p><code>cd \/var\/www\/ghost.rewaant.com<\/code> \u2192 Navigates to the target installation directory.<\/p>\n\n\n\n<p><code>ghost install<\/code> \u2192 Starts the installation process. It\u2019ll now prompt you for more details:<\/p>\n\n\n\n<p>Blog URL \u2192 Type in your blog\u2019s URL. In our case, this becomes <code>https:\/\/ghost.rewaant.com<\/code><\/p>\n\n\n\n<p>MySQL hostname \u2192 Leave this to default (\u201dlocalhost\u201d) and press return\/enter.<\/p>\n\n\n\n<p>MySQL username \u2192 Type in <code>root<\/code> and supply the root password you set earlier.<\/p>\n\n\n\n<p>Ghost database name \u2192 Enter a database name, for us we used the default <code>ghost_rewaant_com_prod<\/code><\/p>\n\n\n\n<p>Do you wish to set up \u201cghost\u201d mysql user? \u2192 Highly recommended, press <code>Y<\/code><\/p>\n\n\n\n<p>Do you wish to setup \u201cNginx\u201d? \u2192 Press <code>Y<\/code><\/p>\n\n\n\n<p>Do you wish to setup SSL? \u2192 This install LetsEncrypt SSL certificates on your instance. We again recommend doing this. Keep in mind for this to work, your domain records should already be set to point to this server. Press <code>Y<\/code> <strong>Important<\/strong>: If you\u2019re using Cloudflare or your domain service proxies the domain\u2019s IP addresses, this will most likely not work. You\u2019ll have to stop proxying the domain to verify the ownership. Once they\u2019re verified, you can switch them back to being proxied. Please Ignore if your nameservers don&#8217;t proxy requests to your domain.<\/p>\n\n\n\n<p>Type in your email if you chose Y in the previous step.<\/p>\n\n\n\n<p>Do you wish to setup Systemd? \u2192 Press <code>Y<\/code> . This will register your ghost publication as a systemd service which automatically starts on reboot. Highly recommended.<\/p>\n\n\n\n<p>Do you want to start Ghost? \u2192 Press <code>Y<\/code>. This should start Ghost and it should be accessible at your chosen URL. In our case <code>https:\/\/ghost.rewaant.com<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"588\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/21-1024x588.png\" alt=\"\" class=\"wp-image-522\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/21-980x563.png 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/21-480x276.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>You now have your production server ready. We can disconnect now by typing in exit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"745\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/22-1024x745.jpeg\" alt=\"\" class=\"wp-image-523\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/22-980x713.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/22-480x349.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p>If at any point the setup fails, you can try ghost setup to re-run the configuration process or reinstall with ghost uninstall and ghost install<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"setting-up-publication\">Setting up the publication and going live<\/h2>\n\n\n\n<p>To set up the publication, visit <a href=\"https:\/\/your_blog_url\/ghost\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/your_blog_url\/ghost<\/a>. In our case, it\u2019s https:\/\/ghost.rewaant.com\/ghost<\/p>\n\n\n\n<p>You\u2019re now successfully serving a self-hosted Ghost Publication.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/23-1024x503.jpeg\" alt=\"\" class=\"wp-image-524\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/23-980x482.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/23-480x236.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"503\" src=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/24-1024x503.jpeg\" alt=\"\" class=\"wp-image-525\" srcset=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/24-980x482.jpeg 980w, https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/24-480x236.jpeg 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been thinking about setting up and self-hosting your own Ghost CMS blog or publication, you&#8217;ve come to the right place.<\/p>\n<p>In this guide, we take you step by step to setting up your own server, securing and taking Ghost live on your domain.<\/p>\n","protected":false},"author":1,"featured_media":674,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"categories":[12,14,11,13],"tags":[],"class_list":["post-498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-hosting","category-cms","category-ghost","category-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits\" \/>\n<meta property=\"og:description\" content=\"If you&#039;ve been thinking about setting up and self-hosting your own Ghost CMS blog or publication, you&#039;ve come to the right place. In this guide, we take you step by step to setting up your own server, securing and taking Ghost live on your domain.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/\" \/>\n<meta property=\"og:site_name\" content=\"Rewaant | Blog | Web &amp; Mobile Dev Tidbits\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-18T13:00:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-19T22:06:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"588\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Rewaant Chhabra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rewaantllc\" \/>\n<meta name=\"twitter:site\" content=\"@rewaantllc\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rewaant Chhabra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/\"},\"author\":{\"name\":\"Rewaant Chhabra\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#\\\/schema\\\/person\\\/ba855e29fc3aef528547d8cc5d574754\"},\"headline\":\"Complete guide to hosting Ghost CMS on Ubuntu or Debian\",\"datePublished\":\"2022-09-18T13:00:49+00:00\",\"dateModified\":\"2022-12-19T22:06:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/\"},\"wordCount\":2396,\"publisher\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/hosting_ghost_cms_on_ubuntu_debian.png\",\"articleSection\":[\"Cloud Hosting\",\"CMS\",\"Ghost\",\"Hosting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/\",\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/\",\"name\":\"Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/hosting_ghost_cms_on_ubuntu_debian.png\",\"datePublished\":\"2022-09-18T13:00:49+00:00\",\"dateModified\":\"2022-12-19T22:06:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#primaryimage\",\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/hosting_ghost_cms_on_ubuntu_debian.png\",\"contentUrl\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/hosting_ghost_cms_on_ubuntu_debian.png\",\"width\":1024,\"height\":588},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/hosting-ghost-on-ubuntu-or-debian\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Complete guide to hosting Ghost CMS on Ubuntu or Debian\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/\",\"name\":\"Rewaant | Blog | Web &amp; Mobile Dev Tidbits\",\"description\":\"Web &amp; Mobile Dev Tidbits\",\"publisher\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#organization\",\"name\":\"Rewaant | Blog | Web &amp; Mobile Dev Tidbits\",\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/rewaant_logo.png\",\"contentUrl\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/rewaant_logo.png\",\"width\":544,\"height\":544,\"caption\":\"Rewaant | Blog | Web &amp; Mobile Dev Tidbits\"},\"image\":{\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/rewaantllc\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/rewaantllc\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/#\\\/schema\\\/person\\\/ba855e29fc3aef528547d8cc5d574754\",\"name\":\"Rewaant Chhabra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g\",\"caption\":\"Rewaant Chhabra\"},\"sameAs\":[\"https:\\\/\\\/rewaant.com\\\/blog\"],\"url\":\"https:\\\/\\\/rewaant.com\\\/blog\\\/author\\\/rewaant\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits","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:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/","og_locale":"en_US","og_type":"article","og_title":"Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits","og_description":"If you've been thinking about setting up and self-hosting your own Ghost CMS blog or publication, you've come to the right place. In this guide, we take you step by step to setting up your own server, securing and taking Ghost live on your domain.","og_url":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/","og_site_name":"Rewaant | Blog | Web &amp; Mobile Dev Tidbits","article_published_time":"2022-09-18T13:00:49+00:00","article_modified_time":"2022-12-19T22:06:52+00:00","og_image":[{"width":1024,"height":588,"url":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png","type":"image\/png"}],"author":"Rewaant Chhabra","twitter_card":"summary_large_image","twitter_creator":"@rewaantllc","twitter_site":"@rewaantllc","twitter_misc":{"Written by":"Rewaant Chhabra","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#article","isPartOf":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/"},"author":{"name":"Rewaant Chhabra","@id":"https:\/\/rewaant.com\/blog\/#\/schema\/person\/ba855e29fc3aef528547d8cc5d574754"},"headline":"Complete guide to hosting Ghost CMS on Ubuntu or Debian","datePublished":"2022-09-18T13:00:49+00:00","dateModified":"2022-12-19T22:06:52+00:00","mainEntityOfPage":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/"},"wordCount":2396,"publisher":{"@id":"https:\/\/rewaant.com\/blog\/#organization"},"image":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png","articleSection":["Cloud Hosting","CMS","Ghost","Hosting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/","url":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/","name":"Complete guide to hosting Ghost CMS on Ubuntu or Debian - Rewaant | Blog | Web &amp; Mobile Dev Tidbits","isPartOf":{"@id":"https:\/\/rewaant.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#primaryimage"},"image":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png","datePublished":"2022-09-18T13:00:49+00:00","dateModified":"2022-12-19T22:06:52+00:00","breadcrumb":{"@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#primaryimage","url":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png","contentUrl":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2022\/09\/hosting_ghost_cms_on_ubuntu_debian.png","width":1024,"height":588},{"@type":"BreadcrumbList","@id":"https:\/\/rewaant.com\/blog\/hosting-ghost-on-ubuntu-or-debian\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rewaant.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Complete guide to hosting Ghost CMS on Ubuntu or Debian"}]},{"@type":"WebSite","@id":"https:\/\/rewaant.com\/blog\/#website","url":"https:\/\/rewaant.com\/blog\/","name":"Rewaant | Blog | Web &amp; Mobile Dev Tidbits","description":"Web &amp; Mobile Dev Tidbits","publisher":{"@id":"https:\/\/rewaant.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rewaant.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rewaant.com\/blog\/#organization","name":"Rewaant | Blog | Web &amp; Mobile Dev Tidbits","url":"https:\/\/rewaant.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rewaant.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2021\/09\/rewaant_logo.png","contentUrl":"https:\/\/rewaant.com\/blog\/wp-content\/uploads\/2021\/09\/rewaant_logo.png","width":544,"height":544,"caption":"Rewaant | Blog | Web &amp; Mobile Dev Tidbits"},"image":{"@id":"https:\/\/rewaant.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/rewaantllc","https:\/\/www.linkedin.com\/company\/rewaantllc\/"]},{"@type":"Person","@id":"https:\/\/rewaant.com\/blog\/#\/schema\/person\/ba855e29fc3aef528547d8cc5d574754","name":"Rewaant Chhabra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0645ed92498626e9f50d57143ac2213945fe137a73a9885e4f7e7199015b8bf?s=96&d=mm&r=g","caption":"Rewaant Chhabra"},"sameAs":["https:\/\/rewaant.com\/blog"],"url":"https:\/\/rewaant.com\/blog\/author\/rewaant\/"}]}},"_links":{"self":[{"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/posts\/498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/comments?post=498"}],"version-history":[{"count":15,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/posts\/498\/revisions"}],"predecessor-version":[{"id":816,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/posts\/498\/revisions\/816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/media\/674"}],"wp:attachment":[{"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/media?parent=498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/categories?post=498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rewaant.com\/blog\/wp-json\/wp\/v2\/tags?post=498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}