<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Get Eccentric | Priyansh Kothari]]></title><description><![CDATA[A place to compile the tips and tricks that I learnt and share it with all eccentric individuals out there.]]></description><link>https://priyan.sh/</link><image><url>https://priyan.sh/favicon.png</url><title>Get Eccentric | Priyansh Kothari</title><link>https://priyan.sh/</link></image><generator>Ghost 4.48</generator><lastBuildDate>Tue, 07 Apr 2026 12:40:55 GMT</lastBuildDate><atom:link href="https://priyan.sh/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[How I Opened a US LLC from India for Stripe]]></title><description><![CDATA[<p>I have always wanted to open a US LLC to receive payments. If you work or sell anything online, you know that collecting and receiving payments in India from abroad is extremely difficult.<br><br>First, you go about getting registered on PayPal as a business as that is the only way</p>]]></description><link>https://priyan.sh/how-i-opened-a-us-based-llc-from-india/</link><guid isPermaLink="false">6554d12868ec0603767a53bc</guid><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Mon, 20 Nov 2023 07:49:18 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1560179707-f14e90ef3623?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDV8fGNvbXBhbnl8ZW58MHx8fHwxNzAwMDU3Mzc1fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1560179707-f14e90ef3623?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDV8fGNvbXBhbnl8ZW58MHx8fHwxNzAwMDU3Mzc1fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="How I Opened a US LLC from India for Stripe"><p>I have always wanted to open a US LLC to receive payments. If you work or sell anything online, you know that collecting and receiving payments in India from abroad is extremely difficult.<br><br>First, you go about getting registered on PayPal as a business as that is the only way to receive payments. Then you find out you can&apos;t hold money and it will get transferred automatically. Then you head on to Stripe and find out you can only register as Sole Proprietorship to receive international payments and you need an IEC to actually start receiving the payments. But I did all that. It was simpler than setting up a US LLC or so I thought then.<br><br>I had that all set up for the past decade. It was March of 2023 when I started having issues with PayPal. Stripe was working great, but due to Indian laws, I had to collect the names and addresses of each of my clients even though I sell services that are delivered completely online. Making the customer fill 12 lines of personal information for a simple service that does not require a thing might have spooked so many people who do not complete checkout. Eventually, my IEC expired as well and that was the last straw.</p><figure class="kg-card kg-image-card"><img src="https://images.unsplash.com/photo-1561404113-ef1f67f6b0a0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHBhdHJpb3R8ZW58MHx8fHwxNzAwMDU4MjA3fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" class="kg-image" alt="How I Opened a US LLC from India for Stripe" loading="lazy" width="5006" height="3337" srcset="https://images.unsplash.com/photo-1561404113-ef1f67f6b0a0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHBhdHJpb3R8ZW58MHx8fHwxNzAwMDU4MjA3fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=600 600w, https://images.unsplash.com/photo-1561404113-ef1f67f6b0a0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHBhdHJpb3R8ZW58MHx8fHwxNzAwMDU4MjA3fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1000 1000w, https://images.unsplash.com/photo-1561404113-ef1f67f6b0a0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHBhdHJpb3R8ZW58MHx8fHwxNzAwMDU4MjA3fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1600 1600w, https://images.unsplash.com/photo-1561404113-ef1f67f6b0a0?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDF8fHBhdHJpb3R8ZW58MHx8fHwxNzAwMDU4MjA3fDA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2400 2400w" sizes="(min-width: 720px) 720px"></figure><p>There is a lot of noise on the internet about how to open an LLC, with a lot of people saying conflicting things. It was looking very complicated for an average person. After plenty of research, I dived in to actually start doing things.</p><p>You need 3 things to actually start receiving payments from Stripe and 4 things if you need to receive payments from PayPal. I was only interested in Stripe though, as PayPal is horrible to work with and expensive as well.</p><p><strong>&#x2022; </strong>LLC Registration<br>&#x2022; EIN (Employee Identification Number)<br>&#x2022; US Bank Account<br>&#x2022; ITIN (In case of PayPal)</p><p>It took some elaborate manual work and about 40 days which could have been taken care of much easily using the &apos;Start&apos; service from <a href="https://get.firstbase.io/u6o77ic8st4r">FirstBase</a>, who does all the work for you professionally. But we will see how the process goes anyway.</p><h2 id="a-us-llc-registration">A US LLC Registration</h2><p><br>You need to select a state for opening your LLC. I wanted the cheapest possible option but also the minimum hassle as well. There are a lot of options for a foreign LLC. The best option I found with the least complicated application was Wyoming. It was a little expensive than the cheapest options, but what most people forget is that you also have to pay Annual Report Fees to the state. Wyoming came out to be cheaper with the least annual compliance requirements.</p><figure class="kg-card kg-image-card"><img src="https://images.unsplash.com/photo-1487958449943-2429e8be8625?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE0fHxidWlsZGluZ3xlbnwwfHx8fDE3MDAwNjMwMzB8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" class="kg-image" alt="How I Opened a US LLC from India for Stripe" loading="lazy" width="6000" height="4000" srcset="https://images.unsplash.com/photo-1487958449943-2429e8be8625?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE0fHxidWlsZGluZ3xlbnwwfHx8fDE3MDAwNjMwMzB8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=600 600w, https://images.unsplash.com/photo-1487958449943-2429e8be8625?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE0fHxidWlsZGluZ3xlbnwwfHx8fDE3MDAwNjMwMzB8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1000 1000w, https://images.unsplash.com/photo-1487958449943-2429e8be8625?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE0fHxidWlsZGluZ3xlbnwwfHx8fDE3MDAwNjMwMzB8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=1600 1600w, https://images.unsplash.com/photo-1487958449943-2429e8be8625?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=M3wxMTc3M3wwfDF8c2VhcmNofDE0fHxidWlsZGluZ3xlbnwwfHx8fDE3MDAwNjMwMzB8MA&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2400 2400w" sizes="(min-width: 720px) 720px"></figure><p>Now I needed to do the filings for the LLC which would cost me $100. The state requires a Registered Agent from that state to be on record and file for you. Looking for that, I came across <a href="https://wyomingagents.com/">WyomingAgents</a>. Their fee was a simple $25 after which they would give me their details and I could use them to file the LLC documents online.</p><p>Halfway during registration, I found that they also have another package for $150, that will take care of the filings with the Registered Agent details, as well as provide mail forwarding along with a limited free trial US Phone number.</p><p>Considering it was only a little more expensive than what I was paying to do it all myself, I decided to go with the $150 package. I filled all my details along with a copy of my passport.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2023/11/image.png" class="kg-image" alt="How I Opened a US LLC from India for Stripe" loading="lazy" width="1373" height="1038" srcset="https://priyan.sh/content/images/size/w600/2023/11/image.png 600w, https://priyan.sh/content/images/size/w1000/2023/11/image.png 1000w, https://priyan.sh/content/images/2023/11/image.png 1373w" sizes="(min-width: 720px) 720px"></figure><p>My LLC was formed in a couple days and I got all the required documents on my email. First step done!</p><h2 id="employee-identification-number-ein">Employee Identification Number (EIN)</h2><p><br>An EIN is mandatory to open a US Bank Account and a Stripe Account. WyomingAgents also offers a service to get an EIN issued on your behalf but I did not want to pay for the service considering that the EIN form is very simple and its free to file.</p><p>I downloaded the <a href="https://www.irs.gov/pub/irs-pdf/fss4.pdf">EIN form</a> and filled it. There are two ways to file for EIN. Either you call a paid US phone number in which you read the form you filled on your end and they will fill it on their end and dictate you your new EIN at the end of the call.</p><p>The other is you fax them the filled form. Its much easier to do. All I did was sign up for a free trial at <a href="https://hellofax.com/">HelloFax</a>. I sent the form along with the Articles of organization of my LLC to +1 855-215-1627 and now it was time to wait. I had read that it can take a few weeks to a month to receive a response. They also mail you the EIN physically at the registered address of your LLC.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2023/11/image-4.png" class="kg-image" alt="How I Opened a US LLC from India for Stripe" loading="lazy" width="904" height="1114" srcset="https://priyan.sh/content/images/size/w600/2023/11/image-4.png 600w, https://priyan.sh/content/images/2023/11/image-4.png 904w" sizes="(min-width: 720px) 720px"></figure><p>Thankfully, in about 10 days I received an email from WyomingAgents who had received my EIN documents, scanned them and forwarded it to me. Step Two, completed! Now all I needed to do, was open a new bank account.</p><h2 id="a-us-bank-account">A US Bank Account</h2><p><br>There is only one bank in the USA that will let you open a bank account seamlessly from the comfort of your home completely free of cost. Its <a href="https://mercury.com/">Mercury Bank</a>. The easiest of all the steps. </p><p>I signed up, filled all of my details along with a copy of my passport. I entered my LLC details along with its EIN which was instantly verified. They also have a spot to describe your business which I did in detail. Make sure to fill all details accurately.</p><p>I had heard about Mercury putting a hold on the accounts for some users pending additional details. After I completed the formalities, the account went for verification and was approved in 1 day without any hold.</p><p>Finally, I had my own US-based LLC with a Bank Account all without leaving my couch or spending an extravagant amount of money. </p><p>The next day, I opened a Stripe account which was activated instantly as they have instant verification of bank and LLC details for Stripe USA. I have been receiving the money in that account smoothly which gets transferred to my Mercury account whenever I choose to. All my clients need to do is enter their payment details, no other information is needed. I can also receive money in the Stripe account from services like Medium who don&apos;t support India due to local restrictions. </p><p>Overall, it took me a month to form the LLC, but only a few hours of actual work. It&apos;s much easier than I thought and it was completely worth it. As always, you can also get it done with <a href="https://get.firstbase.io/u6o77ic8st4r">FirstBase</a>, who will do it all for $399 (you can get a 10% discount using coupon code &apos;PARTNER10&apos;) without you having to do anything.</p><p>So if you are thinking about opening your own LLC, go ahead!</p>]]></content:encoded></item><item><title><![CDATA[Backup your Website from a Web Server to Google Drive]]></title><description><![CDATA[We will use Google Drive to backup our files from a server automatically every month at no additional cost.]]></description><link>https://priyan.sh/backup-website-to-google-drive-from-server/</link><guid isPermaLink="false">5edd5040cec468202142f2bc</guid><category><![CDATA[linux]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Mon, 08 Jun 2020 08:11:51 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1526379095098-d400fd0bf935?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1526379095098-d400fd0bf935?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" alt="Backup your Website from a Web Server to Google Drive"><p>A lot of virtual private server providers do not have a backup option and those who do often charge extra to include it in your monthly plan. Well, there is an easy way to avoid it by using Google Drive which already provides us 15 GB free storage which is enough to store your up and coming websites.</p><p>We will be using Python and Google Drive API to achieve this after which we will create a cron job to automate this for us at regular intervals.</p><h2 id="getting-google-drive-api">Getting Google Drive API</h2><p>To obtain the token we need for automatic permanent authentication, we will use a Google Console Project. Proceed to <a href="https://console.cloud.google.com/">Google Cloud</a> and create a &quot;New Project&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/Start.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Name your project and press &quot;Create&quot;</figcaption></figure><p>Click on &quot;IAM &amp; Admin&quot; and click &quot;Service Accounts&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/srvacc.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Hover at IAM &amp; Admin and click Service Accounts</figcaption></figure><p>Then click on Create Service Account. Give it any name and an id of your choice, and click on &quot;Create&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/newservname.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Create a Service Account and name it</figcaption></figure><p>In the next page, select &quot;Owner&quot; as the role. This is needed to provide you full access to the Service Account. Then click &quot;Continue&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/newperm.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Set role as Owner</figcaption></figure><p>Next, click &quot;Create Key&quot; and then select &quot;JSON&quot;. A token file will be downloaded to your computer. Save it as we will need it later and you can&apos;t download it again.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/jsonkey.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Select JSON to download the token</figcaption></figure><p>Keep note of the email address of the service account, we will need it later.</p><blockquote>gdrive@signal-signal-111111.iam.gserviceaccount.com</blockquote><p>Now in your personal Google Drive, create a new folder and share it with the email you just noted.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/newfol.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Share the folder with the email we noted down</figcaption></figure><p>It should look something like this. Click &quot;Done&quot; to save it. This is the folder where you will find your backups.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/share.jpg" class="kg-image" alt="Backup your Website from a Web Server to Google Drive" loading="lazy"><figcaption>Click Done to share the folder</figcaption></figure><p>So, the Google Drive part is done, and now we will proceed to set up the script on our server. Keep the token file, the email and the link of the folder you just shared with you, we will need it in the next &#xA0;section.</p><h2 id="setting-up-the-server">Setting up the Server</h2><p>First run the following commands to install all the required python packages.</p><pre><code class="language-Bash">sudo apt-get install python3-pip
pip3 install google-api-python-client 
pip3 install requests pathlib httplib2==0.15.0</code></pre><p>What the script will do:<br>1. Backup the directory you choose to Google Drive.<br>2. Delete any old backups from your web server.</p><p>Now download the script from my <a href="https://github.com/priyan-sh/gdrive">GitHub repository</a> and put your the email and the id of the folder from the folder link you noted down.</p><blockquote>parentID = &apos;1AFfxg_lpfIDbJf0IoH7XP4sZILqZ7Gen&apos;<br>email = &apos;gdrive@signal-signal-111111.iam.gserviceaccount.com&apos;</blockquote><p>Now save this python script. Copy the token file to your server.</p><p>Its time to execute the script and check if it works. You need to choose the action, pass the token location and the directory you want to backup in the command:</p><blockquote>sudo python3 gdrive.py backup [token location] [directory location]</blockquote><p>So our command will look as follows to backup the &quot;www&quot; folder:</p><pre><code class="language-Bash"> sudo python3 gdrive.py backup /var/token.json /var/www/
</code></pre><p>That&apos;s it! Now you will see that the backup is being archived, after which it will be uploaded. It will have the current date and time in its filename. The other command you can pass is &quot;clean&quot; to delete any old backups from your Google Drive service account. Here is an example:</p><pre><code class="language-Bash"> sudo python3 gdrive.py clean /var/token.json</code></pre><p>Now, we need to automate this. I will set it to backup the files at every 1st day of the month. To do this, we will create a shell script to run with a cronjob.</p><p>Create a shell script &quot;backup.sh&quot; with the following content on your web server.</p><pre><code class="language-Bash">#! /bin/bash

cd /var/backup #Location of your python script.
/usr/bin/python3 gdrive.py backup /var/token.json /var/www/</code></pre><p>Provide the appropriate permission to the shell script to make it executable:</p><pre><code class="language-Bash">chmod +x backup.sh</code></pre><p>Now add a new cron entry, by editing the crontab file:</p><pre><code class="language-Bash">crontab -e</code></pre><p>Choose &quot;1&quot; and add the following line, assuming your &quot;backup.sh&quot; is in the &quot;var&quot; folder:</p><pre><code class="language-Bash">0 0 1 * * /var/backup.sh</code></pre><p>Now press &quot;Ctrl+X&quot; and type &quot;Y&quot; to save the file. It should now run every month to backup your files automatically.</p>]]></content:encoded></item><item><title><![CDATA[Create a Forever Free Website with GitHub]]></title><description><![CDATA[The best and most reliable forever free hosting that you will find on the web. GitHub pages is the best there is!]]></description><link>https://priyan.sh/create-a-forever-free-website-with-github/</link><guid isPermaLink="false">5edbcfabcec468202142f1c9</guid><category><![CDATA[web]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Sat, 06 Jun 2020 18:26:50 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1522542550221-31fd19575a2d?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1522542550221-31fd19575a2d?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" alt="Create a Forever Free Website with GitHub"><p>Struggling with all those free web hosting and other dodgy services? To host a simple &#xA0;static website, you no longer need to jump through hoops. All you need is a free GitHub account which we will use to host our free website with unlimited bandwidth and reliable hosting.</p><p>First of all, you need to gather your website. Basically any HTML/CSS/JS files in a folder ready to upload just like you would have for uploading your website to any other hosting.</p><p>Next, you can buy a domain if you don&apos;t have already. You can get one at <a href="https://domains.google/">Google Domains</a> or <a href="https://www.cloudflare.com/products/registrar/">Cloudflare</a>. </p><h2 id="setting-up-the-website">Setting Up the Website</h2><p>If you haven&apos;t already, make a <a href="https://github.com/">GitHub</a> account and download the <a href="https://desktop.github.com/">GitHub Desktop</a> client. Install the client and open it. If you don&apos;t have a domain name and want a particular name for your website, you need to put your website name as &quot;Username&quot; as it will be used as the subdomain name for your GitHub account.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/gita.jpg" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"><figcaption>Sign up for a new GitHub account</figcaption></figure><p>After you install the client and open it, sign in with your GitHub credentials. You can skip this step if you want, but you will have to sign in later to upload your website to GitHub.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/sign.jpg" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"><figcaption>Sign in to the GitHub desktop client</figcaption></figure><p>Now click &quot;Create a New Repository on your hard drive&quot; or alternatively you can press Ctrl+N.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/newrepo.png" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"><figcaption>Create a new repository</figcaption></figure><p>Now, you need to fill the Name as: </p><blockquote>username.github.io</blockquote><p>Replace &quot;username&quot; with your GitHub username. This has to be the name of your repository as this will allow us to host the files and activate the GitHub pages facility which we are using as hosting.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/setrep.png" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"><figcaption>Fill the entries as directed</figcaption></figure><p>Now copy all the files of your website and paste them in the &quot;username.github.io&quot; folder present in the &quot;Sites&quot; folder. Your GitHub client must look like this now:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/alfin-1.jpg" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"><figcaption>Your website is ready to be uploaded</figcaption></figure><p>Fill in the &quot;Summary&quot; and click &quot;Commit to master&quot;. Now click &quot;Publish repository&quot;. This will finally upload your website to GitHub.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/06/pub.jpg" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"></figure><p>You can add a &quot;Description&quot; to keep track of &#xA0;any changes you make. Make sure to uncheck the &quot;Keep this code private&quot; setting so that your website is publicly accessible.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/06/finpub.jpg" class="kg-image" alt="Create a Forever Free Website with GitHub" loading="lazy"></figure><p>That&apos;s it! Now, in your browser, go to &quot;yourwebsite.github.io&quot; page to access your new website.</p><h2 id="using-a-custom-domain">Using a Custom Domain</h2><p>To link your domain, create a file called &quot;CNAME&quot; in the root of your repository i.e. the folder where the website files exist. Add your custom domain like this in separate lines:</p><blockquote>yourdomain.com<br>www.yourdomain.com</blockquote><p>Now repeat the same procedure to commit and publish the repository. In your domain provider&apos;s DNS settings, add the following A records:</p><!--kg-card-begin: markdown--><p>| Type | Name | Content |<br>
|-|-|-|-|-|<br>
| A | @ | 185.199.108.153 |<br>
| A | www | 185.199.109.153 |</p>
<!--kg-card-end: markdown--><p>This will do the trick. Usually DNS changes propagate in a few minutes, but GitHub may take a few hours to work.</p><p>Using GitHub, we can only host static websites and simple interactive pages. If you need to host a blog or an ecommerce website, I suggest to use the Nanode plan at <a href="https://bit.ly/Iinode">Linode</a>. For $5, you can host more than 5 modern websites and still have resources to spare.</p><p>Let me know if you need any assistance.</p>]]></content:encoded></item><item><title><![CDATA[Mail Forwarding with Cloudflare for Custom Email Addresses]]></title><description><![CDATA[Cloudflare is a great addition to your blog or website with its speed and caching benefits with increase in security.]]></description><link>https://priyan.sh/email-forwarding-with-cloudflare/</link><guid isPermaLink="false">5ed653715b35587c7241e518</guid><category><![CDATA[web]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Tue, 02 Jun 2020 15:57:49 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1522800613660-62a595533961?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1522800613660-62a595533961?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" alt="Mail Forwarding with Cloudflare for Custom Email Addresses"><p>Cloudflare is one of the best CDN there is and it speeds up your website and protects it from most security threats. It speeds up the site and its caching also reduces server requests and load. After adding Cloudflare as my CDN to all of my domains, the one caveat I faced was losing Namecheap&apos;s email forwarding service.<br><br>As having a custom domain email address is important professionally, I looked for an alternative. I found a simple service and set it up in just 10 minutes.</p><p>We will be using <a href="https://improvmx.com/">ImprovMX</a>, which is mail forwarding service. It is completely free for use, and simple to set up. You will be greeted with the following:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/yormail.jpg" class="kg-image" alt="Mail Forwarding with Cloudflare for Custom Email Addresses" loading="lazy"><figcaption>Enter domain and email to sign up</figcaption></figure><p>Enter your domain name and the email that you wish to forward all emails to. This can be any email address that you own. You will receive a verification email. Open it and verify your email address with ImprovMX.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/dnsimx.jpg" class="kg-image" alt="Mail Forwarding with Cloudflare for Custom Email Addresses" loading="lazy"><figcaption>We need to configure the dns settings</figcaption></figure><p>For this tutorial, we are using Cloudflare as our DNS provider. <a href="https://dash.cloudflare.com/login">Login</a> to your Cloudflare account and head over to the &apos;&apos;DNS&quot; section.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/cloudflare.jpg" class="kg-image" alt="Mail Forwarding with Cloudflare for Custom Email Addresses" loading="lazy"><figcaption>Head over to the DNS section</figcaption></figure><p>Now copy over the settings from your ImprovMX account. You need to create the following records:</p><!--kg-card-begin: markdown--><p>| <strong>Type</strong> | <strong>Name</strong> | <strong>Content</strong> |<br>
|-|-|-|-|-|<br>
| <strong>MX</strong> | @ | mx1.improvmx.com<br> |<br>
| <strong>MX</strong> | @ | mx2.improvmx.com<br> |<br>
| <strong>TXT</strong> | @ | v=spf1 include:spf.improvmx.com ~all |</p>
<!--kg-card-end: markdown--><p>After that, head on to your ImprovMX settings page and refresh. You should see the following screen.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/06/improvfin.jpg" class="kg-image" alt="Mail Forwarding with Cloudflare for Custom Email Addresses" loading="lazy"><figcaption>Email forwarding is now active</figcaption></figure><p>You can send a test email to your newly set up address. It is a catch-all address so you can send email to any address of your domain. It also offers to add separate alias in case you want emails sent to specific email address to end in different inboxes. It also has a paid upgrade for additional features.</p><p>That&apos;s it! Let me know if it worked for you or if you have any questions.</p>]]></content:encoded></item><item><title><![CDATA[Add Custom Domain as an alias in Gmail for Free]]></title><description><![CDATA[It is important for a brand to look professional and a custom email is a big part of it. We can get one for free using this trick via Gmail itself.]]></description><link>https://priyan.sh/add-custom-domain-as-an-alias-in-gmail-free/</link><guid isPermaLink="false">5ed367a4b4fc9855d2b5a1f3</guid><category><![CDATA[web]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Sun, 31 May 2020 10:11:46 GMT</pubDate><media:content url="https://priyan.sh/content/images/2020/05/cover.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://priyan.sh/content/images/2020/05/cover.jpg" alt="Add Custom Domain as an alias in Gmail for Free"><p>You just started a website or blog and are sending emails with an address that is <em>yourbrand@gmail.com</em>. If spending for Gsuite doesn&apos;t seem to be the best idea to you to get a custom email address, then you are right! We can get it with just a few simple steps.</p><h2 id="lets-begin">Lets Begin</h2><ol><li>You must already have a mailbox or email forwarding for your domain name active as Gmail will send a verification email to the new alias you are adding.</li><li>Proceed to activate <a href="https://myaccount.google.com/u/lesssecureapps">Less Secure Apps</a> in your account settings.</li></ol><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/lessapps.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Turn on less secure app access on</figcaption></figure><p>3. Then proceed to activate 2-Step Verification for your account on the same settings page. </p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/tstepv.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Proceed to activate two step verification</figcaption></figure><p>Make sure to set as many alternate options for login you can to secure your account and never lose access to it.</p><p>4. Now you will be able to see the App Passwords option in the settings. Proceed to create a new App password. Select &quot;Mail&quot; in the &quot;Select App&quot; option and &quot;Other&quot; in &quot;Select Device&quot; option.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/appass.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Enter the app as mail</figcaption></figure><p>Then click &quot;Generate&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/appgen-1.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Enter any name</figcaption></figure><p>Copy the generated password. Store it safely because you won&apos;t be able to see it again and will have to generate a new one if you lose it.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/apass.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Copy the app password</figcaption></figure><p>5. Now head on to Gmail settings. In &#xA0;the &quot;<a href="https://mail.google.com/mail/u/2/#settings/accounts">Accounts and Import</a>&quot; section you will find the option to add a new email address.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/newmail.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Add another email as an address</figcaption></figure><p>6. Fill all the details.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/fillmail.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Enter your brand name and email</figcaption></figure><p>7. Now will all the details as follows:</p><p><strong>SMTP Server:</strong> smtp.gmail.com<br><strong>Port:</strong> 587<br><strong>Username:</strong> yourbrand (the part of email address ahead of @gmail.com)<br><strong>Password: </strong>ablebashworkjazz (the app password we generated above)</p><p>Then click &quot;Add Account&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/detmail.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Enter the details as instructed</figcaption></figure><p>You should see the following screen. You will also have received a confirmation code to <em>admin@yourbrand.com.</em> Enter the code and click &quot;Verify&quot;.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/vermail.jpg" class="kg-image" alt="Add Custom Domain as an alias in Gmail for Free" loading="lazy"><figcaption>Add the verification code you received</figcaption></figure><p>That&apos;s it! Now you will have a functional branded email address right &#xA0;in your Gmail inbox.</p><p>Hope you liked this method and be sure to hit me up if you have any questions.</p>]]></content:encoded></item><item><title><![CDATA[Add a Product Video in Place of Product Image in WooCommerce]]></title><description><![CDATA[WooCommerce doesn't allow you to add a product video instead of an image natively. But we can add it with a few lines of code and no third party plugins.]]></description><link>https://priyan.sh/product-video-in-place-of-image-woocommerce/</link><guid isPermaLink="false">5ed3548cb4fc9855d2b5a13f</guid><category><![CDATA[wordpress]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Sun, 31 May 2020 07:51:37 GMT</pubDate><media:content url="https://priyan.sh/content/images/2020/05/woo-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://priyan.sh/content/images/2020/05/woo-2.png" alt="Add a Product Video in Place of Product Image in WooCommerce"><p>Product images are used to illustrate your product, but some products require a video to &#xA0;better showcase them. Here I will show you how to replace the image with a responsive YouTube video with a simple PHP code snippet.</p><p>You can add this code in the &quot;functions.php&quot; or the <a href="https://wordpress.org/plugins/code-snippets/">Code Snippets</a> plugin.</p><pre><code class="language-PHP">add_action( &apos;woocommerce_before_single_product&apos;, &apos;priyan_sh_video_not_image&apos; );
 
function priyan_sh_video_not_image() {
 
remove_action( &apos;woocommerce_before_single_product_summary&apos;, &apos;woocommerce_show_product_images&apos;, 20 );
remove_action( &apos;woocommerce_product_thumbnails&apos;, &apos;woocommerce_show_product_thumbnails&apos;, 20 );
add_action( &apos;woocommerce_before_single_product_summary&apos;, &apos;priyan_sh_product_video&apos;, 30 );
 
}

function priyan_sh_product_video() {
	
echo &apos;&lt;div class=&quot;woocommerce-product-gallery&quot;&gt;&apos;;

if ( $video = get_post_meta( get_the_ID(), &apos;product_video_field&apos;, true ) ) {

	    //URL Match
        preg_match(&apos;%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&amp;]v=)|youtu\.be/)([^&quot;&amp;?/ ]{11})%i&apos;, $video, $match);
	
        // Display Video
        echo &apos;&lt;div class=&quot;images&quot;&gt;&lt;div class=&quot;ResponsivevideoWrapper&quot;&gt;&apos;;
		echo &apos;&lt;iframe width=&quot;1200&quot; height=&quot;1000&quot; src=&quot;https://www.youtube.com/embed/&apos;.$match[1].&apos;?rel=0&amp;amp;showinfo=0&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&apos;;	
	    echo &apos;&lt;/div&gt;&lt;/div&gt;&apos;;

    } else {

        // No Video
        wc_get_template( &apos;single-product/product-image.php&apos; );

    }

}

</code></pre><p>To get it to work, we will have to create a &quot;<em>product_video_field</em>&quot; in the Custom Fields section of &#xA0;each product page to provide us a simple way to add our YouTube URL each time we add a new product.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/custf.jpg" class="kg-image" alt="Add a Product Video in Place of Product Image in WooCommerce" loading="lazy"></figure><p>Click &quot;Enter new&quot; and type &quot;<em>product_video_field</em>&quot; and click &quot;Add Custom Field&quot;. In the value field, enter your desired YouTube video&apos;s link. The link can be in any format as the code will match and extract the code after &quot;<em>/watch?v=<strong>thiscode</strong></em>&quot;.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/custfyt.jpg" class="kg-image" alt="Add a Product Video in Place of Product Image in WooCommerce" loading="lazy"></figure><p>Then click &quot;Publish&quot; to publish the product. If you check your product page, you will find the video out of place. We will need to add the responsive design elements via CSS. <br>Navigate to &quot;Appearance &gt; Customize &gt; Additional CSS&quot;. Then enter the following code. You can make modifications according to your desired look.</p><pre><code class="language-CSS">.ResponsivevideoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.ResponsivevideoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}</code></pre><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/adcss.jpg" class="kg-image" alt="Add a Product Video in Place of Product Image in WooCommerce" loading="lazy"></figure><p>Then click &quot;Publish&quot; to save the changes. You will now be able to see the YouTube video in place of your product image. The product image will still be displayed in the &quot;Shop&quot; page, so you will have to add an image &#xA0;in each product as well.</p><p>So there we go, a fully responsive product video in place of the product image with no plugins or third party tools.</p>]]></content:encoded></item><item><title><![CDATA[WooCommerce Missing Fields "brand", "review", "global identifier" and "aggregate rating"]]></title><description><![CDATA[Webmaster tools throws the missing fields error due to some empty fields in WooCommerce generated structured data. It takes less than a minute to fix!]]></description><link>https://priyan.sh/woocommerce-missing-fields-structured-data/</link><guid isPermaLink="false">5ed2ae3ce5cbbd0d2f4aefd4</guid><category><![CDATA[wordpress]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Sat, 30 May 2020 19:52:19 GMT</pubDate><media:content url="https://priyan.sh/content/images/2020/05/webmaster.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://priyan.sh/content/images/2020/05/webmaster.jpg" alt="WooCommerce Missing Fields &quot;brand&quot;, &quot;review&quot;, &quot;global identifier&quot; and &quot;aggregate rating&quot;"><p>If you ever got a warning from Google Webmaster Tools regarding the products erorrs on your website about these missing fields, then you are at the right place.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/Structured-Data.jpg" class="kg-image" alt="WooCommerce Missing Fields &quot;brand&quot;, &quot;review&quot;, &quot;global identifier&quot; and &quot;aggregate rating&quot;" loading="lazy"></figure><h2 id="why-does-this-happen">Why does this happen?</h2><p>By default, WooCommerce generates structured data for your products. But it leaves some fields empty due to various reasons.</p><p><strong>Missing field &quot;brand&quot;:</strong> By default, WooCommerce doesn&apos;t put a brand name unless you get a separate extension like <a href="https://woocommerce.com/products/brands/">WooCommerce Brands</a>.</p><p><strong>Missing field &quot;review&quot;:</strong> When you launch your products for the first time, they don&apos;t have any reviews. So this field goes empty. When reviews start flowing &#xA0;in, it should go away on your own. Alternatively, you can review all your products once as well.</p><p><strong>No global identifier provided: </strong>This is for barcodes or any other identifier that a company has provided for the products. There doesn&apos;t seem to be any way to add it built into WooCommerce.</p><p><strong>Missing field &quot;aggregateRating&quot;:</strong> This is another error that will go away once someone submits a review and rates your products.</p><h2 id="the-solution">The Solution</h2><p><strong>Update May 2021</strong>: It no longer works, WooCommerce changed something behind the scenes, I am still working on how to fix it again.</p><p>Like most problems in WordPress, this issue can also be &#xA0;fixed by a simple code snippet that you can add to either &quot;functions.php&quot; or the <a href="https://wordpress.org/plugins/code-snippets/">Code Snippets</a> plugin.</p><pre><code class="language-PHP">&lt;?php

function priyan_sh_woocommerce_structured_data_product( $markup, $product ) {

  if (empty($markup[&apos;mpn&apos;]))
        $markup[&apos;mpn&apos;] = $markup[&apos;sku&apos;];
  if (empty($markup[&apos;brand&apos;]))
        $markup[&apos;brand&apos;] = $product-&gt;get_name();
    
  if (empty($markup[&apos;brand&apos;]))
    $markup[&apos;brand&apos;] = &apos;unknown&apos;;    
    if (empty($markup[&apos;aggregateRating&apos;]))
    $markup[&apos;aggregateRating&apos;] = array(
      &apos;@type&apos; =&gt; &apos;AggregateRating&apos;,
      &apos;ratingValue&apos; =&gt; 5,
      &apos;reviewCount&apos; =&gt; 1,
    );
    if (empty($markup[&apos;review&apos;]))
    $markup[&apos;review&apos;] = array(
      &apos;@type&apos;=&gt; &apos;Review&apos;,
      &apos;reviewRating&apos;=&gt; [
        &apos;@type&apos;=&gt; &apos;Rating&apos;,
        &apos;ratingValue&apos;=&gt; &apos;5&apos;,
        &apos;bestRating&apos;=&gt; &apos;5&apos;
      ],
      &apos;author&apos;=&gt; [
        &apos;@type&apos;=&gt; &apos;Person&apos;,
        &apos;name&apos;=&gt; &apos;&apos;
      ]
    );
    return $markup;
};

add_filter( &apos;woocommerce_structured_data_product&apos;, &apos;priyan_sh_woocommerce_structured_data_product&apos;, 10, 2 );</code></pre><p><br>The above snippet will fill any missing fields in the structured data with the following:<br><br><strong>brand: </strong>The name of the particular product will be set as brand.<br><strong>review and aggregateRating: </strong>It will raise the number of reviews to 1 and rate the product 5 stars.<br><strong>global identifier:</strong> The SKU of your product will be assigned as the MPN.</p><p>Now, you can test your URL with Google&apos;s <a href="https://search.google.com/structured-data/testing-tool/">Structured Data Tool</a>, you will find that all the errors are gone.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/strutool.jpg" class="kg-image" alt="WooCommerce Missing Fields &quot;brand&quot;, &quot;review&quot;, &quot;global identifier&quot; and &quot;aggregate rating&quot;" loading="lazy"></figure><p>I hope this solves your problem. If you are still facing any issues, you can hit me up anytime!</p><p><strong>Update (thanks to irfanmiral):</strong></p><blockquote><code>$markup[&apos;brand&apos;] = array(</code><br><code>&apos;@type&apos; =&gt; &apos;Brand&apos;,</code><br><code>&apos;name&apos; =&gt; $product-&gt;get_name();</code><br><code>);</code><br><br><br><code>$markup[&apos;brand&apos;] = array(</code><br><code>&apos;@type&apos; =&gt; &apos;Brand&apos;,</code><br><code>&apos;name&apos; =&gt; &apos;Unknown&apos;</code><br><code>);</code><br></blockquote>]]></content:encoded></item><item><title><![CDATA[Install Ghost on Linode as a Second Website]]></title><description><![CDATA[Ghost is a one of the best alternatives to Wordpress for blogging and super easy to host alongside your main website on Linode with the setup taking just a few minutes.]]></description><link>https://priyan.sh/install-ghost-on-linode/</link><guid isPermaLink="false">5ed27e69e5cbbd0d2f4aee11</guid><category><![CDATA[ghost]]></category><category><![CDATA[linux]]></category><dc:creator><![CDATA[Priyansh Kothari]]></dc:creator><pubDate>Sat, 30 May 2020 17:25:13 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1489875347897-49f64b51c1f8?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1489875347897-49f64b51c1f8?ixlib=rb-1.2.1&amp;q=80&amp;fm=jpg&amp;crop=entropy&amp;cs=tinysrgb&amp;w=2000&amp;fit=max&amp;ixid=eyJhcHBfaWQiOjExNzczfQ" alt="Install Ghost on Linode as a Second Website"><p>Ghost is an amazing blogging platform based on NodeJS and in my opinion is a better platform than Wordpress in case you need a simple blog or a static website.</p><figure class="kg-card kg-image-card"><img src="https://priyan.sh/content/images/2020/05/fpost.png" class="kg-image" alt="Install Ghost on Linode as a Second Website" loading="lazy"></figure><p>In this setup I am using a LEMP (Linux, Nginx, MySQL, PHP) stack on Ubuntu 18.04 LTS on Linode&apos;s cheapest <a href="https://bit.ly/Iinode">Nanode</a> plan. Ghost being a very lightweight CMS, you can even host it along with other websites with the help of Nginx server blocks (like Apache has virtual hosts). </p><h2 id="lets-begin">Lets Begin<br></h2><ol><li>Create a new non-root user if you don&apos;t have one already. You will have to cuse a non-root user as Ghost CLI doesn&apos;t permit installation directly by a root user. I am creating a user &quot;<em>priyansh</em>&quot; and adding it to the sudo group for sudo privileges.</li></ol><pre><code class="language-bash">adduser priyansh
usermod -aG sudo priyansh
</code></pre><p>2. &#xA0;Upgrade your system and install build-essential:</p><pre><code class="language-bash">sudo apt update &amp;&amp; sudo apt upgrade
sudo apt install build-essential
</code></pre><p>3. Install Node.js and NPM. Then we also install Ghost-CLI which will make our task of installing ghost super easy.</p><pre><code class="language-bash">curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs
sudo npm install -g ghost-cli@latest</code></pre><h2 id="install-ghost">Install Ghost<br></h2><p>We will be installing it in the <em>/var/www/priyan.sh</em> directory. This is just one of our multiple websites on this server. First we will create the directory for our desired website. Then we switch the directory permissions to the &quot;<em>priyansh</em>&quot; user. Additionally we change the permissions of the directory to provide it the proper permissions for hosting our ghost blog.</p><pre><code class="language-bash">sudo mkdir -p /var/www/priyan.sh
sudo chown priyansh:priyansh /var/www/priyan.sh
sudo chmod 775 /var/www/priyan.sh</code></pre><p>Navigate to the root <em>/var/www/priyan.sh</em> directory and check if the directory is empty.</p><pre><code class="language-bash">cd /var/www/priyan.sh
ls -a
</code></pre><p>Now we proceed to install ghost. Answer each question with the help of the <a href="https://ghost.org/docs/install/ubuntu/#install-questions">Ghost documentation</a>. </p><ul><li>Blog URL - &#xA0;https://priyan.sh</li><li>MySQL hostname - localhost</li><li>MySQL username - root</li><li>MySQL password - password (your MySQL password)</li><li>Ghost database name - ghost</li><li>Nginx setup - Yes</li><li>SSL setup - Yes</li><li>&quot;ghost&quot; mysql user - Yes</li><li>Systemd setup - Yes</li><li>Start Ghost - Yes<br></li></ul><p>For the Nginx configuration, it should set everything automatically. In case you face any issues, you can copy the following Nginx configuration. You can edit your configuration at &quot;<em>/etc/nginx/sites-available</em>&quot;. There will be two files for HTTP and HTTPS. You have to edit it accordingly.</p><pre><code class="language-nginx">server {
    listen 80;
    listen [::]:80;

    server_name priyan.sh www.priyan.sh;
    root /var/www/priyan.sh;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $http_host;
        proxy_pass http://127.0.0.1:2369;

    }

    location ~ /.well-known {
        allow all;
    }

    client_max_body_size 50m;
}</code></pre><p>After making the desired changes, delete any files for that website in your &quot;<em>/etc/nginx/sites-enabled</em>&quot; directory and then create a new symlink by using the following commands. Then restart Nginx.</p><pre><code class="language-bash">sudo rm /etc/nginx/sites-enabled/priyan.sh.conf
sudo rm /etc/nginx/sites-enabled/priyan.sh-ssl.conf
sudo ln -s /etc/nginx/sites-available/priyan.sh.conf /etc/nginx/sites-enabled/priyan.sh.conf
sudo ln -s /etc/nginx/sites-available/priyan.sh-ssl.conf /etc/nginx/sites-enabled/priyan.sh-ssl.conf
sudo systemctl restart nginx</code></pre><p>This should set up Nginx for your Ghost blog. Additionally I recommend to restart ghost as well after any changes to avoid errors.</p><pre><code class="language-bash">cd /var/www/priyan.sh
ghost restart</code></pre><h2 id="final-setup">Final Setup<br></h2><p>Now we can head to our admin area by adding &quot;<em>/ghost</em>&quot; after your website address. You will find your new blog&apos;s welcome screen.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/fg.jpg" class="kg-image" alt="Install Ghost on Linode as a Second Website" loading="lazy"><figcaption>ghost welcome screen</figcaption></figure><p>Enter your email, name, password, and website title to create a new admin user:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://priyan.sh/content/images/2020/05/gt.jpg" class="kg-image" alt="Install Ghost on Linode as a Second Website" loading="lazy"><figcaption>create a new admin user in ghost</figcaption></figure><p>Navigate to the Ghost admin area and get used to the features. Your blog is ready!</p><h2 id="troubleshooting">Troubleshooting<br></h2><p>You can navigate to your ghost installation directory &quot;<em>/var/www/priyan.sh</em>&quot; as the non root user &quot;<em>priyansh</em>&quot; and use the ghost cli to troubleshoot.</p><pre><code class="language-bash">ghost doctor</code></pre><p>In case you face any trouble, you can use the ghost community forums or drop me a comment!</p>]]></content:encoded></item></channel></rss>