Ghost is a content management system for blogs with additional features like newsletters and monetized subscriptions.


To install a Ghost application follow our general instructions for adding applications and select "Ghost" as the application type in step 5.

When the installation is complete the app will be installed in the directory /home/shelluser/apps/myapp, replacing "shelluser" is the name of your app's shell user and "myapp" is the name of your app.

The following files and directories will be present in the application directory:

  • start and stop scripts to control the operation of your app.
  • setenv: a script to configure your shell environment when working with your app.
  • ghost: a directory containing your Ghost instance and the Ghost configuration file.
  • node: a directory containing the core Ghost software
  • README: basic info regarding the new app.

Post-Install Steps - IMPORTANT!

  1. Assign your Ghost application to a site in your dashboard and make a note of the site URL.

  2. SSH to the server as your app's shell user and run the following commands to configure the site URL, replacing with your site URL and myapp with your Ghost app's name:

    source ~/apps/myapp/setenv
    cd ~/apps/myapp/ghost
    ghost config url
    ghost restart
  3. Immediately visit your Ghost admin URL (for example to set up your initial admin user.

Running Ghost in production mode

Your Ghost app is initially configured to run in development mode which uses more memory and is a bit slower than production mode.

To run in production mode, SSH to the server as your app's shell user and run the following commands, replacing myapp with your Ghost app's name:

    source ~/apps/myapp/setenv
    cd ~/apps/myapp/ghost
    cp config.development.json config.production.json
    # edit config.production.json if desired then...
    ghost restart

Note that at the time of this writing Opalstack's Ghost installer configures Ghost to use SQLite as its database but the recommended production database is MySQL v8. MySQL v8 is not pre-installed on Opalstack servers and as a result if you want to use MySQL with Ghost then you will need to run your own MySQL instance as a custom application. If you need assistance with running a custom MySQL instance then please contact the Opalstack support team for assistance.

Configuring Ghost to use SMTP email

Your Ghost app is intially configured to use sendmail for its outgoing mail. If you would prefer to use a SMTP server for your site's outgoing mail then SSH to the server as your app's shell user and take the following steps, replacing myapp with your Ghost app's name:

  1. Execute the following commands:

    source ~/apps/myapp/setenv
    cd ~/apps/myapp/ghost
    # replace 'nano' below with your preferred editor
    nano config.development.json
  2. Modify the mail section of the config like so:

    "mail": {
      "transport": "smtp"
      "options": {
        "service": "Your Mail Provider",
        "host": "your_smtp_server",
        "port": 587,
        "secure": false,
        "auth": {
          "user": "your_smtp_login",
          "pass": "your_smtp_password"

    The values to use for Opalstack's SMTP are available at: Email Client Configuration

  3. Save your changes and exit your editor.

  4. Restart Ghost with the following command:

    ghost restart

Installing packages for Ghost with npm

To install additional Javascript packages for your Ghost application SSH to the server as your app's shell user and run the following commands, replacing myapp with your Ghost app's name and package_name with the name of the package:

    source ~/apps/myapp/setenv
    cd ~/apps/myapp/node
    npm install package_name

If the installed package includes binary components that aren't compatible with the server then the package may not work correctly. If you run into binary compatibility issues then try re-installing the package with the NPM_CONFIG_BUILD_FROM_SOURCE environment variable set:

    source ~/apps/myapp/setenv
    cd ~/apps/myapp/node
    NPM_CONFIG_BUILD_FROM_SOURCE=true npm install package_name