/ unRAID

How to setup a blog with Ghost on unRAID

Ghost is a modern, open source publishing platform built on Node.js with an Ember.js admin client, a JSON API, and a theme API powered by Handlebars.js. These instructions will get you setup with a blog running with Ghost. All the Ghost documentation can be found here.

Installing MySQL

If you allready have MySQL setup on a machine, you can skip to installing Ghost however make sure you have a user for Ghost setup first

  1. Open up Comunity Applications and search for MySQL
  2. There will be only one result called MySQL, install this container
  3. Set the MYSQL_ROOT_PASSWORD, this is the root users password so make sure its secure
  4. Now set MYSQL_DATABASE. This is the name of the database MySQL will create. I recomend setting this to ghost, ghost_db or something similar so you know what it is but it can be anything. Remeber what you set it as, you will need it later.
  5. Next set MYSQL_USER. This is the user that Ghost will use to connect to the MySQL database. Again it can be anything but I set mine to ghost. Again, you will need this later.
  6. Finally set MYSQL_PASSWORD. This is the password for the user you just setup. Make it secure and remeber it!
  7. You can change the port if you have clashes but you shouldn't and feel free to change the appdata location if you so desire.
  8. Now it's all setup, you can click Apply. Wait for it to setup and then move on to the next section

Setting Up Mailgun

Mail gun is an SMTP service. It's free to use up to 10.000 emails per month. In theory you can use other SMTP services however the documentation doesn't mention it so I stuck with Mailgun.

  1. Head on to mailgun.com and signup for an account
  2. After signing up with Mailgun, verify your email address and log-in to your account.
  3. Mailgun allows you to use your own domain for sending transactional emails but if you do not own one it is possible to simply use the handy subdomain that they provide you with (also known as the sandbox domain), although sandbox domains are limited to 300 emails per day. You can change this later, so for now let's use the subdomain automatically generated for you.
  4. Next you're going to need to find your new email service username and password that Mailgun have created for you (they're not the ones you sign up with), by clicking on your sandbox domain on the right hand side. Here is an updated screencast to understand exactly where to find these details:

415eef1-6uCVuZJ-1-

Installing Ghost

  1. Open up Comunity Applications and search for Ghost
  2. Once located, click the install button
  3. First set the Database IP. This is the IP address of the machine hosting your MySQL instance. If you followed the previous section it will be the IP of your unRAID machine.
  4. Next set the Database User, Database Password and Database Name. We set these up in the first section. If you setup your own MySQL installation then you should know what these values are.
  5. The URL can be set to the URL that you wish to access Ghost from. Leave this blank if you are only running this locally.
  6. Mail Transport and Mail Service should be left as is if you are using Mailgun
  7. Mailgun Username and Password should be the vaules you found in the previous section. Remeber they're not the ones you sign up with!
  8. In the hidden settings you can change the port if you have a clash along with the appdata location
  9. Once complete, hit the apply button and wait for it to setup
  10. Now naviagte to <unRAID_IP>:2368 or the URL you specified This shoudl load up Ghost with a load of example posts on how to get started

Managing your site

Now you can head to <unRAID_IP>:2368/login or yourdomain.com/login as there is no button for that yet, to access the in site admin and posting controls like Wordpress has. However, I prefer the desktop app. It looks exactly the same as the web version but it just keeps it seperate from my browser (there is an app for that too!) You can download the desktop app here. Whichever method you chose, the settings and options are pretty self explanatory. I do however recomend reading through the getting started posts, just to get yourself familiar with things. When you do hit the login page you may be confused as you haven't set up any login details. Just enter the details you want to be your login and it will take you to another page to finalise setting up your Ghost account. At this point it's also a good idea to test your mail config. Head over to the Ghost admin page and select the Labs tab. In there click the Send button under "Test email configuration". This will send a test email to the email asscoiated with your account.

Nginx Reverse Proxy

I recomend setting up a reverse proxy or similar service to direct web requests to the Ghost container however, this section is optional, but I thought I would share my Nginx config. This will make your Ghost site available at the listen address you specify. You will then want to change the home labale to the address you wish users to access your installation. Im using the LinuxServer.io Lets Encrypt container for my reverse proxy. You can view the /config/nginx/ssl.conf file at the Linux Server Github. I have only made one change, to comment out ssl_session_tickets off; as it was causing issues.

Ghost Config

server {
        listen 80;
        server_name <domian_name>;
        return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    server_name <domain_name>;
    
    include /config/nginx/ssl.conf;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header HOST $http_host;
        proxy_set_header X-NginX-Proxy true;

        proxy_pass http://<unRAID_IP>:2368;
        proxy_redirect off;
    }
}
How to setup a blog with Ghost on unRAID
Share this