
What is Ghost?
As an open-source digital publishing platform Ghost functions through Node.js by using its built-in content management system capabilities. The platform combines speed and minimalistic design with lightweight to serve the needs of bloggers, media professionals, and businesses seeking high-performing and clear aesthetics. From this Article, you will get the necessary knowledge to implement Ghost on Ubuntu 24.04 while learning about SEO management, SSL and backup configurations, and additional aspects.
Why Choose Ghost for Your Website
Ghost achieves its main success through its fast performance together with easy operation. Its Node.js development allows Ghost to process concurrent users more efficiently than many CMS platforms built with PHP. The tool delivers an ideal writing platform to publishers who receive built-in SEO tools alongside Markdown accessibility. The platform’s main focus consists of both content output and system performance while keeping all additional functionality out of its way, only purposed to upgrade the system aspects.
Important Features and Benefits of Using Ghost
- Modern Markdown Editor: With Ghost’s Modern Markdown Editor, users can write text as they see instant preview updates of their work displayed onscreen. The writing process remains focused on content creation because the system automatically shows live formatting changes during typing. The enhanced interface enhances productive publishing through a combination of basic syntax and an editing experience, which boosts both creativity and efficiency.
- SEO-Optimized Architecture: Ghost OS includes default installation with essential SEO tools for canonical tags, structure data and sitemap functionalities.
- Theming System: Developers can customize themes or build their themes in GhostOS.
- Scalable: Ghost operates on basic hardware requirements, while its scalability is based on clustering services or container-based implementations.
- Fast Performance: The high-velocity performance of Ghost relies on Node.js because it uses asynchronous operations and minimum resource overhead to back its speed. Ghost achieves faster response times through optimized procedures which enhances visitor connectivity as well as content delivery. By optimizing server-side processing, Ghost achieves exceptional speed. The combination provides organizations with the capability to develop user experiences that match the evolving contemporary expectations of consumers.
- Community Driven: Ghost’s user community offers extensive documentation, tutorials, and plugins bolstered by active support channels for troubleshooting. The exchange of information among different teams helps teams improve their capability to make sound choices for existing business development trends along with future horizons. The creation of new platforms based on teamwork forms the base that enables success between business partners.
Requirements
Make sure your environment includes:
- Ubuntu 24.04 server (fresh install recommended)
- Non-root sudo user
- A domain name pointing to your server’s IP address
- Node.js (LTS version)
- Nginx installed
- SSL certificate (we’ll use Let’s Encrypt)
- Basic utilities like curl and unzip
Setting Up Your Ubuntu 24.04 Environment
Update the Operating System
Upgrading your server’s systems lowers usage problems while making your network function better and safer. Enter this command to start updating your computer system now.
sudo apt update && sudo apt upgrade -y
This ensures you benefit from the latest patches and bug fixes, minimizing vulnerabilities while enhancing overall reliability.
Create a Swap File (if RAM < 2GB)
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Install Required Packages
sudo apt install -y curl unzip nginx
Install Node.js
Ghost requires an active LTS version of Node.js.
Install from NodeSource
Obtain the official NodeSource setup script with
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
This command configures Ubuntu’s package manager to recognize Node.js 18.x. Next, we will install Node.js by running
sudo apt install -y nodejs
Confirm Installation
node -v
npm -v
Installing the Ghost CLI
Install Ghost CLI globally using npm:
Sudo npm install -g ghost-cli
The utility system streamlines Ghost installation procedures and update and management operations through its self-executed setup instructions. After installing, confirm by executing:
ghost version
Creating a Dedicated User for Ghost
Establishing a separate user account for Ghost improves security by isolating its processes.
Run
Sudo adduser ghost user
sudo usermod -aG sudo ghost user
su - ghost user
Installing Ghost
Create Installation Directory
mkdir -p /var/www/ghost
cd /var/www/ghost
Ensure correct permissions:
sudo chown -R ghostuser:ghostuser /var/www/ghost
Start Installation
ghost install
Within your dedicated Ghost user account. Through the Ghost CLI users receive guidance to set their website domain URL while selecting MySQL or SQLite as a database solution and integrating Nginx and enabling automatic systemd service management. Ghost becomes accessible to visitors after completing these operations.
Ghost CLI will guide you through the following:
- Setting URL
- Configuring MySQL or SQLite
- Nginx setup
- SSL setup
- Systemd integration
- Starting the instance
Configuring Ghost for Production
The config file is located at:
/var/www/ghost/config.production.json
Modify these fields:
- url: Your full site URL with HTTPS
- database: MySQL or SQLite settings
- mail: For sending emails
- server: Port (usually 2368) and host (127.0.0.1)
Apply changes with:
ghost restart
Setting Up a Reverse Proxy with Nginx
If Ghost CLI didn’t configure Nginx, do it manually.
Create a new config:
sudo nano /etc/nginx/sites-available/yourdomain.com.conf
Paste:
server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
Location / {
proxy_pass http://127.0.0.1:2368;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Enable and reload:
Sudo ln -s /etc/nginx/sites-available/yourdomain.com.conf
/etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Securing Your Site with SSL Encryption
Install Certbot
sudo apt install -y certbot python3-certbot-nginx
Obtain and Apply Certificate
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
Certbot will configure redirection from HTTP to HTTPS and handle renewal.
Using Systemd to Manage Ghost
Check Ghost’s service name:
systemctl status ghost_yourdomain-com
Use standard systemd commands:
Sudo systemctl start ghost_yourdomain-com
sudo systemctl stop ghost_yourdomain-com
sudo systemctl restart ghost_yourdomain-com
sudo systemctl enable ghost_yourdomain-com
Testing Your Ghost Installation
Open your browser and go to:
https://yourdomain.com
https://yourdomain.com/ghost
Register the admin account and test publishing a post to confirm everything works.
Optimizing Ghost for Speed and SEO
- Use a CDN like Cloudflare for faster global delivery
- Compress images before uploading using tools like TinyPNG
- Leverage caching via Nginx or external services
- Use clean, fast themes
- Fill SEO settings in each post (meta title, description, canonical URLs)
- Enable AMP if needed for mobile performance
Performing Regular Backups and Restorations
Database Backup (MySQL)
mysqldump -u user -p database > backup.sql
SQLite Backup
Copy the DB file:
cp /var/www/ghost/content/data/ghost.db ~/ghost_backup/
Content Backup
cp -r /var/www/ghost/content ~/ghost_content_backup/
Restore with:
mysql -u user -p database < backup.sql
Or copy back SQLite and content directories and restart Ghost.
Troubleshooting Common Issues
- 502 Bad Gateway: Ghost not running or wrong port in Nginx
- Port Conflict: Change Ghost’s port in the config
- Database Errors: Recheck credentials and DB status
- SSL Fails: Ensure port 80 is open, and DNS is correct
- Permission Denied: Ensureghost user owns /var/www/ghost
Advanced Configurations and Customizations
- Multi-site: Separate Ghost installs in different directories and ports
- Themes: Upload via admin or place in /content/themes/
- Integrations: Add Google Analytics, Disqus, or social sharing
- API Access: Use Content and Admin API for custom features
- Email Integration: Configure Mailgun or SMTP
Upgrading Ghost
cd /var/www/ghost
ghost update
Backup before updating. CLI handles versioning, database migration, and restart.
Conclusion
Ghost provides content publishing services usable by beginner and expert users in both personal blog and professional organization contexts. The Ghost CLI allows easy Ubuntu 24.04 installation with the file configuration of nginx as a reverse proxy with SSL encryption and backup systems,s and performance optimization, making it ready for production use.
Ghost combines simplicity and performance with advanced customization potential. Whether you’re running a personal blog or scaling a high-traffic publication, Ghost delivers clean UI, SEO power, and blazing speed.
From setup to scale, the steps above ensure you’re not just hosting a site but running a robust digital publishing machine.
About the writer
Vinayak Baranwal wrote this article. Use the provided link to connect with Vinayak on LinkedIn for more insightful content or collaboration opportunities.