Page 5: Post-Installation Admin Setup, Firewall Configuration, and Maintenance Commands

9. Configuring Firewall for Web Access

Configure the server firewall (firewall-cmd) to allow external access through HTTP (80) and HTTPS (443) ports. Since Ghost runs behind a web server (Nginx or Apache), you only need to open the standard web ports.

Using Firewall-cmd (Rocky Linux Default Firewall):

# Permanently allow HTTP service
sudo firewall-cmd --permanent --add-service=http
# Permanently allow HTTPS service
sudo firewall-cmd --permanent --add-service=https
# Reload firewall configuration (apply immediately)
sudo firewall-cmd --reload

Using UFW (For Reference, e.g., Debian/Ubuntu):

If you are using UFW, allow the Nginx or Apache profile.

# If using Nginx:
sudo ufw allow 'Nginx Full'

# If using Apache:
sudo ufw allow 'Apache Full'

# Enable firewall and check status
sudo ufw enable
sudo ufw status

10. Accessing Blog and Creating Admin Account

With all configurations complete, access your Ghost blog via a web browser and set up the administrator account.

10.1. Frontend Access

Access your blog\'s home screen by navigating to the configured blog URL in your web browser. (e.g., https://your-domain.com)

10.2. Admin Page Access and Account Creation

Access the admin setup page at the /ghost path. The initial access will prompt you to create the administrator account.

# Enter the following in your web browser address bar
https://your-domain.com/ghost

Follow the on-screen instructions to enter your email, name, and password to create the first administrator account.


11. Ghost Maintenance Commands (CLI)

These are the core Ghost-CLI commands useful for managing Ghost after installation. They must be run by ghost-user inside the /var/www/ghost directory.

Service Management:

# Stop Ghost
ghost stop
# Start Ghost
ghost start
# Restart Ghost (most commonly used)
ghost restart
# Check Ghost status
ghost status

Update:

Used when a new Ghost version is released. Regular updates are recommended for security and features.

# Run automatic Ghost update
ghost update

This concludes the Ghost blog self-hosted installation guide. We wish you success in running your blog!