Guide to setup on AWS Ubuntu 16.04

Just as promised, here is the guide. I will be adding some more stuff, but the main goal is to have more people coming to ghost.

Hey guys, I’ve been up for a couple of hours getting to know Ghost and also giving it a try to AWS but I can’t find a single guide that explains well how to setup correctly Ghost on AWS on Ubuntu 16.04 EC2 Free.
I was following this guide:
Guithub link
and it was pretty good until it asked me to create Elastic IP, then my public IP changed and got messed up, besides, this part:

server {
    listen 80;
    server_name x.x.x.x localhost;

    location / {

is not well explain. Does anyone know any good guide…?


I followed that guide completely and I’m still not able to get it going… When I type:

ufw status

it says: Status: inactive

I’ve been with this since yesterday non stop and honestly the installation process is extrmely frustrating… also why Nginx and no Appache2… seriously…

I remember back in the days installing WordPress in 2 h with ought knowing anything about DNS or anything, like this Ghost will never grow…

Can someone help me on the installation process please…?

Hey there :wave:

Nginx is much more performant and better optimized for handling the type of workload Ghost has. You’re free to use Apache, but the support you get will be more limited as it’s not part of the recommended stack.

Ghost and Wordpress are 2 completely different platforms. Wordpress runs on PHP, and most shared hosting servers are configured to work with PHP. Ghost, on the other hand, runs on NodeJS, which most shared hosting servers are not configured to work with. The languages are fundamentally different, so it’s not really fair to either platform to compare them. Additionally, Ghost and Wordpress are built for very separate tasks.

Just FYI, while running Ghost on AWS isn’t much more difficult than running it on any other VPS provider, this is technically the hardest way to get Ghost - The easiest is signing up for Ghost (Pro), and the other method is to use the Digital Ocean One Click Install

If it’s inactive, you should just need to enable it. To do so, first make sure you allow ssh (otherwise your connection will be dropped) by running sudo ufw limit ssh and then enable it by running sudo ufw enable

That’s the problem, that when I try to access ufw at /usr/sbin/ufw
it says: that it doesn’t exist, it only let’s me get to /usr/sbin/
the same goes with ufw limit ssh, it says:

Command ‘ufw’ is available in ‘/usr/sbin/ufw’
The command could not be located because ‘/usr/sbin’ is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
ufw: command not found

I swear after I get this going I’m making a tutorial and video… oh lord ahahah

This seems to be a problem with your installation :grimacing: since AWS supports security groups, it might be easier to configure them and just not worry about UFW. The reason the docs tell you to use UFW is because it hardens your server, which is a generally good thing to do. You can still install Ghost without enabling UFW, but then you don’t have the hardening

If you have any suggestions to the docs, feel free to suggest edits! There’s a button at the top right of the page

What a mission… I’m not familiar with UFW, but if I can install it without it for now fine, please take a look:

I’m done with the installation and go to the website and still doesn’t show anything, the DNS is already setup…, how can I configure it with the public IP to test it? maybe the DNS hasn’t kicked in?

I will once I get it going hahah

It stands for Uncomplicated FireWall. Check out Ubuntu’s info page for more information

I would double check the config, because it’s not resolving for me -

> dig @ A

; EDNS: version: 0, flags:; udp: 1452
;                   IN      A

;; AUTHORITY SECTION:            900     IN      SOA 1 7200 900 1209600 86400

(this translates to there is no A record). I also ran using Google’s DNS resolver instead of Cloudflare, with the same result

Bro I already checked, look, is there something besides this that I have to do?

Also I was checking and nginx still doesn’t run after running the setup step by step, this is the log:

 sudo nginx status
[sudo] password for arturo:
nginx: invalid option: "status"

   arturo@ip-...:/var/www/blog$ cd /usr/sbin/nginx
  -su: cd: /usr/sbin/nginx: Not a directory

Wrong command :P you need to run sudo service nginx status

With regards to your dns, I don’t use Route53 so I wouldn’t know where to start in telling you how to fix it. All I can tell you is directly querying your NS (specifically doesn’t return an A record, which suggests something’s wonky with your config :confused:

Thanks for the help, I ran the command and says that nginx is running :raised_hands: could you help me set it up with the ip of my VPS instead and I’ll troubleshoot the DNS later?
Do I run ghost setup to begin? If so what do I put on the URL? My IPv4 Public IP?

It’s been a while since I’ve setup an instance, so this might be a bit rough, but if I remember correctly, that’s what you need to do.

example url:

Ok… I’m proud to say that I got it working finally… jesus… what a nightmare is this AWS… working great, I haven’t touch anything yet or set it up, but wanted to let you know. Thanks for the help. I’ll be posting a guide soon to help out Ghost :grin:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.