How to Run Ghost Blog Platform at IIS
Table of Contents
- Introduction
- Tested Environments
- Install Node.js
- Install IIS
- Install IISNode
- Install URL Rewrite Module
- Download and Set Up Ghost
- Add web.config
- Add Website in IIS
- Conclusion
Introduction
This is about how to set up Ghost to run on an IIS Web Server. You need to follow the steps below to set up Ghost on IIS.
Tested Environments
The following instructions have been tested on these environments:
- Windows 7 (64-bit) + IIS 7
- Windows Server 2012 R2 + IIS 8
Install Node.js
-
Select the 64-bit Windows Installer (.msi)
-
Follow the installation guide to install Node.js (installed as v0.12.7)
Install IIS
-
How to install IIS (IIS 7 on Windows 10, Windows 8, Windows 7)
-
Windows + C, open Programs and Features as a command, or go to Control Panel to open Programs and Features.
Install IISNode
-
Do a test to make sure iisnode is installed correctly.
-
Go to
/Program Files/iisnode. -
Click
setupsamples.bat— this batch file will tell you how to set up a sample website on IIS using iisnode.
Install URL Rewrite Module
Install URL Rewrite 2.0.
Download and Set Up Ghost
-
Download Ghost (downloaded v0.6.4, 2.4mb zip)
-
Unzip the Ghost folder and ensure all files and folders have
IUserpermission. -
Move the unzipped folder to where you want to host your Ghost application.
-
Add
IUserwith modify permission to the entire Ghost folder. -
You might have to add your local user with modify permission to the folder.
-
If you get a specific error about
/content/datanot having permission, add your local user to that folder as well.
Add web.config
Add a web.config file at the root folder (example location: /ghost-0.6.4/web.config).
If you want the IIS site to run in Production mode, change the configuration accordingly.
<!--
See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for information regarding iisnode specific configuration options.
-->
If you don't want to turn on logging, debugging, or dev errors, set the following flags to false:
loggingEnabled="true" debuggingEnabled="true"
devErrorsEnabled="true"
Add Website in IIS
-
Add a website and point it to the Ghost root folder.
-
Example screen of the site:

-
Since you can create an IIS site, you can change the IP address, port number, and hostname, just as you would for a .NET site.
-
If you have a domain name to use, change your hostname to point to the server's IP address and add the hostname to the IIS site.
-
Run
npm start --productionso npm will install all the dependency modules. -
Try
npm startto check if the site is able to run locally.
At this point, you should be able to have a Node.js site running with IISNode that is public to everyone.
Conclusion
Setting up Ghost on IIS requires installing Node.js, IIS, iisnode, and the URL Rewrite module. After configuring permissions and adding the web.config file, you can host the Ghost blogging platform on an IIS Web Server just like any other .NET site.