We have created an Amazon AMI (Amazon Machine Image) to allow for quick and easy installs of Ghost. This means rather than having a blank Linux image that you then have to install node.js, npm, Ghost, etc. on, it will already be all setup and running once Amazon creates your instance.
This is our very first version of this, so we will be making many upgrades to it in the future (specific www user, better logging, etc) but this should get the job done for now (you can always make those changes yourself if you want). If you would rather install Ghost from scratch instead of using our AMI, check out this article. Now on to the install!
- 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.
- 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, go ahead and click on the EC2 Link on the AWS Management Console page.
Ghost is up and running, so if you want to just test it out, thats great go ahead and use it. If you want to do some additional steps for added security, here are some common ones:
SSH into your instance: 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
config.jsfile and add your URL and IP address. cd /path/to/ghost/folder sudo vi config.js
For each time it appears in the config, change:
Stop Ghost sudo forever stopall
Start Ghost cd /path/to/ghost sudo forever start index.js
We hope this article helped you get Ghost running on a free EC2 instance. For feature requests or feedback on our Amazon AMI please leave us a comment below. Our comment section has become a little bloated, for a specific support question getting Ghost up and running ask a question on our Ghost Q&A site.