Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Configure and Maintain Ghost from the Command Line

Install and operate self-hosted Ghost safely from the shell with Ghost-CLI: choose the right mode, configure settings, restart correctly, back up before maintenance and recover from failed updates.
Length10 min Posted Quest giverVGSources Team

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Ghost-CLI for the supported command-line workflow: run ghost install for a production site, ghost install local for a SQLite development site, change settings with ghost config, apply them with ghost restart, create a portable archive with ghost backup, and upgrade with ghost update while keeping ghost update --rollback available. Production installs are designed around MySQL 8.0, NGINX, systemd, SSL, and a dedicated low-privilege Linux user.

What Ghost-CLI actually manages

Ghost-CLI is Ghost’s official shell tool for installing and administering self-hosted Ghost. It does more than download application files: the production installer checks the environment, creates the Ghost directory structure, downloads the selected release, configures the database, writes the web-server configuration, requests SSL, creates a restricted service account, and generates a systemd unit. That integration is why it is the supported route for the recommended self-hosting stack.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The command you choose determines the operating model:

Command Intended use Database and process model
ghost install Public production installation MySQL 8.0, NGINX, SSL and systemd are configured during setup
ghost install local Development, testing or local evaluation SQLite and a local process manager
ghost install <version> A controlled production or test deployment The specified Ghost release is installed instead of the default release

Do not treat a local install as a smaller production install. SQLite and a local process manager are useful for development, but the supported public-server design uses MySQL, NGINX and systemd.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Choose and prepare the installation environment

Production prerequisites

Use a current, publicly reachable Linux server and keep its operating system and server software updated. Ghost’s supported self-hosting guidance identifies MySQL 8.0, NGINX and systemd as the recommended production components. Have an account that will own the site and can use sudo when setup needs system-level changes. Run Ghost-CLI as that non-root account rather than operating the application as root.

  • Use MySQL 8.0 for the production database.
  • Use NGINX as the front-end web server.
  • Use systemd to supervise the Ghost service and start it at boot.
  • Plan for SSL during installation so the public URL is served securely.
  • Keep the host operating system, database, web server and Ghost current, because the server is exposed to the public internet.

The installer creates a dedicated ghost system user and group for the service. That account is intentionally low privilege; it should not be replaced with a general-purpose administrative account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Development and local evaluation

For a local site, run ghost install local. This path uses SQLite and a local process manager, making it appropriate for theme work, content experiments and upgrade rehearsals. It does not reproduce the production database, proxy and service-manager integration, so verify production changes in a production-like instance before deploying them.

Run the installer from the site owner’s account

Install Ghost-CLI globally with your system’s Node package manager, then switch to the non-root account that will own the site. A typical shell sequence is:

sudo npm install ghost-cli@latest -g
mkdir -p /var/www/ghost
cd /var/www/ghost
ghost install

Ensure the destination directory is owned by the account running Ghost-CLI before starting. The installer can use sudo for operations such as creating service users, writing NGINX configuration and enabling system services; it should not require you to run the entire Ghost installation as root.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

To pin a release for a controlled deployment, replace the final command with ghost install <version>. Pinning is useful when testing a theme or integration against a known Ghost release, or when your rollout process requires an explicit version rather than the default selected by the CLI.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand the generated directory layout

A production installation separates application versions from persistent site data. The managed layout normally contains:

Path or item Purpose Operational rule
.config.[env].json Environment-specific Ghost configuration Keep valid JSON and edit through Ghost-CLI where possible
.ghost-cli Ghost-CLI metadata for the instance Leave it under CLI management
content Persistent site data such as images, themes and other content Protect it as the important data directory; do not restructure it
current Symlink to the active Ghost version Do not replace it manually
system Service and system integration files Let the installer and service manager maintain it
versions Downloaded Ghost releases used by the instance Use Ghost-CLI for version changes rather than moving files by hand

Keeping this layout intact allows Ghost-CLI to switch versions, restart the service and perform rollback operations predictably. Store operational backups outside the live installation so an outage or damaged directory does not destroy both the site and its recovery archive.

Inspect and change Ghost settings from the shell

Run configuration commands from the instance directory, or add --dir /path/to/site when administering a site from elsewhere. The basic forms are:

ghost config
 ghost config url https://example.com
 ghost config <key>
 ghost config <key> <value>
 ghost restart

The first command opens or creates the configuration. Supplying one key reads its current value; supplying a key and value writes a change. Ghost’s configuration file must be valid JSON in the installation root. A syntactically invalid file prevents Ghost from loading, so avoid hand-editing unless you can validate the JSON and understand the setting being changed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Common configuration areas

Area What it controls Example operation
Public URL The canonical address visitors use ghost config url https://example.com
Admin URL The address used for the Ghost administration interface Read or set the documented admin-URL key with ghost config <key> <value>
Listening address and port The local interface and port Ghost binds to behind NGINX Set the documented server host or port key, then restart
Logging Log transport and related output settings Set the documented logging transport key
Database Client, host, database name, user and password Set the documented database client and connection keys
Mail SMTP or other mail transport and its credentials Set the documented mail transport and credential keys
Process manager How Ghost is supervised Inspect or set the process-manager key; production normally uses systemd

After any configuration change, run ghost restart. Editing the file alone does not reload a running process. If you change the URL, database connection or mail credentials and do not restart, Ghost continues using the old values until the service is restarted.

Start, stop, restart and diagnose an instance

Ghost-CLI provides a consistent lifecycle interface:

Command Result Useful option or note
ghost ls Lists Ghost instances known to the CLI Use it to confirm the instance and directory you are managing
ghost start Starts the configured process manager In production this normally starts the systemd service
ghost stop Stops an instance It can target one instance or all instances
ghost restart Stops and starts the instance with current configuration Required after configuration edits
ghost run Runs Ghost in the foreground Terminal output exposes uncaught errors hidden by a managed start

When working outside the installation directory, add --dir /path/to/site to the lifecycle command. For boot behavior, ghost start --enable enables restart-on-boot and ghost start --no-enable starts without enabling it. Choose deliberately: a production service normally needs automatic recovery after a reboot, while a temporary test instance may not.

When a managed start fails

  1. Run ghost ls and verify that you are addressing the intended instance.
  2. Check that you are in its directory or supply the correct --dir path.
  3. Run ghost run in the foreground. Read the terminal output for configuration, database, permission or application errors.
  4. Correct the reported issue, then use ghost restart or ghost start to return the instance to managed operation.

Foreground execution is a diagnostic mode, not a replacement for systemd in production. Once the error is understood, stop the foreground process and let the configured process manager own the service again.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a recoverable backup before maintenance

Run ghost backup before an upgrade, database change, configuration migration or other high-risk maintenance. Ghost documents a ZIP archive containing:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
  • Content data in JSON form.
  • A complete member CSV export.
  • All installed themes.
  • Images and other media.
  • routes.yaml.
  • redirects.yaml or redirects.json, depending on the instance.

Write the archive to storage outside the live Ghost directory and make sure your operational process can retrieve it. The documented archive is a practical Ghost-level recovery package, but it is not described as a substitute for independent database, server or infrastructure backups. Keep those separate when your recovery objectives require restoring the entire host or database service.

Before relying on a backup, check that the ZIP exists, can be read and is available from the location where an operator would need it during an outage. A backup that remains only on the failed server is not a recovery plan.

Update Ghost safely and roll back a failed release

Ghost-CLI supports both routine and controlled upgrades:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ghost update
 ghost update <version>
 ghost update --rollback
 ghost update --no-restart
Command Use it when
ghost update You want the latest release Ghost-CLI considers compatible with the installation
ghost update <version> You have selected and tested a specific Ghost version
ghost update --rollback The last update failed and you need to return to the previous version using the CLI’s rollback path
ghost update --no-restart You need the files installed without immediately restarting the running service

Create and store a backup before every upgrade. Review the release-specific guidance first, especially for major upgrades: Ghost indicates that major releases arrive approximately every 12–18 months and may break backwards compatibility. Check database requirements and theme compatibility before moving between major versions. A theme that works on the current release is not automatically guaranteed to work after a major upgrade.

The update process also has controls for forced downloads and automatic rollback behavior. Use those controls only when your deployment procedure calls for them, and retain a tested recovery path rather than assuming an automatic rollback covers database or infrastructure damage.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Permissions, ownership and production safety

The production installer creates a dedicated ghost user and group for the systemd service and applies documented directory and file permissions. Normal-user and root installations have different permission expectations. Do not recursively change ownership or make files world-writable as a first response to an error.

  • Use the documented Ghost-CLI checks to identify an ownership or permission fault.
  • Repair only the files and directories implicated by those checks.
  • Prefer administrative uploads for images and themes so the service account does not need unnecessary write access.
  • Keep the service account low privilege and separate from your administrative login.
  • Keep every component on a public-facing production server current.

Manual permission changes can prevent updates, stop Ghost from reading its configuration or expose content to other users on the server. Preserve the installer’s managed ownership model unless a diagnostic result gives you a specific correction to make.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ghost-CLI versus other deployment approaches

Decision axis Ghost-CLI production install Ghost-CLI local install Manual setup
Operating mode Production service Development or evaluation Custom; operator defines the mode
Database MySQL 8.0 SQLite Chosen and maintained by the operator
Process manager systemd Local process manager Chosen and integrated manually
Web server and SSL NGINX configuration and SSL setup are part of the installer workflow Local development arrangement Proxying and certificates are the operator’s responsibility
Database user and service account Installer creates restricted accounts and service integration Local development credentials Operator creates and secures each account
Updates and rollback ghost update with a CLI rollback path Convenient for testing releases Operator owns replacement, migration and rollback procedures

Manual installation remains possible when a custom environment demands it, but every integration that Ghost-CLI normally creates becomes your responsibility: database setup and migrations, reverse proxy configuration, SSL renewal, service supervision, permissions, boot behavior and recovery. For the officially recommended stack, Ghost-CLI reduces that integration work and keeps lifecycle commands consistent.

A practical command-line maintenance routine

For a new production site

  1. Prepare a current server with MySQL 8.0, NGINX and systemd, and create or select the non-root account that will own the site.
  2. Install Ghost-CLI globally and run ghost install from the intended site directory.
  3. Allow the setup stages to create the restricted MySQL user, initialize or migrate the database, write NGINX configuration, request SSL, create the low-privilege service user and generate the systemd unit.
  4. Inspect the instance with ghost ls, then verify the public URL and administration access.
  5. Keep the generated directory layout intact and move backups outside the live directory.

For a configuration change

  1. Change or inspect the value with ghost config from the instance directory, or identify the instance with --dir.
  2. Confirm that the resulting configuration remains valid JSON and that credentials and URLs are correctly quoted.
  3. Run ghost restart so the running process loads the new values.
  4. If the restart fails, run ghost run to expose the underlying error, correct it and return the service to managed operation.

For an upgrade

  1. Review compatibility notes for the target release, including database requirements and theme changes.
  2. Run ghost backup and copy the resulting ZIP outside the live installation.
  3. Use ghost update for the latest compatible release or ghost update <version> for a selected release.
  4. Watch the update output and service status. If the last update fails, use ghost update --rollback.
  5. When a deployment process requires separating installation from activation, use ghost update --no-restart and schedule the restart as a deliberate subsequent action.

Common failure modes and precise responses

“The setting changed, but Ghost still uses the old value”

Most often, the process was not restarted or the command targeted a different directory. Run the configuration command from the instance root, use --dir /path/to/site when necessary, verify the JSON and run ghost restart.

“Ghost will not start after an edit”

Use ghost run so the terminal displays the uncaught error. Invalid JSON, unreachable database credentials, an incorrect mail setting or a permission problem can all prevent startup. Fix the specific reported fault rather than broadening permissions or replacing the managed layout.

“An update stopped halfway”

Do not delete the current, system or versions entries manually. Confirm the backup is available, inspect the CLI output, and run ghost update --rollback for the last failed update. If the failure involves database or infrastructure damage, use the independent recovery procedures for those systems in addition to the Ghost-level archive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Uploads or updates fail with a permission error”

Check ownership and permissions using Ghost-CLI’s documented checks. Correct only the identified paths and preserve the dedicated service account. Administrative uploads are preferable to granting the Ghost process broader write access.

“The local site behaves differently from production”

That difference is expected when the local instance uses SQLite and a local process manager while production uses MySQL 8.0, NGINX and systemd. Use local mode for development, but rehearse database migrations, proxy behavior, SSL and service restarts in an environment that matches production before a public release.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.