Skip to content

Commit 1cdee52

Browse files
CopilotRadCod3
andcommitted
Add Docker volume permissions guidance for OAuth storage
Co-authored-by: RadCod3 <[email protected]>
1 parent 220fcf4 commit 1cdee52

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ EOF
4848
docker-compose up -d
4949
```
5050

51+
**Note on Volume Permissions**: If you encounter permission errors when the container tries to write to the OAuth storage directory, you may need to set the correct ownership:
52+
53+
```bash
54+
sudo chown -R 65532:65532 ./data/oauth
55+
```
56+
57+
This ensures the nonroot user (UID 65532) in the container can write to the mounted volume. This is environment-dependent and may not be needed on all systems.
58+
5159
### Option 2: Local Installation
5260

5361
#### Prerequisites
@@ -385,6 +393,26 @@ services:
385393
restart: unless-stopped
386394
```
387395
396+
### Volume Permissions for OAuth Storage
397+
398+
When using Docker with OAuth token persistence, you may encounter permission issues where the container cannot write to the mounted volume at `./data/oauth`.
399+
400+
**The Issue**: The container runs as the `nonroot` user (UID 65532) for security. When Docker creates the volume mount from the host, it may have root:root ownership, preventing the nonroot user from writing to the directory.
401+
402+
**Symptoms**: If you see errors like `sqlite3.OperationalError: unable to open database file` or other permission-related errors in the container logs, this is likely the cause.
403+
404+
**Solution**: Set the correct ownership on the host directory before starting the container:
405+
406+
```bash
407+
# Create the directory if it doesn't exist
408+
mkdir -p ./data/oauth
409+
410+
# Set ownership to UID 65532 (nonroot user)
411+
sudo chown -R 65532:65532 ./data/oauth
412+
```
413+
414+
**Note**: This is environment-dependent and may not be required on all systems. Some Docker configurations handle volume permissions automatically. If you encounter permission errors, apply this fix.
415+
388416
### Building Custom Images
389417

390418
```bash

0 commit comments

Comments
 (0)