Docker
Pull and run Plainpad using the official Docker image from Docker Hub. Docker allows you to get Plainpad up and running quickly without worrying about server configuration or dependencies.
Prerequisites
- Docker (v20.10 or newer recommended)
- Docker Compose (v2.0 or newer, optional)
- A MySQL database instance
Quick Start
To get started, you'll need a MySQL database. You can start one with Docker and then pull and run Plainpad:
# Start a MySQL instance
docker run -d --name test-db \
-e MYSQL_ROOT_PASSWORD=secret \
-e MYSQL_DATABASE=plainpad \
mysql:latest
# Pull and run the app
docker run -d --name test-app \
--link test-db:db \
-p 80:80 \
-e DB_HOST=db \
-e DB_NAME=plainpad \
-e DB_USERNAME=root \
-e DB_PASSWORD=secret \
alextselegidis/plainpad:latest Database Migration
After the application is booted, run the following command to migrate the database:
docker exec -it test-app php artisan migrate:fresh --seed --force This creates the necessary database tables and an initial admin account you can use to log in.
Docker Compose
You can use the following docker-compose.yml file to set up Plainpad with a MySQL database:
services:
plainpad:
image: alextselegidis/plainpad:1.0.0
ports:
- '80:80'
environment:
- BASE_URL=http://localhost
- DEBUG_MODE=TRUE
- DB_HOST=mysql
- DB_NAME=plainpad
- DB_USERNAME=root
- DB_PASSWORD=secret
- MAIL_PROTOCOL=smtp
- MAIL_SMTP_DEBUG=0
- MAIL_SMTP_AUTH=0
- MAIL_SMTP_USER=
- MAIL_SMTP_HOST=smtp.example.org
- MAIL_SMTP_PASS=
- MAIL_SMTP_CRYPTO=ssl
- MAIL_SMTP_PORT=465
- MAIL_FROM_ADDRESS=info@example.org
- MAIL_FROM_NAME=Example
- MAIL_REPLY_TO_ADDRESS=info@example.org
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=plainpad Start the services with:
docker compose up -d Environment Variables
The Plainpad Docker image supports the following environment variables:
BASE_URL— The base URL of your Plainpad instance (e.g.http://localhost)DEBUG_MODE— Enable or disable debug mode (TRUEorFALSE)DB_HOST— Database hostDB_NAME— Database nameDB_USERNAME— Database usernameDB_PASSWORD— Database passwordMAIL_PROTOCOL— Mail protocol (e.g.smtp)MAIL_SMTP_HOST— SMTP server hostMAIL_SMTP_PORT— SMTP server portMAIL_SMTP_USER— SMTP usernameMAIL_SMTP_PASS— SMTP passwordMAIL_SMTP_CRYPTO— SMTP encryption (e.g.ssl)MAIL_SMTP_AUTH— Enable SMTP authentication (0or1)MAIL_SMTP_DEBUG— Enable SMTP debug output (0or1)MAIL_FROM_ADDRESS— Sender email addressMAIL_FROM_NAME— Sender nameMAIL_REPLY_TO_ADDRESS— Reply-to email address
Need Help?
If you run into issues with Docker:
- Check the Troubleshooting guide
- Ask in our Discord community
- Open an issue on GitHub