How to Set Up Ghost CMS with MariaDB Using Podman-Compose

Easy Ghost CMS + MariaDB Setup
Easy Ghost CMS + MariaDB Setup

Live stream set for 2025-08-06 at 14:00:00 Eastern

Ask questions in the live chat about any programming or lifestyle topic.

This livestream will be on YouTube or you can watch below.

Setting Up Ghost CMS with MariaDB Using Podman-Compose

Introduction

Ghost is an open-source blogging and content management system (CMS) designed for simplicity, speed, and flexibility. It’s a great alternative to other CMS platforms, especially if you’re looking for a lightweight yet powerful system for blogging. In this guide, we’ll show you how to easily set up Ghost using Podman-Compose, connecting it to a MariaDB database.

Podman-Compose is a great tool for managing multi-container applications, making it easy to orchestrate Ghost and its database using containers. In this tutorial, we will guide you step by step through the process.

Prerequisites

Before we begin, ensure you have the following installed on your system:

  • Podman
  • Podman-Compose
  • A text editor (such as VSCode or Nano)

We also recommend that you have some basic understanding of Docker, Podman, and database management systems like MariaDB. If you’re new to PHP or want to level up your programming skills, check out my book, “Learning PHP”, and my course, “Learning PHP”.

Step 1: Setting Up Podman-Compose

To begin, we need to create a directory where we will store the files for Ghost and MariaDB. Open a terminal and run the following commands:

mkdir ghost-setup
cd ghost-setup

Step 2: Create podman-compose.yml File

Inside your ghost-setup directory, create a file called podman-compose.yml. This file will define both the Ghost CMS container and the MariaDB container. Add the following configuration:

version: '3'
services:
  ghost:
    image: ghost:latest
    container_name: ghost
    restart: always
    environment:
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: example
      database__connection__database: ghost
    ports:
      - "2368:2368"
    depends_on:
      - db
    networks:
      - ghost-net

  db:
    image: mariadb:latest
    container_name: ghost-db
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: ghost
    networks:
      - ghost-net

networks:
  ghost-net:
    driver: bridge

This podman-compose.yml file defines two services:

  • Ghost: The CMS running in a container, connected to the MariaDB database.
  • MariaDB: A database running in a separate container that Ghost will use to store content.

Step 3: Start the Containers with Podman-Compose

Now that your configuration file is ready, you can start the containers using Podman-Compose. In the terminal, run:

podman-compose up -d

This will pull the necessary images and start the Ghost CMS and MariaDB containers in detached mode.

Step 4: Accessing the Ghost CMS

Once the containers are running, you can access your Ghost blog by visiting:

http://localhost:2368

You should see the default Ghost welcome screen. Follow the setup process to create your admin account, and you’re ready to start blogging!

Step 5: Customize Your Ghost Installation

After setting up Ghost, you can start customizing your theme, installing plugins, and writing your blog posts. Explore the Ghost admin interface to make your blog your own.

Screenshots & Live Screencast

Ghost Compose YAML File
Gnome Text Editor Displaying Ghost CMS Compose YAML File

Ghost CMS Podman Compose Build
Command Line Installation Of Ghost CMS Via Podman Compose Build

Ghost CMS Installation Screen
Web Browser Displaying Ghost CMS Installation Screen

Ghost CMS Dashboad Screen
Web Browser Displaying Ghost CMS Dashboard Screen

Ghost CMS Settings Screen
Web Browser Displaying Ghost CMS Settings Design Screen

Ghost CMS Post Editor
Web Browser Displaying Ghost CMS Post Editor Screen

Ghost CMS Backend Posts Screen
Web Browser Displaying Ghost CMS Backend Posts Screen

Ghost CMS Backend Members Screen
Web Browser Displaying Ghost CMS Backend Members Screen

Ghost CMS Backend Share Screen
Web Browser Displaying Ghost CMS Backend Share Screen

Ghost CMS General Settings Screen
Web Browser Displaying Ghost CMS General Settings Screen

Ghost CMS Frontend
Web Browser Displaying Ghost CMS Frontend Screen

Ghost CMS Installation And Setup Screencast

Need Help?

If you’re new to setting up Ghost or have specific questions, feel free to reach out! I offer one-on-one programming tutorials, including assistance with setting up or migrating your Ghost installation. Visit my contact page for more information.

Conclusion

With these simple steps, you’ve successfully set up Ghost CMS with MariaDB using Podman-Compose. Ghost is a powerful and lightweight platform for blogging, and by connecting it to MariaDB, you’re ensuring a solid database foundation for your blog.

If you’re looking to deepen your PHP skills, check out my book “Learning PHP” and course “Learning PHP”. I’m also available for personalized programming sessions and migration help if needed!

About Edward

Edward is a software engineer, web developer, and author dedicated to helping people achieve their personal and professional goals through actionable advice and real-world tools.

As the author of impactful books including Learning JavaScript, Learning Python, Learning PHP, Mastering Blender Python API, and fiction The Algorithmic Serpent, Edward writes with a focus on personal growth, entrepreneurship, and practical success strategies. His work is designed to guide, motivate, and empower.

In addition to writing, Edward offers professional "full-stack development," "database design," "1-on-1 tutoring," "consulting sessions,", tailored to help you take the next step. Whether you are launching a business, developing a brand, or leveling up your mindset, Edward will be there to support you.

Edward also offers online courses designed to deepen your learning and accelerate your progress. Explore the programming on languages like JavaScript, Python and PHP to find the perfect fit for your journey.

📚 Explore His Books – Visit the Book Shop to grab your copies today.
💼 Need Support? – Learn more about Services and the ways to benefit from his expertise.
🎓 Ready to Learn? – Check out his Online Courses to turn your ideas into results.

Leave a Reply

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