How to install PICR
Using Docker
Picr is built to be run as a docker container on your NAS / Server.
There are other ways you could install it, but docker is recommended and the only officially supported method.
If you have never used docker before then just google _“install docker on
Once installed, we will use the following docker compose file. This is basically a “recipe” for PICR and a postgres database.
Compose file
Create an empty folder on your server (perhaps called picr
) and put the following compose.yml
file in there.
services:
picr:
container_name: 'picr'
image: 'isaacinsoll/picr'
volumes:
- <path-to-your-shared-images>:/home/node/app/media:ro # read only access to your 'files i give to clients' folder
- ./cache:/home/node/app/cache #where PICR will store thumbnails it generates, no need to back it up
depends_on:
- db
ports:
- "6900:6900" # presumably reverse proxy will handle HTTPS
environment:
- BASE_URL=https://clients.mydomain.com/ #change this to your URL
- DATABASE_URL=postgres://user:pass@db/picr
- USE_POLLING=true # recommended if you have > 10,000 files
db:
image: postgres:17
container_name: picr-db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: picr
volumes:
- ./data:/var/lib/postgresql/data #database storage, you should back this up
Volumes (File Locations)
Folder | Description | Backup |
---|---|---|
data |
database (you should back this up!) Technically it’s used by db not picr |
Yes |
media |
mount point containing folders of images, PICR only needs read access. Often this would be a folder that already exists unless you are starting from scratch |
Yes |
cache |
thumbnails, zip files built from your media It’s safe to delete contents of this folder, will be recreated if deleted |
(not required) |
If you have a folder you are already using then point the media
mount to that, otherwise you can make a new folder whereever you want.
Typically media
and cache
will be created in the folder you are putting the compose
file in for simplicity.
Environment variables
There are lots of environment variables you can use, but only a few are needed:
-
BASE_URL
the public facing URL including a trailing slash. eg https://clients.mydomain.com/.
PICR will actually respond on all domains that point to it, but this is the domain used when sending out external links. -
DATABASE_URL
You can leave the defaults here, which match thedb
container listed lower in the docker file. -
USE_POLLING
this means files aren’t detected “instantly” and will take 20 seconds to be discovered. This has been found to be useful when you have a large number of files.
Run PICR
Start the docker compose stack and it should start PICR and the postgres database.
You should see output in docker saying ‘you need a token secret, heres one…’, add that to your compose.yml
and then start the container again.
Once it’s up and running you can then log in. Go to the url (EG: http://
Change the account details (username and password), then start using PICR 🔥