[GH-ISSUE #169] Database not found #102

Closed
opened 2026-02-27 10:15:43 +03:00 by kerem · 2 comments
Owner

Originally created by @alexkutsan on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/matze/wastebin/issues/169

When i specify a database path, there is an error

$ docker run -e WASTEBIN_DATABASE_PATH=/data/state.db -v `pwd`/data:/data quxfoo/wastebin:latest 
Error: sqlite error: unable to open database file: /data/state.db

Seems like db file should already exist when I run an application, but how to create an initial database?

Originally created by @alexkutsan on GitHub (Jun 7, 2025). Original GitHub issue: https://github.com/matze/wastebin/issues/169 When i specify a database path, there is an error ``` $ docker run -e WASTEBIN_DATABASE_PATH=/data/state.db -v `pwd`/data:/data quxfoo/wastebin:latest Error: sqlite error: unable to open database file: /data/state.db ``` Seems like db file should already exist when I run an application, but how to create an initial database?
kerem closed this issue 2026-02-27 10:15:43 +03:00
Author
Owner

@alexkutsan commented on GitHub (Jun 7, 2025):

Seams my problem was bas access rights to /data folder.
May be because I have not usual 1000 UID:

alex@AlexNAS:~/Drive/services/wastebin$ id -u
1026

It works like this:

docker run \
   --user $(id -u):$(id -g) \
   -e RUST_LOG=trace \
   -e WASTEBIN_DATABASE_PATH=/data/state.db \
   -v "$(pwd)/data:/data" \
   quxfoo/wastebin:latest 
<!-- gh-comment-id:2952915237 --> @alexkutsan commented on GitHub (Jun 7, 2025): Seams my problem was bas access rights to /data folder. May be because I have not usual 1000 UID: ``` alex@AlexNAS:~/Drive/services/wastebin$ id -u 1026 ``` It works like this: ```bash docker run \ --user $(id -u):$(id -g) \ -e RUST_LOG=trace \ -e WASTEBIN_DATABASE_PATH=/data/state.db \ -v "$(pwd)/data:/data" \ quxfoo/wastebin:latest ```
Author
Owner

@matze commented on GitHub (Jun 7, 2025):

Thanks for digging deeper. I adjusted the README.md for the next one who stumbles upon this.

<!-- gh-comment-id:2953010763 --> @matze commented on GitHub (Jun 7, 2025): Thanks for digging deeper. I adjusted the `README.md` for the next one who stumbles upon this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wastebin-matze#102
No description provided.