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:
docker --versiondocker compose version
-
Initialize Project Structure
Create working directory and persistent storage subdirectories:
Terminal window mkdir -p papra/app-data/{db,documents} && cd papra -
Create Docker Compose file
Create a file named
docker-compose.yml
with the following content:services:papra:container_name: papraimage: ghcr.io/papra-hq/papra:latestrestart: unless-stoppedports:- "1221:1221"volumes:- ./app-data:/app/app-datauser: "${UID}:${GID}" -
Start Papra
From the directory containing your
docker-compose.yml
file, run:Terminal window UID=$(id -u) GID=$(id -g) docker compose up -dThis command downloads the latest Papra image, sets up the container, and starts the Papra service. The
UID
andGID
variables are used to set the user and group for the container, ensuring proper file ownership. If you don’t want to use theUID
andGID
variables, you can replace the image with the rootful variant. -
Access Papra
Once your container is running, access Papra via your browser at:
http://localhost:1221Your Papra instance is now ready for use!
-
To go further
Check the configuration page for more information on how to configure your Papra instance.
Maintenance
Check logs
docker compose logs -f
Stop the service
docker compose down
Update Papra
docker compose pulldocker compose up -d
You’re all set! Enjoy managing your documents with Papra.