Installing Ghost on Amazon EC2 is a great option for hosting Ghost, especially since you get a year for free. Here is how to install Ghost on Amazon EC2:
- Head over to the Amazon Web Services site and sign up using your existing amazon account or create one.
- Go ahead and enter in your payment information. The way the Amazon free tier works is that if you go over a certain threshold they will charge you, but what we are setting up will be free and remain that way unless you get a lot of hits or server side data use Amazon EC2 Free Tier details.
- Verify by phone and then on the next page, verify through your email once it arrives.
- Once you click the link in the email you got, go ahead and go to the AWS Management Console.
- Click on EC2 on the left side and wait for that email to come through (from previous setups I have had the email take anywhere from minutes to an hour to arrive).
Once you get the email and your access to EC2 has been allowed, head to our Amazon AWS Marketplace page and click Continue.
- Along the left hand side select which region you want your EC2 instance to be in and what SSH Key Pair you want deployed on the server. Then click Launch with 1-Click.
In the confirmation window click on the AWS Management Console link.
Once your instance has an Instance State of “running” you will be able to browse to your Ghost instance and SSH into your server if you want to. Select your EC2 instance from the list and grab your Amazon EC2 Public DNS address.
- You can now enter that web address into a browser and you will see your Ghost blog up and running!
SSH into AMI
Your Ghost blog is up and running, so if you want to just test it out, thats great go ahead and use it. If you would like to SSH into your instance, use the following command:
ssh -i /path/to/amazon/key.pem ec2-user@[public-dns]
If you get the error:
bad permissions: ignore key: /Users/davidb/Desktop/key.pem Permission denied (publickey) do the following command:
sudo chmod 600 /path/to/amazon.pem
Notes about the AMI
- Ghost gets installed into
- Ghost is being run by
pm2under the ghost user. To restart Ghost, first switch to the ghost user and then issue the restart command:
sudo -s su - ghost pm2 restart ghost exit
For more information about pm2 check them out on GitHub.
Next Steps:Learn Ghost from the Ground Up
Head to "Ghost for Beginners" to learn everything you need to know about learning and customizing Ghost
Find the Perfect Ghost Theme
Go to "All Ghost Themes" to browse all of your Ghost theme options in one place.
Keep Up to Date on Ghost
Check out "All About Ghost" to stay up to date on everything that is Ghost.