<?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[Ryan Brady]]></title><description><![CDATA[I write code and solve problems, sometimes at the same time.]]></description><link>https://ryanbrady.org/</link><image><url>https://ryanbrady.org/favicon.png</url><title>Ryan Brady</title><link>https://ryanbrady.org/</link></image><generator>Ghost 4.33</generator><lastBuildDate>Wed, 22 Apr 2026 01:56:34 GMT</lastBuildDate><atom:link href="https://ryanbrady.org/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Installing Ghost on DreamHost 2022]]></title><description><![CDATA[<p>I&apos;ve used and supported Wordpress for the last 10+ years for my own blogs and those of my friends, family and clients. &#xA0;I grew tired of the constant security updates and issues that arose over the years. &#xA0;It came to a head recently when Dreamhost disabled</p>]]></description><link>https://ryanbrady.org/installing-ghost-on-dream-host-2022/</link><guid isPermaLink="false">61ef8490b9f20b0a5e61fd41</guid><dc:creator><![CDATA[Ryan Brady]]></dc:creator><pubDate>Tue, 25 Jan 2022 05:03:27 GMT</pubDate><content:encoded><![CDATA[<p>I&apos;ve used and supported Wordpress for the last 10+ years for my own blogs and those of my friends, family and clients. &#xA0;I grew tired of the constant security updates and issues that arose over the years. &#xA0;It came to a head recently when Dreamhost disabled my wife&apos;s personal blog. &#xA0;Their security staff identified malware that was sending large amounts of email. &#xA0;Dreamhost&apos;s response and handling of the situation made it more difficult, but that&apos;s another story for later. <br><br>I decided if I was rebuilding her blog, I might look to see what else was available. &#xA0;I looked at several different options and I found Ghost to be compelling. &#xA0;It seemed to be simple, elegant and provide for easy customization. &#xA0;I ran it locally in docker and explored using the Wordpress plugin to create a Ghost export file and import it locally.</p><p>The following guide is a list of steps I took and I&apos;m documenting it here for the next time I need to do this for myself or someone else. &#xA0;If you&apos;re on Dreamhost and looking to install Ghost, this may be helpful for you too.</p><p> <br>The prerequisites to this guide is to have a Dreamhost account, add a domain with a configuration that enables Phusion Passenger, nodejs and an ssh user.</p><p>Install nvm</p><!--kg-card-begin: markdown--><pre><code>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
</code></pre>
<!--kg-card-end: markdown--><p>I had to source my .bashrc every time I logged in to ensure I could use anything I installed. &#xA0;I&apos;m sure there&apos;s probably something else to configure with Dreamhost to avoid this, but at the time of this writing I didn&apos;t take the time to research.</p><!--kg-card-begin: markdown--><pre><code>source ~/.bashrc
</code></pre>
<!--kg-card-end: markdown--><p>Find a version of node supported by both DH and Ghost. &#xA0;12 is the latest version I could find that worked.</p><!--kg-card-begin: markdown--><pre><code>nvm install 12
nvm use 12
</code></pre>
<!--kg-card-end: markdown--><p>Change to the domain directory, &#xA0;remove the public directory and install ghost via the installer</p><!--kg-card-begin: markdown--><pre><code>cd {domain}
rm -rf public
npm install ghost-cli@latest -g
</code></pre>
<!--kg-card-end: markdown--><p>Fix the permissions on the home directory.</p><!--kg-card-begin: markdown--><pre><code>chmod 755 $HOME
</code></pre>
<!--kg-card-end: markdown--><p>Install ghost with the following command and answer any prompts.</p><!--kg-card-begin: markdown--><pre><code>ghost install --db=sqlite3 --no-setup-linux-user --no-setup-nginx --no-setup-ssl --no-setup-systemd
</code></pre>
<!--kg-card-end: markdown--><p>Create an app.js file in {domain} directory for Phusion Passenger to run and add the following line to it</p><!--kg-card-begin: markdown--><pre><code>const app = require(&apos;./current/index.js&apos;);
</code></pre>
<!--kg-card-end: markdown--><p>Change the config file to set the url, port and host</p><!--kg-card-begin: markdown--><pre><code>vim config.production.json
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><pre><code class="language-json">{
    &quot;url&quot;: &quot;https://somedomain.net&quot;,
        &quot;server&quot;: {
        &quot;port&quot;: 443,
        &quot;host&quot;: &quot;0.0.0.0&quot;
    },
    &quot;database&quot;: {
        &quot;client&quot;: &quot;sqlite3&quot;,
        &quot;connection&quot;: {
        &quot;filename&quot;: &quot;/home/someuser/somedomain.net/content/data/ghost.db&quot;
        }
    },
    &quot;mail&quot;: {
        &quot;transport&quot;: &quot;Direct&quot;
    },
    &quot;logging&quot;: {
        &quot;transports&quot;: [
            &quot;file&quot;,
            &quot;stdout&quot;
        ]
    },
    &quot;process&quot;: &quot;systemd&quot;,
    &quot;paths&quot;: {
        &quot;contentPath&quot;: &quot;/home/someuser/somedomain.net/content&quot;
    }
}
</code></pre>
<!--kg-card-end: markdown--><!--kg-card-begin: markdown--><pre><code>cd ~/
mkdir tmp
touch tmp/restart.txt
</code></pre>
<!--kg-card-end: markdown--><p>Create the public directory and .htaccess file</p><!--kg-card-begin: markdown--><pre><code>
mkdir {domain}/public
vim {domain}/public/.htaccess
# paste the following code into the .htaccess file.
# change the $USER to your actual username 
PassengerNodejs /home/$USER/.nvm/versions/node/v12.22.9/bin/node
PassengerFriendlyErrorPages on
</code></pre>
<!--kg-card-end: markdown--><p>Update (16 March 2022):</p><p>At this point you maybe find yourself with a non-working app. &#xA0;I had to &quot;Reload HTTP&quot; from the Dreamhost panel for the site to start working properly.</p>]]></content:encoded></item></channel></rss>