Getting Started
PSPDFKit Server is the backend for PSPDFKit clients. It is distributed as a Docker container.
We recommend using Docker Machine, Kubernetes, or native Docker support by a cloud provider like Amazon Web Services, Google Cloud Platform, or Microsoft Azure for deployment in production.
ℹ️ Note: If you just want to get an example up and running quickly, use the preconfigured Docker setup from our Example Projects.
The steps below outline how to get a simple setup on a single host up and running via docker-compose
.
-
Make sure you have Docker installed and running.
On macOS we recommend the most recent version of Docker for Mac.
On Windows we recommend the most recent version of Docker for Windows.
-
Pull the
pspdfkit
image from Docker Hub:docker pull pspdfkit/pspdfkit
ℹ️ Note: The PSPDFKit Server image has been hosted on DockerHub since version 2019.1.0. The previous Docker registry at docker.pspdfkit.com is deprecated. If you have specific requirements or need access to older versions, please reach out to our support team.
-
Create the following
docker-compose.yml
file somewhere on your file system:version: '3.8' services: db: image: postgres:11.6 environment: POSTGRES_USER: pspdfkit POSTGRES_PASSWORD: password POSTGRES_DB: pspdfkit POSTGRES_INITDB_ARGS: --data-checksums PGDATA: /var/lib/postgresql/data/pgdata volumes: - pgdata:/var/lib/postgresql/data pspdfkit: image: pspdfkit/pspdfkit:latest environment: PGUSER: pspdfkit PGPASSWORD: password PGDATABASE: pspdfkit PGHOST: db PGPORT: 5432 # Uncomment the following line if your custom PostgreSQL # installation requires TLS. The default value is `false`. # PGSSL: true # Activation key for your PSPDFKit Server installation. ACTIVATION_KEY: YOUR_ACTIVATION_KEY_GOES_HERE # Secret token used for authenticating API requests. API_AUTH_TOKEN: secret # Base key used for deriving secret keys for the purposes of authentication. SECRET_KEY_BASE: secret-key-base # Public key used for verification of JWTs from web clients. It has to be in the PEM format. JWT_PUBLIC_KEY: | -----BEGIN PUBLIC KEY----- MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALd41vG5rMzG26hhVxE65kzWC+bYQ94t OxsSxIQZMOc1GY8ubuqu2iku5/5isaFfG44e+VAe+YIdVeQY7cUkaaUCAwEAAQ== -----END PUBLIC KEY----- JWT_ALGORITHM: RS256 # Credentials to access the admin dashboard. DASHBOARD_USERNAME: dashboard DASHBOARD_PASSWORD: secret ports: - 5000:5000 depends_on: - db volumes: pgdata:
-
In a terminal tab, navigate to the directory where you’ve placed the
docker-compose.yml
file and execute the following:docker-compose up
Make sure that navigating to http://localhost:5000/dashboard in a web browser shows the dashboard, which can be accessed with the username
dashboard
and the passwordsecret
(you can configure these values using the environment variables in thedocker-compose.yml
file).You can quit the running containers with Ctrl-C.
-
Now follow the guides to integrate PSPDFKit for Web into your app’s frontend and backend.
Take a look at our Troubleshooting guides for solutions to common issues.