Production-ready PHP Docker images built on official PHP. Optimized for Laravel, WordPress, and modern PHP applications.
serversideup/php takes the official PHP Docker images and adds everything you need for real-world production use:
- β Secure by Default - Runs as unprivileged user, not root
- β Zero Config Required - Production-ready defaults, customize with environment variables
- β Batteries Included - Composer, common extensions, and helpful utilities pre-installed
- β Framework Optimized - Special automations for Laravel (migrations, queues, Horizon, etc.)
- β Multiple Variations - CLI, FPM, FPM+NGINX, FPM+Apache, FrankenPHP
- β Modern Architecture - Native health checks, S6 Overlay, unified logging
Features
![]() |
![]() |
![]() |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The quick start guide walks you through your first PHP app with Docker:
- β
Run
phpinfo()in your browser - β Change PHP settings with environment variables
- β Upgrade or downgrade PHP by changing one line
- β Switch variations (FPM, FrankenPHP, and more)
Follow the quick start guide β
A Laravel app with NGINX and PHP 8.5, configured with environment variables:
services:
php:
image: serversideup/php:8.5-fpm-nginx
ports:
- "80:8080"
environment:
PHP_MEMORY_LIMIT: "512M"
# Run migrations, storage:link, and optimize on start
AUTORUN_ENABLED: "true"
volumes:
- .:/var/www/htmlChoose the variation that fits your needs. All images follow the pattern:
serversideup/php:{{version}}-{{variation-name}}
| Variation | Best For | Example |
|---|---|---|
| cli | CLI scripts, cron jobs, queues | serversideup/php:8.5-cli |
| fpm | Custom web server setup | serversideup/php:8.5-fpm |
| fpm-apache | Apache-based deployments | serversideup/php:8.5-fpm-apache |
| fpm-nginx | Stable and performant web server | serversideup/php:8.5-fpm-nginx |
| frankenphp | Modern, high-performance apps with worker mode | serversideup/php:8.5-frankenphp |
Note
All images are available on Docker Hub and GitHub Packages.
We support PHP 8.2 through 8.5 with both Debian and Alpine base images. PHP 8.1 is end of life but still built while its base operating systems receive security updates. See our security policy for the rule. PHP 8.6 release candidates are available for testing as 8.6-rc tags, such as serversideup/php:8.6-rc-fpm-nginx. Every rebuild uses the newest release candidate on php.net.
Learn More About Choosing an Image β
| βοΈ Variation | π Version |
|---|---|
| cli | Debian Based Alpine Based |
| fpm | Debian Based Alpine Based |
| fpm-apache | Debian Based |
| fpm-nginx | Debian Based Alpine Based |
| frankenphp | Debian Based Alpine Based |
| unit (removed) |
Need help integrating Docker with your PHP application?
- Managed Hosting - CI/CD design, managed hosting, guaranteed uptime
- One-time Session - Video + screen-sharing with core contributors
- Complete Development Team - Get help from hardware to pixel and everything in between.
- Website overview of the product.
- Docs for setup guides and the full reference.
- Discord for friendly support from the community and the team.
- GitHub for source code, bug reports, and project management.
- Get Professional Help - Get video + screen-sharing help directly from the core contributors.
Bug fixes, features, and docs improvements are all welcome. Read the contribution guide and code of conduct before opening a pull request.
- Bug Report: If you're experiencing an issue while using these images, please create an issue.
- Feature Request: Make this project better by submitting a feature request.
- Documentation: Improve our documentation by submitting a documentation change.
- Community Support: Help others on GitHub Discussions or Discord.
- Security Report: Report critical security issues via our responsible disclosure policy.
Need help getting started? Join our Discord community and we'll help you out!
All of our software is free and open to the world. None of this can be brought to you without the financial backing of our sponsors.
Deimos Industries Β· CarePilot (Formerly DocuCare)
These companies give us free access to the tools and infrastructure we use to build, test, and ship our open source projects. Their support helps our entire community.
We're Dan and Jay - a two-person team with a passion for open source products. We created Server Side Up to help share what we learn.
Get two senior Laravel experts who deliver quality code with predictable monthly pricing. Dan and Jay have 30+ years of combined experience building scalable Laravel applications.
- π― Complete Laravel expertise - Full-stack development, CI/CD, database optimization, mobile apps
- π° Predictable pricing - Fixed monthly subscription, no hourly billing surprises, 40%+ savings
- β‘ Maximum productivity - 90%+ development time, no meetings, results in days not weeks
- π‘οΈ Risk-free - 7-day money-back guarantee, cancel anytime
- π Blog - Get the latest guides and free courses on all things web/mobile development.
- π Community - Get friendly help from our community members.
- π€΅ββοΈ Get Professional Help - Get video + screen-sharing support from the core contributors.
- π» GitHub - Check out our other open source projects.
- π« Newsletter - Skip the algorithms and get quality content right to your inbox.
- π₯ X (Twitter) - You can also follow Dan and Jay.
- β€οΈ Sponsor Us - Please consider sponsoring us so we can create more helpful resources.
If you appreciate this project, be sure to check out our other projects.
- Self-Host Pro: Sell self-hosted software in minutes.
- Spin Pro: Production-ready Docker templates for shipping quickly.
- Spin: Docker Simplified. Deploy Anywhere. Zero Downtime. Any OS.
- Financial Freedom: Open source alternative to Mint, YNAB, and more.
- AmplitudeJS: Customize the design of any element of the HTML5 Audio Player.
- webext-bridge: Messaging in Web Extensions made easy. Batteries included.
- serversideup/ansible: Run Ansible anywhere with a lightweight and powerful Docker image.
- Building Browser Extensions: Build browser extensions for Firefox, Chrome, and more.
- Ultimate Guide To Building APIs & SPAs: Build web and mobile apps from the same codebase.
















