Docker
Run Plainpad in a Docker container for easy deployment, isolation, and portability.
What is Docker?
Docker is a platform that allows you to package and run applications in isolated environments called containers. Using Docker to run Plainpad means you don't need to manually configure PHP, a web server, or a database on your host machine — everything is bundled together.
Official Docker Image
The official Plainpad Docker image is maintained by the project and is available on Docker Hub:
alextselegidis/plainpad You can find the image and documentation at hub.docker.com/r/alextselegidis/plainpad.
Quick Start
Pull and run the Plainpad container with a single command:
docker run -d \
--name plainpad \
-p 8080:80 \
-v plainpad_data:/var/www/html/storage \
alextselegidis/plainpad:latest After running this command, open http://localhost:8080 in your browser to access Plainpad.
Docker Compose
For a more robust setup with a MySQL database, use Docker Compose. Create a docker-compose.yml file:
version: '3.8'
services:
plainpad:
image: alextselegidis/plainpad:latest
container_name: plainpad
ports:
- "8080:80"
environment:
- DB_HOST=db
- DB_NAME=plainpad
- DB_USERNAME=plainpad
- DB_PASSWORD=your_secure_password
volumes:
- plainpad_data:/var/www/html/storage
depends_on:
- db
restart: unless-stopped
db:
image: mysql:8.0
container_name: plainpad_db
environment:
- MYSQL_ROOT_PASSWORD=root_password
- MYSQL_DATABASE=plainpad
- MYSQL_USER=plainpad
- MYSQL_PASSWORD=your_secure_password
volumes:
- db_data:/var/lib/mysql
restart: unless-stopped
volumes:
plainpad_data:
db_data: Start the services:
docker compose up -d Common Commands
# Start the containers
docker compose up -d
# Stop the containers
docker compose down
# View logs
docker compose logs -f plainpad
# Restart the Plainpad container
docker compose restart plainpad
# Update to latest image
docker compose pull
docker compose up -d
# Access the container shell
docker exec -it plainpad /bin/bash
# Back up the database
docker exec plainpad_db mysqldump -u plainpad -p plainpad > backup.sql Environment Variables
The Docker image supports the following environment variables:
DB_HOST— Database host (default:localhost)DB_NAME— Database name (default:plainpad)DB_USERNAME— Database usernameDB_PASSWORD— Database password
Persistent Data
To ensure your data persists across container restarts, always mount a volume for the storage directory:
-v plainpad_data:/var/www/html/storage Warning: Without a mounted volume, your data will be lost when the container is removed.
Updating with Docker
- Pull the latest image:
docker compose pull - Recreate the container:
docker compose up -d - Migrations will run automatically on startup
Need Help?
If you run into issues with Docker:
- Check the Troubleshooting guide
- Ask in our Discord community
- Open an issue on GitHub