How to Install Ghost on Namecheap
- Head over to Namecheap and sign up for their VPS service (I did VPS Lite - Xen)
- Register, transfer, or use an existing Namecheap domain name.
 Under "Operating System" select "Ubuntu 12.04". Leave the rest the same.
Go ahead and go through the Checkout steps
- Once finished with the checkout, you will have to wait for the email from Namecheap saying your VPS is setup.
Once you receive the email, it will have SSH instructions in it. Use those instructions to gain ssh access to your VPS
ssh root@[ip address provided]
- Update Ubuntu:
sudo apt-get update sudo apt-get upgrade sudo aptitude install build-essential zip
- Download and install Node.js
curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get install -y nodejs
- To install Ghost you need to sign into your Ghost account at ghost.org and get the URL for the latest Ghost source code
cd /var/www/ wget https://ghost.org/zip/ghost-latest.zip unzip -d ghost [Name-of-Ghost-zip].zip cd ghost/ sudo npm install
- Edit the config.js file
cp config.example.js config.js sudo vi config.js
In the "Production" section, change the following:
host: '127.0.0.1',
to
host: '0.0.0.0',
save and exit.
Namecheap seems to have apache running by default, so we need to kill that to run Ghost
ps aux | grep apache
this will output something like this
root 582 0.0 1.7 197888 8684 ? Ss 19:35 0:00 /usr/sbin/apache2 -k start
. The first number (582 in my case) is what you will use in the next command:sudo kill 582
- Now lets stop apache from starting everytime the server reboots:
sudo update-rc.d -f apache2 remove
- Create Ghost User:
sudo adduser --shell /bin/bash --gecos 'Ghost application' ghost sudo chown -R ghost:ghost /var/www/ghost/
- Log into Ghost User:
su - ghost cd /var/www/ghost/
- Start Ghost:
npm start --production
- Browse to the IP address that was provided in the email Namecheap sent you with :2368 at the end (ex. 123.456.78.901:2368) and you should see Ghost up and running!
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 article to help get your Ghost blog production ready:
Possible Errors
- Error: listen EADDRINUSE
This means the port you are trying to run Ghost on is in use. Check step 11 above.