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.

The image runs PHP with Apache and serves Plainpad on port 80. The current image is version 1.1.1.

Prerequisites

1. Create an Application Key

Plainpad uses an application key to encrypt notes for users who turn on encryption. Create one once and keep it safe:

echo "base64:$(openssl rand -base64 32)"

Important: Always pass the same APP_KEY. Without it the container makes a new key every time it is recreated, and encrypted notes can no longer be read.

2. Docker Compose

Save this as docker-compose.yml, paste your key into APP_KEY and pick your own passwords:

services:
  plainpad:
    image: alextselegidis/plainpad:latest
    depends_on:
      - mysql
    ports:
      - '80:80'
    environment:
      - APP_KEY=base64:paste-your-key-here
      - BASE_URL=http://localhost
      - DEBUG_MODE=FALSE
      - DB_HOST=mysql
      - DB_NAME=plainpad
      - DB_USERNAME=root
      - DB_PASSWORD=secret
  mysql:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=plainpad
    volumes:
      - db_data:/var/lib/mysql

volumes:
  db_data:

Start the services with:

docker compose up -d

The db_data volume keeps your notes when containers are recreated or updated.

3. Set Up the Database

Wait until MySQL has started (the first start takes a minute), then create the tables and the admin account:

docker compose exec plainpad php artisan migrate:fresh --seed --force

Run this only once, on the new, empty database. It deletes all existing tables.

Open http://localhost and log in with admin@example.org / 12345678. Change the email and password right away in your Profile.

Updating

Don't use Settings → Update inside the container: the update is written into the container and lost when it is recreated. Pull the new image instead, then apply database changes:

docker compose pull
docker compose up -d
docker compose exec plainpad php artisan refresh

Environment Variables

The Plainpad Docker image supports the following environment variables:

  • APP_KEY - The application key from step 1. Keep it the same forever.
  • BASE_URL - The base URL of your Plainpad instance (e.g. https://notes.example.com)
  • DEBUG_MODE - FALSE in production. Set to TRUE only while troubleshooting.
  • DB_HOST - Database host
  • DB_NAME - Database name
  • DB_USERNAME - Database username
  • DB_PASSWORD - Database password

Mail is not configured through environment variables. Configure mail in the app under Settings → Mail.

Need Help?

If you run into issues with Docker: