Skip to content

Using Docker Compose

This guide covers how to deploy Papra using Docker Compose, ideal for users who prefer declarative configurations or plan to integrate Papra into a broader service stack.

Using Docker Compose provides:

  • A single, versioned configuration file
  • Easy integration with volumes, networks, and service dependencies
  • Simplified updates and re-deployments

This method supports both rootless and rootful Papra images, please refer to the Docker guide for more information about the difference between the two. The following example uses the recommended rootless setup.

Prerequisites

Ensure Docker and Docker Compose are installed on your host system. Official installation guides are available at: docker.com/get-started

Verify Docker installation with:

Terminal window
docker --version
docker compose version
  1. Initialize Project Structure

    Create working directory and persistent storage subdirectories:

    Terminal window
    mkdir -p papra/app-data/{db,documents} && cd papra
  2. Create Docker Compose file

    Create a file named docker-compose.yml with the following content:

    services:
    papra:
    container_name: papra
    image: ghcr.io/papra-hq/papra:latest
    restart: unless-stopped
    ports:
    - "1221:1221"
    volumes:
    - ./app-data:/app/app-data
    user: "${UID}:${GID}"
  3. Start Papra

    From the directory containing your docker-compose.yml file, run:

    Terminal window
    UID=$(id -u) GID=$(id -g) docker compose up -d

    This command downloads the latest Papra image, sets up the container, and starts the Papra service. The UID and GID variables are used to set the user and group for the container, ensuring proper file ownership. If you don’t want to use the UID and GID variables, you can replace the image with the rootful variant.

  4. Access Papra

    Once your container is running, access Papra via your browser at:

    http://localhost:1221

    Your Papra instance is now ready for use!

  5. To go further

    Check the configuration page for more information on how to configure your Papra instance.

Maintenance

Check logs

Terminal window
docker compose logs -f

Stop the service

Terminal window
docker compose down

Update Papra

Terminal window
docker compose pull
docker compose up -d

You’re all set! Enjoy managing your documents with Papra.