Recording path for docker-instance

Hello,

actually i try to get my Docker-Instance of BlueCherry 3 to write recordings to a custom path. The compose-file shows two locations where the path for recordings could be changed.

There is first:

"HostConfig": {
"Binds": [
"/etc/yum.repos.d/bluecherry-docker/recordings:/var/lib/bluecherry/recordings:rw",
],

And second:

"Mounts": [
{
"Type": "bind",
"Source": "/etc/yum.repos.d/bluecherry-docker/recordings",
"Destination": "/var/lib/bluecherry/recordings",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},

Whats the recommended way in 2026 to handle that?

Incidentally i have to say “great work”, i ran BlueCherry 2 for a few years without docker. Now i decided to buy a license and i see its free.

You can still make a donation :slight_smile:

Can you paste the entire docker compose file you have?

Give me a link to the donation-point and ill check the conditions.

Back to work: Sadly, i found no way to copy the text formatted from the ssh-terminal so i only have plain text:

version: '3.7'

services:
bc-mysql:
image: mysql:8.0
container_name: bc-mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
networks: [bluecherry_net]

volumes:
- ./database:/var/lib/mysql
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro

environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ADMIN_PASSWORD}
TZ: ${TZ:-UTC}

healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -p"$${MYSQL_ROOT_PASSWORD}" -h 127.0.0.1 --silent"]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s

bluecherry:
# Use your pushed tag (dev-ci, date, or sha). Avoid building locally here.
image: bluecherrydvr/bluecherry:dev-ci
pull_policy: always			# ensure updated pulls on 'up' (Compose v2.21+)
container_name: bc-server
restart: unless-stopped
networks: [bluecherry_net]

depends_on:
bc-mysql:
condition: service_healthy

cap_add:
- NET_BIND_SERVICE

volumes:
- ./recordings:/data/bcrec:/var/lib/bluecherry/recordings
- ./data/bconf:/var/lib/bluecherry/.local/share/data/bconf
- ./data/letsencrypt:/usr/share/bluecherry/nginx-includes/letsencrypt
- ./data/backups:/usr/share/bluecherry/backups

ports:
- "7001:7001/tcp"
- "7002:7002/tcp"

env_file:
- ./.env

environment:
# Ensure the app points at the Compose service name
BLUECHERRY_DB_HOST: bc-mysql
# Map your .env's BLUECHERRY_USERHOST to what the entrypoint expects
BLUECHERRY_DB_ACCESS_HOST: ${BLUECHERRY_USERHOST:-%}
TZ: ${TZ:-UTC}
# Optional debug toggles:
# DEBUG: "1"
# DISABLE_WATCHDOG: "1"
# WATCHDOG_INTERVAL: "5"
# Robust process healthcheck (overrides any old baked one)

healthcheck:
test: ["CMD-SHELL", "pgrep -f '/usr/sbin/bc-server' >/dev/null || exit 1"]
interval: 30s
timeout: 5s
start_period: 60s
retries: 10

mta_mailer:
image: juanluisbaptiste/postfix:latest
container_name: bc-mail
cap_add: [NET_BIND_SERVICE]
dns: [8.8.8.8]
env_file:
- .mailenv

restart: always
networks: [bluecherry_net]

volumes:
- /etc/localtime:/etc/localtime:ro

uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma

volumes:
- ./uptime-kuma-data:/app/data
- /var/run/docker.sock:/var/run/docker.sock

ports: - "1337:3001"
networks: [bluecherry_net]
restart: always

networks:
  bluecherry_net:
    name: bluecherry_net

Let me doublecheck this, something is wrong. Where are the snippets now?

Sorry, the snippet in my first post dont came from the docker-compose file. They came from the command “docker inspect xxxx”. Damn, that was a mistake. Had much input and mixed something up.

Ok, forget the snippets. In this case i think i only have to change the line:

- ./recordings:/data/bcrec:/var/lib/bluecherry/recordings

But that dont work so far. Have seen that the docker instance not created a bluecherry user or group outside of docker.

What are the reqiurements for the path outside of docker?
I have created the user and group and given bluecherry:bluecherry and 0775.

No Success.

The two snippets are the same mount shown two ways — there’s only one place to change. Your volume line has a typo though:

./recordings:/data/bcrec:/var/lib/bluecherry/recordings isn't valid (three parts).

Change it to ./recordings:/var/lib/bluecherry/recordings and docker compose up -d.

You don’t need to create a host user — the container sets ownership on that directory at startup; UID names on the host are irrelevant, only the numeric IDs matter.

Then check Settings → Storage in the UI still points at /var/lib/bluecherry/recordings.

And yes, v3 needs no license key if you’d like to support me links are below:

Buy Me A Coffee

Ko-Fi

You can expect some coffee, not much but if you keep it on, im sure you will get coffee here and there.

Got it, all cams and the storage path are working again. Although, changing the “Max Percentage” of the storage path still gives “Storage path does not exist”.

By the way, ive seen a inconsistency in verbal expression. On the playback page, above the video-frame i read: “Recorded time:”. That sounds like is a duration and not like a starting-time. Maybe it should be “Recording Start Time:”.

The playback-page is not yet working.

  • Start a clip says: “Error loading this resource”.

  • Download MP4 says: “Error: 500 Internal Server Error - file’s first stream is not a video, FIXME to support more cases”

  • Download MKV says: “Error: 500 Internal Server Error - weird: cannot read just-written file”

Disable audio really cannot be the solution. Im sure its still a problem with the storage-path permissions.

Thanks, you’re right that it’s permissions-shaped…but it’s the container-internal www-data access, not host users, and there are a few stacked bugs. I’ve filed them so we can track fixes:

  • Storage save failing in Docker: bluecherrydvr/bluecherry-apps#762 (the image lacks sudo, so every Storage save fails at the permission step)
  • MP4 500 / player error: bluecherrydvr/bluecherry-apps#763
  • Misleading MKV error: bluecherrydvr/bluecherry-apps#764
  • “Recorded time” wording + poster fix: bluecherrydvr/bluecherry-apps#765
  • Silent permission setup at boot: bluecherrydvr/bluecherry-apps#766

To confirm the diagnosis, please post the output of:

docker exec bc-server id www-data
docker exec bc-server ls -ld /var/lib/bluecherry/recordings
docker exec -u www-data bc-server sh -c 'ls -la /var/lib/bluecherry/recordings | head -20'

Plus the exact Storage path string from Settings → Storage.

I’m getting storage pathdoesn’t exist also getting unexpected output from shell script on the storage page when I try to add a storage location.
I ran this and got this
strong text sudo docker exec -u www-data bc-server sh -c ‘ls -la /var/lib/bluecherry/recordings | head -20’
ls: cannot access ‘/var/lib/bluecherry/recordings’: Permission denied

Here is what i got:

docker exec bc-server id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)

docker exec bc-server ls -ld /var/lib/bluecherry/recordings
drwxrwxr-x. 3 bluecherry bluecherry 4096 Sep 8 15:40 /var/lib/bluecherry/recordings

docker exec -u www-data bc-server sh -c ‘ls -la /var/lib/bluecherry/recordings | head -20’
ls: cannot access ‘/var/lib/bluecherry/recordings’: Permission denied

This is the path copied from the webinterface->Storage:
/var/lib/bluecherry/recordings

As i wrote, i had some recordings, but now the storage path is working no more. I remember no changes except of “docker compose pull”.

I dont know the linktype you wrote:

bluecherrydvr/bluecherry-apps#763

How can i follow a link like that?