Publishing Platform

    Installing Ghost CMS on RamNode VPS

    Ghost is a powerful, open-source publishing platform built on Node.js with built-in SEO optimization, membership features, and native newsletter capabilities. Combined with RamNode's reliable VPS hosting, you get enterprise-grade publishing infrastructure.

    Ubuntu 22.04/24.04 LTS
    MySQL 8 + NGINX
    ⏱️ 20-30 minutes

    Prerequisites

    Server Requirements

    RequirementSpecification
    Operating SystemUbuntu 22.04 or 24.04 LTS
    RAMMinimum 1GB (2GB+ recommended)
    Storage20GB+ SSD storage
    Node.jsVersion 22 LTS (current recommended)
    DatabaseMySQL 8
    Web ServerNGINX 1.9.5 or higher

    Before You Begin

    • A RamNode VPS with Ubuntu 22.04 or 24.04 installed
    • Root or sudo access to your server
    • A registered domain name with DNS A record pointing to your server's IP
    • Basic familiarity with the Linux command line

    Part 1: Initial Server Setup

    1

    Connect to Your Server

    Connect to your RamNode VPS via SSH using the credentials provided in your welcome email:

    SSH Connection
    ssh root@your_server_ip
    2

    Create a Non-Root User

    For security reasons, Ghost should not be run as the root user. Create a new user with sudo privileges:

    Create User
    adduser ghostadmin

    Important: Do not use "ghost" as the username, as this conflicts with the Ghost-CLI.

    Grant the new user sudo privileges and switch to that user:

    Grant Sudo & Switch User
    usermod -aG sudo ghostadmin
    su - ghostadmin
    3

    Update System Packages

    Ensure your system is up to date before proceeding:

    Update System
    sudo apt-get update
    sudo apt-get upgrade -y

    Part 2: Install Dependencies

    4

    Install NGINX

    Ghost uses NGINX as a reverse proxy to handle incoming web requests:

    Install NGINX
    sudo apt-get install nginx -y

    If you have UFW firewall enabled, allow NGINX traffic:

    Allow Firewall
    sudo ufw allow 'Nginx Full'
    5

    Install MySQL

    Install MySQL 8 as the database server for Ghost:

    Install MySQL
    sudo apt-get install mysql-server -y

    Configure the MySQL root user with password authentication. Ghost does not support socket-based authentication:

    Configure MySQL
    sudo mysql
    -- Run these commands in the MySQL shell:
    ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY 'your_secure_password';
    FLUSH PRIVILEGES;
    exit

    Security Note: Replace 'your_secure_password' with a strong, unique password. Store this password securely as you'll need it during Ghost installation.

    6

    Install Node.js

    Ghost requires Node.js v22 LTS. Install it using the NodeSource repository:

    Install Node.js
    sudo apt-get install -y ca-certificates curl gnupg
    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
    NODE_MAJOR=22
    echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
    sudo apt-get update
    sudo apt-get install nodejs -y

    Verify the installation:

    Verify Installation
    node --version
    npm --version

    Part 3: Install Ghost

    7

    Install Ghost-CLI

    Ghost-CLI is the official command-line tool for installing and managing Ghost installations:

    Install Ghost-CLI
    sudo npm install ghost-cli@latest -g
    8

    Create the Ghost Directory

    Create a dedicated directory for your Ghost installation with proper ownership and permissions:

    Create Directory
    sudo mkdir -p /var/www/ghost
    sudo chown ghostadmin:ghostadmin /var/www/ghost
    sudo chmod 775 /var/www/ghost
    cd /var/www/ghost
    9

    Run the Ghost Installer

    With all prerequisites in place, run the Ghost installation command:

    Install Ghost
    ghost install

    The installer will prompt you for several configuration options:

    PromptRecommended Response
    Blog URLEnter your full URL (e.g., https://yourdomain.com)
    MySQL hostnamelocalhost (press Enter for default)
    MySQL usernameroot
    MySQL passwordThe password you set in Step 5
    Ghost database nameghost_prod (or your preferred name)
    Set up ghost MySQL user?Yes (recommended for security)
    Set up NGINX?Yes (configures reverse proxy)
    Set up SSL?Yes (free Let's Encrypt certificate)
    Set up systemd?Yes (enables automatic startup)
    Start Ghost?Yes

    Part 4: Post-Installation Configuration

    10

    Complete Ghost Setup

    Once installation completes, access your Ghost admin panel by navigating to:

    Admin URL
    https://yourdomain.com/ghost

    Create your admin account and configure your publication settings including site title, description, and branding.

    11

    Configure Email (Optional)

    For newsletter functionality and transactional emails, configure SMTP settings. Edit the Ghost configuration file:

    Edit Config
    cd /var/www/ghost
    nano config.production.json

    Add your mail configuration within the JSON structure:

    SMTP Configuration
    "mail": {
      "transport": "SMTP",
      "options": {
        "host": "smtp.your-email-provider.com",
        "port": 587,
        "secure": false,
        "auth": {
          "user": "your-email@example.com",
          "pass": "your-smtp-password"
        }
      }
    }

    Restart Ghost to apply changes:

    Restart Ghost
    ghost restart

    Ghost Management Commands

    CommandDescription
    ghost startStart the Ghost service
    ghost stopStop the Ghost service
    ghost restartRestart the Ghost service
    ghost updateUpdate Ghost to the latest version
    ghost logView Ghost logs
    ghost configView or modify configuration
    ghost backupCreate a backup of your content
    ghost doctorDiagnose installation issues

    Troubleshooting

    Best Practices

    Regular Backups

    Use Ghost's built-in export feature (Settings → Labs → Export content) and maintain database backups using mysqldump.

    Keep Updated

    Run 'ghost update' regularly to receive security patches and new features.

    Monitor Resources

    Keep an eye on server resource usage, especially RAM. Consider upgrading your VPS plan if you experience performance issues.

    Security

    Keep your server's packages updated, use strong passwords, and consider implementing fail2ban for additional protection.

    CDN Integration

    For high-traffic sites, consider integrating a CDN like Cloudflare to improve performance and add DDoS protection.

    Additional Resources

    Ready to Deploy Ghost CMS?

    Get started with a RamNode Cloud VPS and have your Ghost publishing platform running in minutes.