Skip to main content

Internal Docker volumes

This article refers to Platform v3.1.0. The current Platform version is v3.2.0.

Overview

An internal volume is a directory managed entirely by Docker. Unlike a bind mount, it is not pinned to a specific path on the host — Docker decides where it lives. Compared to bind mounts, internal volumes give you:

  • Data persistence across container restarts and removals.
  • Host independence — the same compose file works on any host.
  • Cleaner security — the container has no access to host paths it does not need.
  • Easier backup and migration — volumes are first-class Docker objects.
Video walkthrough

Watch this step on YouTube: Persistent Folders — Internal Volumes.

Compose syntax

Internal volumes are declared twice: once next to the service that mounts them, once under the top-level volumes: key.

version: '3.8'
services:
filebrowser:
image: filebrowser/filebrowser:latest
ports:
- "8080:80"
volumes:
- filebrowser_data:/srv

volumes:
filebrowser_data:
  • filebrowser_data is the internal volume, created automatically the first time the stack starts.
  • /srv is the path inside the container where the volume is mounted.
  • The volume outlives the container: stopping or removing the container does not delete the volume.

Practice 1 — internal volume locally

1. Write the compose file

Same compose as above, saved as docker-compose.yaml.

2. Start the stack

docker-compose up -d

3. Use Filebrowser

Open http://localhost:8080. Whatever you upload lands in the filebrowser_data volume.

4. Verify persistence

Stop and start the stack:

docker-compose down
docker-compose up -d

Refresh Filebrowser — your files are still there.

5. Remove the volume (optional)

docker volume rm $(docker volume ls -q --filter name=filebrowser_data)

Practice 2 — internal volume on a Barbara edge node

1. Zip the compose file

zip -r filebrowser_app.zip ./

2. Upload to the App Library

In Barbara Panel, open the App Library, create a Docker application named filebrowser (or open the existing one), and upload filebrowser_app.zip as a new version.

3. Deploy to a node

On the Node Details page, click Add card → Application and pick filebrowser.

4. Use the app

Open http://<NODE_IP>:8080 and upload files through the Filebrowser UI.

5. Verify persistence

Stop the workload from the workload card, then start it again. The files persist — they live in the filebrowser_data volume on the node.

6. Manage the volume from Panel

The Node Details page has a Docker Volumes card listing every Docker volume on the node. Use it to inspect the filebrowser_data volume or delete it if needed. See Docker Volumes for the full reference.

Summary

Internal volumes are the right choice when you want Docker to manage persistence and you do not need to peek at the data from outside the container. Compared to bind mounts they are more portable; compared to external volumes (next step) they are simpler to declare but harder to share between independent apps.