linux

Debian & Podman: The Ultimate Front-End Sandbox

2026-02-18 linux 3 min read

This guide is for the front-end developer who wants a professional, isolated, high-performance local environment without the overhead of heavy virtual machines.

By combining Debian (via WSL), Podman, and VSCodium, you create a 'sandbox' where you can test WordPress themes, manage containers, and break things safely.

1. The Foundation: WSL & Debian for Front-End Developers

Before you can start with WordPress containers, you need a solid Linux environment inside Windows. We'll use WSL2 to run Debian, then install Podman to manage containers.

  1. Install WSL: Open PowerShell as Administrator and run:
    wsl --install
    Windows will prompt you to restart. This will install WSL2 and the default Ubuntu distribution (you can change it to Debian later).
  2. Install Debian: In Microsoft Store, search for Debian and install it. Once installed, open Debian in Windows Terminal and set your username/password.
  3. Update Debian: Always make sure your packages are up to date:
    sudo apt update && sudo apt upgrade -y
  4. Install Podman: Podman is a daemonless container manager. Run:
    sudo apt install podman -y
  5. Enable Podman in Rootless Mode: Configure Podman to run without root for safer development:
    sudo loginctl enable-linger $USER
  6. Create Project Folder: Best practice is to keep all projects in a /src directory:
    mkdir -p ~/src/wordpress-site
  7. Create Podman Compose YAML: Inside your project folder, create podman-compose.yml for WordPress, database, and optional tools like phpMyAdmin or MailHog. Example:
    services:
      wordpress:
        image: docker.io/library/wordpress:latest
        container_name: wp_container
        ports:
          - '8080:80'
        volumes:
          - ./wp-data:/var/www/html:Z
      db:
        image: docker.io/library/mariadb:latest
        container_name: db_container
        environment:
          MYSQL_ROOT_PASSWORD: example
  8. Use WP-CLI: Once containers are running (podman-compose up -d), you can use WP-CLI inside the WordPress container to manage your site:
    podman exec -it wp_container wp core install --url='localhost:8080' --title='My Site' --admin_user='admin' --admin_password='password' --admin_email='email@example.com'

Congratulations! You now have a fully functional WordPress environment running inside Debian via WSL, managed with Podman, and accessible from your Windows host. Next, we'll focus on container orchestration and permissions.

2. Orchestration with Podman

Podman is our alternative to Docker. For a modern WordPress site, we don't just need a server; we need an ecosystem. Our stack uses MailHog for fake SMTP testing and phpMyAdmin for GUI-based database management.

yaml
						
services:
  app_server:
    image: docker.io/library/wordpress:latest
    container_name: app.project.deb
    ports:
      - '8080:80'
    volumes:
      - ./wp-data:/var/www/html:Z
    networks:
      - wpsite
					

3. Managing Permissions with ACLs

WordPress needs read/write access to certain directories. Using Access Control Lists (ACLs) is safer than using chmod 777. ACLs allow both your Linux user and the container to access files correctly.

  • Grant your local user and the web server access to wp-content:
text
						
# Grant container and local user access to wp-content
sudo setfacl -R -m u:www-data:rwX wp/wp-content
sudo setfacl -R -d -m u:www-data:rwX wp/wp-content
sudo setfacl -R -m u:$(whoami):rwx wp/wp-content
					

Now both your Debian user and the container's internal web server can write to wp-content safely. No need for dangerous global permissions!

4. Automating the Project Setup

To make launching new WordPress sites easy, we create an ignition script ignite-wp.sh. This script will generate folders, set ACLs, and create a consistent starting point.

text
						
# ignite-wp.sh
#!/bin/bash
PROJECT_DIR=$1

mkdir -p "$PROJECT_DIR/wp/wp-content"
mkdir -p "$PROJECT_DIR/backups/db"

# Set safe permissions
sudo setfacl -R -m u:www-data:rwX "$PROJECT_DIR/wp/wp-content"
sudo setfacl -R -d -m u:www-data:rwX "$PROJECT_DIR/wp/wp-content"
sudo setfacl -R -m u:$(whoami):rwx "$PROJECT_DIR/wp/wp-content"

echo "✅ Project $PROJECT_DIR ready!"
					

Run it like this: ./ignite-wp.sh site-name. This ensures every new project starts with correct folders, permissions, and structure.

5. Suggested Workflow for Daily Development

Once your containers and WordPress sites are ready, use these commands to manage your sandbox efficiently:

StepCommandResult
Ignite./ignite-wp.sh site-nameFoldering & Permissions set
Launch Containerspodman-compose up -dWordPress + DB spin up
Open Workspacecodium .Workspace opens
Check Logspodman logs -f wordpressReal-time error tracking
Use WP CLIpodman exec -it wordpress wp core statusInteract with WordPress from terminal

You're reading the first article in this series.
End of this category