Deploying Statamic on Proxmox LXC Containers
Why LXC?
Docker gets all the hype, but LXC containers are an underrated option for hosting small sites. They're lighter than VMs, give you a full Linux userspace, and on Proxmox they're dead simple to manage.
For a flat-file CMS like Statamic, an LXC container is perfect: you get full filesystem access, easy snapshots for backups, and none of the Docker networking complexity.
The Setup
Here's the high-level architecture:
- Proxmox host runs on a dedicated machine
- LXC container (Debian) hosts PHP, Nginx, and the Statamic app
- Cloudflare Tunnel handles HTTPS and DNS
- Git deploy pushes content and code changes
Container Configuration
I'm using a minimal Debian LXC with:
- PHP 8.2 with common extensions (mbstring, xml, curl, zip)
- Nginx as the web server
- Composer for PHP dependency management
- Node.js for building frontend assets
The container uses about 256MB of RAM at idle — much lighter than a Docker setup with separate containers for each service.
Deployment Flow
The deployment is simple:
# SSH into Proxmox, then into the container
ssh root@proxmox "pct exec 103 -- bash -c '
cd /var/www/sobesto-blog
&& git pull
&& composer install --no-dev
&& npm run build
&& php artisan cache:clear
&& php please stache:clear
'"
Since Statamic is flat-file, there are no database migrations to worry about. Pull the code, build assets, clear cache — done.
Backups
Proxmox makes backups trivial. I snapshot the entire container weekly, and since all content is in git, I have a second layer of backup automatically.
Trade-offs
The main downside vs. a managed platform is that you're responsible for security updates and server maintenance. But for a personal blog, the control and simplicity are worth it.
LXC containers are one of those tools that, once you use them, you wonder why you ever reached for anything heavier.