Install Ghost Manually on a subdomain.

  • Posted January 6, 2015

I’m having a hard time installing ghost on my droplet. The guides I found online seems to be missing something.

My droplet run ubuntu 14.04 LTS. I want to run ghost on a subdomain ( . I used the guide to here to add subdomains on nginx and got it working. I followed this guide until the part “configure ghost” . I changed the config.example.js file adding on the url “” but I left the host untouched.

Can anyone find me a guide that helps me install ghost on a subdomain using nginx that guide us through the whole process until it is working on port 80?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Setting up Ghost to run on a subdomain behind an Nginx reverse proxy shouldn’t be much different than setting it up normally. The key is to set the server_name directive in your Nginx configuration file.

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;


    root /usr/share/nginx/html;
    index index.html index.htm;

    client_max_body_size 10G;

    location / {
        proxy_pass http://localhost:2368;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;

You’ll also need to setup a DNS record pointing the subdomain to the server.

For all the details on setting Ghost up with Nginx, check out this tutorial: