Closed obxjames closed 1 year ago
I am experiencing this issue as well. The only lines I have modified are base-url:, auth-file:, and auth-default-access:.
If anything can be done to assist in testing, let me know.
My configuration is Let's Encrypt certs through Nginx reverse proxy with a redirect set for non-HTTPS connections, if that makes a difference. I did notice I had to specify https:// when referring to my server instead of ntfy.sh, when posting via curl.
Adding to this, I tried enabling the cache.db and that also failed with the following: `2023/02/23 16:26:50 FATAL database is locked (exit_code=1) database is locked
2023/02/23 16:26:56 FATAL database is locked (exit_code=1) database is locked
2023/02/23 16:27:03 FATAL database is locked (exit_code=1) database is locked
2023/02/23 16:27:09 FATAL database is locked (exit_code=1)
database is locked
Here are the relevant bits of the config:
cache-file: "/var/cache/ntfy/cache.db"
cache-duration: "12h"
# cache-startup-queries:
# cache-batch-size: 0
# cache-batch-timeout: 0ms
auth-file: "/var/lib/ntfy/user.db" auth-default-access: "read-write" # auth-startup-queries: `
This is likely a permissions issue. Be sure that the user that ntfy is running as can read and write the /var/cache/ntfy
folder and the file /var/cache/ntfy/cache.db
, and/or the user.db
file and its folder as well.
A little more context for my situation: I'm mapping the /var and /etc folders to a mounted network share. However, I have confirmed that I am mounting them using the correct user UID and GID's for the shares. I tried adding the PUID and PGID variables without success.
I did open the console and I was able to successfully touch a file under both /etc/ntfy and /var/cache/ntfy that appeared in the external folder as expected.
These sort of problems are easier to solve on Discord or Matrix. I cannot help you much here, without a lot of interactive back and forth.
These sort of problems are easier to solve on Discord or Matrix. I cannot help you much here, without a lot of interactive back and forth.
No worries, happy for you to message me on matrix. obxjames@obexus.co.uk
That's not what I meant. I meant for you to join the Matrix/Discord room and ask for help there. :-)
@obxjames can you share what was the resolution for you?
I had this issue that I got the error message
FATAL unable to open database file: no such file or directory (exit_code=1)
unable to open database file: no such file or directory
when setting auth-file: "/var/lib/ntfy/user.db"
I was using the docker-compose.yml from the documentation. I looked into the container and noticed that /var/lib/ntfy didn't exist which seems to be the reason for hte no such file or directory
error.
After adding
volumes:
- ./lib:/var/lib/ntfy
to the docker-compose.yml it worked. I rechecked the documentation but couldn't find such instructions.
I had this issue that I got the error message
FATAL unable to open database file: no such file or directory (exit_code=1) unable to open database file: no such file or directory
when setting
auth-file: "/var/lib/ntfy/user.db"
I was using the docker-compose.yml from the documentation. I looked into the container and noticed that /var/lib/ntfy didn't exist which seems to be the reason for hte
no such file or directory
error. After addingvolumes: - ./lib:/var/lib/ntfy
to the docker-compose.yml it worked. I rechecked the documentation but couldn't find such instructions.
Thanks for sharing your solution to the problem it immediately fixed my issue too. This should be added to the documentation :-)
Problem:
Trying to set up user system from new release however running into the issue... option auth-file not set; auth is unconfigured for this server
If it does recognise the server.yml is configured correctly it will error
_2023/02/21 21:24:38 FATAL unable to open database file: no such file or directory (exitcode=1) unable to open database file: no such file or directory
Tried so far:
Setup:
Using binwiederhier/ntfy:latest
Server.yml