{"id":18384,"library":"ghost-cli","title":"Ghost-CLI","description":"Ghost-CLI is the official command-line tool for installing, updating, and managing Ghost (content management system) on production and local environments. Current stable version is 1.29.2, with regular patch releases (approximately monthly). It manages the entire lifecycle: setup, configuration, backups, SSL via Let's Encrypt, Nginx, and Systemd on Ubuntu. Key differentiators: single-command install/update, recommended stack enforcement (Ubuntu, Nginx, MySQL, Node.js), and minimal configuration options to reduce maintenance complexity. Supports both production and local installs.","status":"active","version":"1.29.2","language":"javascript","source_language":"en","source_url":"https://github.com/TryGhost/Ghost-CLI","tags":["javascript","ghost","cli"],"install":[{"cmd":"npm install ghost-cli","lang":"bash","label":"npm"},{"cmd":"yarn add ghost-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add ghost-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required runtime engine: ^20.11.1 || ^22.11.0 || ^24.0.0","package":"node","optional":false}],"imports":[],"quickstart":{"code":"npm install -g ghost-cli@latest\n# Production install (interactive prompts)\nghost install\n# Local install for development\nghost install local\n\n# Or setup a directory:\nmkdir my-ghost\ncd my-ghost\nghost install --no-setup-nginx --no-setup-ssl --no-setup-systemd\n\n# Update Ghost to latest version:\nghost update\n\n# Check status:\nghost status","lang":"javascript","description":"Shows global install, production vs local setup, and basic commands for Ghost management."},"warnings":[{"fix":"Update Node.js to a supported version (20.11.1+, 22.11.0+ or 24.0.0+).","message":"Ghost-CLI requires Node.js ^20.11.1 || ^22.11.0 || ^24.0.0. Older Node versions are not supported.","severity":"breaking","affected_versions":"<1.29.0"},{"fix":"Use Ghost-CLI only with Ghost 1.0.0 and above. For older versions, use legacy tooling.","message":"Ghost-CLI does not support Ghost versions < 1.0.0.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use the recommended stack for production, or use 'ghost install local' for development.","message":"Ghost-CLI is designed for the recommended stack (Ubuntu, Nginx, MySQL, Systemd). Other environments may not work correctly.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update Ghost-CLI to >=1.28.0 to manage Ghost 5.x.","message":"Ghost 5.x introduced a new content API and admin client; Ghost-CLI v1.28+ is required for compatibility.","severity":"breaking","affected_versions":"<1.28.0"},{"fix":"Ensure the database config (docker-compose or direct) is properly set and accessible.","message":"The 'ghost backup' command may fail for Ghost v6+ if the database configuration has changed.","severity":"gotcha","affected_versions":">=1.29.0"},{"fix":"Set environment variables (e.g., GHOST_URL, MAILGUN_SMTP_USERNAME) or use a config.local.json.","message":"The --auto option has been removed in recent versions; use environment variables or config file.","severity":"deprecated","affected_versions":">=1.29.0"},{"fix":"If port usage issues occur, specify port via --port or adjust firewall rules.","message":"Ghost-CLI uses 'portfinder' which may conflict with firewall or Docker networking.","severity":"gotcha","affected_versions":">=1.28.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install -g ghost-cli@latest' and ensure npm global bin directory is in PATH.","cause":"Ghost-CLI not installed globally or PATH not set.","error":"ghost: command not found"},{"fix":"Update Node.js to 20.11.1, 22.11.0, or 24.0.0 using nvm or installer.","cause":"Node.js version is too old.","error":"Fatal error: Node version must be >=20.11.1"},{"fix":"Run 'ghost install' with sudo or install locally with 'ghost install local'.","cause":"Missing permissions to write to /etc/nginx or system directories.","error":"ghost install: EACCES: permission denied"},{"fix":"Start MySQL service: 'sudo systemctl start mysql' or 'sudo service mysql start'.","cause":"MySQL/MariaDB not running.","error":"Error: connect ECONNREFUSED 127.0.0.1:3306"},{"fix":"Check internet connection and DNS settings. If behind proxy, set HTTP_PROXY/HTTPS_PROXY.","cause":"Internet connectivity or DNS issue during update/install.","error":"Error: getaddrinfo ENOTFOUND api.github.com"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}