Setting up a self-hosted Ghost publication requires careful planning around environment, dependencies, and process. This guide walks through each stage of installing Ghost, from server preparation to production launch, while highlighting configuration choices that affect long term stability.
Preparing the Server Environment
Before you install Ghost, confirm that your hosting provider or VPS meets the minimum requirements. Ghost runs on Node.js, so a compatible version of Node and a package manager such as npm or yarn are essential. Most modern Linux distributions work, but Ubuntu 22.04 LTS is a reliable baseline with consistent package support. You will also need a non-root user with sudo privileges to avoid running the application as the root account. SSH access, a firewall, and basic networking setup should be in place before proceeding.
System Updates and Dependencies
Update the operating system packages to reduce the risk of conflicts during installation. On Debian based systems, a simple sudo apt update && sudo apt upgrade -y brings key components current. Install essentials like curl , unzip , and a text editor such as nano or vim . These utilities make later steps, including log inspection and configuration edits, much easier to handle.
Installing Node.js and Ghost CLI Ghost recommends using the LTS version of Node.js for production deployments. The NodeSource repository provides versioned packages that integrate cleanly with standard Linux package managers. After adding the repository, install Node.js with a command such as sudo apt install nodejs . Verify the installation by checking the Node and npm versions. Then install Ghost CLI globally using npm install -g ghost-cli , which gives you the command line tool needed to create and manage instances. Verifying the Installation Run ghost --version to confirm that the CLI is correctly installed and available in your PATH. If the command returns a version number, the environment is ready for the next phase. Should you encounter permission errors, revisit your npm global path configuration or use a Node version manager to avoid relying on sudo for package installation. Creating a Ghost Instance
Ghost recommends using the LTS version of Node.js for production deployments. The NodeSource repository provides versioned packages that integrate cleanly with standard Linux package managers. After adding the repository, install Node.js with a command such as sudo apt install nodejs . Verify the installation by checking the Node and npm versions. Then install Ghost CLI globally using npm install -g ghost-cli , which gives you the command line tool needed to create and manage instances.
Verifying the Installation
Run ghost --version to confirm that the CLI is correctly installed and available in your PATH. If the command returns a version number, the environment is ready for the next phase. Should you encounter permission errors, revisit your npm global path configuration or use a Node version manager to avoid relying on sudo for package installation.
Choose a dedicated directory for your Ghost installation, typically under /var/www , and ensure that the web server user has appropriate permissions. Running ghost install inside this directory starts an interactive setup that asks whether you want to proceed with the process. The CLI checks system compatibility, validates URLs, and guides you through content directory configuration. Following the prompts carefully reduces the chance of misconfigured paths or services.
Web Server and Database Configuration
The installer offers a choice between using Ghost's built-in ghost-cli web server or integrating with a full featured web server like Nginx. For production, enabling SSL through a trusted provider such as Let's Encrypt is strongly recommended to secure admin and reader connections. The process also sets up SQLite by default, but you can configure MySQL or MariaDB if you need greater concurrency or data durability.
Post Installation Setup
After the installation finishes, Ghost creates an administrative user and provides a URL for the Ghost Admin panel. Bookmark this URL and set up strong credentials to protect content and settings. Configure general settings, including publication logo, social links, and member permissions, to align with your brand and audience needs. At this stage you can also define permalinks, enable or disable comments, and plan your content structure.