How to Install Ghost on Dreamhost
-
Once you are logged into the Dreamhost cPanel, on the left hand side, click on "VPS" and then "Enable VPS Service". It may take a little bit for Dreamhost to create your VPS, but once its ready, you will see a code that looks like this
ps226308
. Copy that code, you will need it in a minute -
Now on the left hand side, click on "VPS" and then "Manage Admin Users"
-
Add a new user with SSH access
5. Now open up Terminal or your command line appliction and type the following command, replacing testghost
with your username from earlier (it may take a few minutes for your username to propagate):
ssh testghost@ps226308.dreamhostps.com
6. Once in, update the Dreamhost VPS operating system:
sudo apt-get update
sudo aptitude install build-essential zip
7. Download and install Node.js
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
9. Download and Install Ghost
sudo mkdir -p /var/www/
cd /var/www/
curl -L -O https://ghost.org/zip/ghost-latest.zip
sudo unzip -d ghost [Name-of-Ghost-zip].zip
cd ghost/
sudo npm install --production
10. Edit the config file:
cp config.example.js config.js
to
sudo vi config.js
11. In the "Production" section, change the following:
host: '127.0.0.1',
host: '0.0.0.0',
12. Create Ghost User:
sudo adduser --shell /bin/bash --gecos 'Ghost application' ghost
sudo chown -R ghost:ghost /var/www/ghost/
13. Log into Ghost User:
su - ghost
cd /var/www/ghost/
14. Start Ghost:
npm start --production
15. Browse to your DreamHost URL with `:2368` at the end of the url to see it running (replacing `ps226308` with your DreamHost generated ID from earlier):
http://ps226308.dreamhostps.com:2368
Proxy from Port 80 and Keep Ghost Running
There you have it, Node.js is installed, Ghost files are located in /var/www/ghost
, and Ghost has been started. You can keep Ghost the way it is currently setup if you do not mind adding :2368 to the end of your url, but we would highly recommend you check out the following two articles to help get your Ghost blog ready: