Ghost on a LYLIX VPS — modern blogging platform
Ghost is the leading self-hostable blogging platform — modern editor, clean themes, native newsletter / membership features, no plugin ecosystem to maintain. Runs on Node.js with MySQL. Resource-light enough for a 2 GB VPS to host a personal blog with member newsletters.
Sizing
- Personal blog, no members / newsletters: 1 GB / 1 vCPU is fine.
- With memberships + email newsletters: 2 GB / 2 vCPU recommended. Email batches use noticeable RAM.
- Storage: ~5 GB for the base install + content (themes, theme assets, post bodies); media (images) adds whatever your usage demands.
Prerequisites
apt update
apt install -y curl nginx mysql-server
# Or AlmaLinux: dnf install nginx mariadb-server
Create the database:
mysql -u root
CREATE DATABASE ghost;
CREATE USER 'ghost'@'localhost' IDENTIFIED BY 'STRONG_PW';
GRANT ALL ON ghost.* TO 'ghost'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Install Ghost-CLI
# Use a recent Node LTS — Ghost is conservative about supported versions
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
apt install -y nodejs
# Install Ghost-CLI globally
npm install ghost-cli@latest -g
Create the install directory + run installer
useradd -m -s /bin/bash ghost
mkdir -p /var/www/blog
chown ghost:ghost /var/www/blog
chmod 775 /var/www/blog
su - ghost
cd /var/www/blog
ghost install
The installer walks through:
- Public URL (https://blog.example.com).
- MySQL credentials (from above).
- Database name (ghost).
- Whether to set up nginx + SSL (yes — let it use Let's Encrypt).
- Whether to set up a systemd service (yes).
After a few minutes, the blog is live at the URL you gave. Sign up the admin account at https://blog.example.com/ghost/.
Email configuration (for transactional + newsletter)
Without configured mail, Ghost can't send invitations, password resets, or newsletters. Configure via config.production.json in the install directory:
"mail": {
"transport": "SMTP",
"options": {
"service": "Mailgun",
"host": "smtp.mailgun.org",
"port": 587,
"secure": false,
"auth": {
"user": "postmaster@mg.example.com",
"pass": "SMTP_PASSWORD"
}
}
}
Restart: ghost restart. Test by inviting a user; the invitation should land in their inbox.
For high-volume newsletter sending, configure a dedicated mail provider (Mailgun, SendGrid, AWS SES). See the smtp-relay-via-external article.
Themes
Ghost has a small but high-quality theme ecosystem. Default Casper is excellent. Browse alternatives at ghost.org/themes. Drop a theme ZIP at /var/www/blog/content/themes/, activate via Admin → Settings → Design.
Backups
Two parts:
- MySQL ghost database — dump nightly via
mysqldump. - Content directory —
/var/www/blog/content/(images, themes, post exports). Restic this.
Plus Ghost's built-in Admin → Settings → Labs → Export — JSON snapshot of all posts/pages/members. Useful as a portable backup if you ever migrate platforms.
Upgrades
su - ghost
cd /var/www/blog
ghost update
Ghost-CLI handles version checks, DB migrations, restart. Backup before major version bumps.
Also Read
Powered by WHMCompleteSolution