Drivebase Logo

Local Storage in Docker

Mount host storage into the Drivebase container and connect it as a Local Storage provider

Use this guide when Drivebase is running in Docker and you want files to be stored on your host machine through the Local Storage provider.

Why This Matters

When Drivebase runs in Docker, the Local Storage provider does not see paths from your host directly. It only sees paths that exist inside the container.

That means you need to:

  1. Mount a host directory into the Drivebase container with Docker Compose.
  2. Use the mounted container path when connecting the Local Storage provider in Drivebase.

Example Compose Mount

If you want to store files on your host at:

./data/storage

mount that directory into the app container like this:

services:
  app:
    volumes:
      - ./data:/app/data

With that mount in place:

  • ./data/storage exists on your host
  • /app/data/storage exists inside the Drivebase container

Which Path To Use In Drivebase

In the Drivebase UI, when you connect the Local Storage provider, use the path that exists inside the container:

/app/data/storage

Do not use the host path such as ./data/storage in the provider form. Drivebase cannot access that path directly from inside Docker.

Full Example Flow

  1. Open your compose.yaml.
  2. Ensure the app service has a volume mount like:
volumes:
  - ./data:/app/data
  1. Start or restart Drivebase:
docker compose up -d
  1. In Drivebase, go to Providers.
  2. Click Connect Provider.
  3. Choose Local Storage.
  4. Set the root path to:
/app/data/storage
  1. Save the provider.

Files written through this provider will now persist on your host under ./data/storage.

Common Mistakes

Using the host path in the provider form

This is incorrect:

./data/storage

Drivebase needs the container path instead.

Forgetting to mount the folder

If the folder is not mounted in Docker Compose, Drivebase may write into the container filesystem instead of persistent host storage.

Permission issues

Make sure the mounted directory is writable by the containerized app process. If uploads fail, check the directory permissions on the host.

On this page