How to Deploy Ghost Blog with Nginx on Debian 12

Ghost is a popular open-source blogging platform that’s lightweight and simple to deploy. In this guide, we will walk through the steps required to deploy Ghost Blog with Nginx on Debian 12. This setup is ideal for running your Ghost blog on a VPS server.

Step 1: Update Your VPS Server

First, make sure your VPS server is updated. Connect to your server using SSH and run the following commands:

sudo apt update
sudo apt upgrade -y

Keeping your system up to date ensures that you have the latest security patches and features.

Step 2: Install Nginx

Ghost uses Nginx as a reverse proxy, so let’s install Nginx on your VPS server:

sudo apt install nginx -y

Once Nginx is installed, you can start and enable it with the following commands:

sudo systemctl start nginx
sudo systemctl enable nginx

Step 3: Install MySQL or MariaDB

Ghost requires a database, and we will use MariaDB (a drop-in replacement for MySQL) for this setup. Install MariaDB by running the following command:

sudo apt install mariadb-server -y

Once the installation is complete, secure the database by running:

sudo mysql_secure_installation

Follow the prompts to set a root password and secure the database.

Step 4: Install Node.js

Ghost is built with Node.js, so we need to install it. Run the following commands to install Node.js from the official NodeSource repository:

curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install nodejs -y

Verify the installation by checking the version:

node -v

Step 5: Install Ghost CLI

Ghost-CLI is a command-line tool that makes it easy to install, configure, and manage Ghost. Install it globally on your VPS server using npm:

sudo npm install ghost-cli@latest -g

Step 6: Set Up Your Ghost Directory

Create a directory for your Ghost blog. This directory will host your blog files. For this example, we’ll create a directory under /var/www/ghost:

sudo mkdir -p /var/www/ghost
sudo chown $USER:$USER /var/www/ghost
cd /var/www/ghost

Make sure to replace $USER with your actual username.

Step 7: Install Ghost

From within the Ghost directory, install Ghost using the CLI:

ghost install

During installation, you’ll be asked to provide details like the blog URL, MySQL database information, and email configuration. Make sure to follow the prompts and configure your Ghost blog as needed.

Step 8: Configure Nginx

Once Ghost is installed, you’ll need to configure Nginx to act as a reverse proxy for your blog. Ghost will automatically create an Nginx configuration file. To apply the configuration, restart Nginx:

sudo systemctl restart nginx

You can now access your Ghost blog at the domain or IP address you provided during installation.

Step 9: Secure Your VPS Server with SSL (Optional)

If you want to secure your blog with SSL, you can install Let’s Encrypt. Ghost-CLI makes it easy to enable SSL by running:

ghost setup ssl

This will automatically install Let’s Encrypt and configure your Nginx server to use SSL for HTTPS.

Conclusion

Congratulations! You have successfully deployed Ghost Blog with Nginx on your Debian 12 VPS server. This setup ensures a fast, secure, and scalable environment for your blog. If you need more resources or want to upgrade your infrastructure, consider using a high-performance VPS server from 000WEBHOTING.UK.

Windows VPS

Windows VPS UK

Windows VPS

VPS Windows

Serwer VPS Windows

VPS Windows Deutschland

Windows VPS Hosting

VPS Windows España

Windows VPS Nederland

VPS Windows Italia

VPS Windows Portugal

VPS Windows ??????

VPS Windows ???????

VPS Windows ??

VPS Windows Sverige

VPS Windows Norge

VPS Windows ????

VPS Windows Türkiye

Remote Desktop Services (RDS)

RDS CAL (Client Access License)

Remote Desktop VPS

Keywords: windows vps uk, windows vps, uk windows vps, windows vps hosting uk, vps windows server, uk vps windows, vps windows, servidor vps windows, vps uk windows, vps with windows, virtual private server windows, windows virtual private server, windows vps server uk, vps for windows, servidores vps windows, vps windows uk, windows vps hosting, vps windows hosting, windows vps server, windows virtual private servers, vps on windows, vps windows servers, cheap windows vps uk, windowsvps, windows desktop vps, buy vps windows, windows server vps, windows 10 vps uk, rds services, rds cal, remote desktop services, remote desktop hosting

#windowsvps #vpshosting #ukvps #virtualserver #windowsvpsuk #vpsserver #hostingvps #cloudvps #windowsvpshosting #cheapvps #vpswithwindows #windowsserver #servervps #vpssolutions #vpswindows #rdscal #remotedesktop #remotedesktopvps #rds #windowsrds

vps windows