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:
- Mount a host directory into the Drivebase container with Docker Compose.
- 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/storagemount that directory into the app container like this:
services:
app:
volumes:
- ./data:/app/dataWith that mount in place:
./data/storageexists on your host/app/data/storageexists 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/storageDo 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
- Open your
compose.yaml. - Ensure the
appservice has a volume mount like:
volumes:
- ./data:/app/data- Start or restart Drivebase:
docker compose up -d- In Drivebase, go to Providers.
- Click Connect Provider.
- Choose Local Storage.
- Set the root path to:
/app/data/storage- 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/storageDrivebase 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.