Permission issue with /db directory ?
Please have a look to the log below. There seems to an issue with the permissions of directories? @021-projects any idea? Thanks!
pi@singerhaus:~/Uptime-Kuma $ ls -lrt
total 44
-rw-r--r-- 1 pi pi 1972 Mar 14 18:47 setup.sh
-rw-r--r-- 1 pi pi 564 Mar 14 18:47 run.sh
-rw-r--r-- 1 pi pi 714 Mar 14 18:47 requirements.txt
-rw-r--r-- 1 pi pi 2808 Mar 14 18:47 README.md
-rw-r--r-- 1 pi pi 258 Mar 14 18:47 Makefile
-rw-r--r-- 1 pi pi 1607 Mar 14 18:47 Dockerfile
-rw-r--r-- 1 pi pi 1289 Mar 15 13:57 docker-compose.yml
-rw-r--r-- 1 pi pi 292 Mar 15 13:59 db.env
drwxr-xr-x 16 pi pi 4096 Mar 15 14:03 app
drwxr-xr-x 2 _apt pi 4096 Mar 15 14:11 dataRestApi
drwxr-xr-x 5 pi pi 4096 Mar 15 14:11 data
pi@singerhaus:~/Uptime-Kuma $ ls -lrt dataRestApi/
total 84
-rw-r--r-- 1 _apt systemd-journal 16384 Mar 27 2024 db.sqlite3
-rw-r--r-- 1 _apt systemd-journal 32992 Mar 15 14:22 db.sqlite3-wal
-rw-r--r-- 1 _apt systemd-journal 32768 Mar 15 14:22 db.sqlite3-shm
Hello! Just give permissions to the db directory: chmod -R 755 db
@Noschvie, sorry, I made a mistake in the previous message, the permissions should be: chmod -R 755 db
@021-projects there seems to be a problem with your Docker file and the permissions.
In case of using sudo chown -R pi:pi dataRestApi your Docker can't start the container.
uptime-api | raise OperationalError(exc)
uptime-api | tortoise.exceptions.OperationalError: attempt to write a readonly database
uptime-api |
uptime-api | [2025-03-15 17:14:00 +0100] [7] [ERROR] Application startup failed. Exiting.
uptime-api | [2025-03-15 17:14:00 +0100] [7] [INFO] Worker exiting (pid: 7)
@021-projects there seems to be a problem with your Docker file and the permissions. In case of using
sudo chown -R pi:pi dataRestApiyour Docker can't start the container.uptime-api | raise OperationalError(exc) uptime-api | tortoise.exceptions.OperationalError: attempt to write a readonly database uptime-api | uptime-api | [2025-03-15 17:14:00 +0100] [7] [ERROR] Application startup failed. Exiting. uptime-api | [2025-03-15 17:14:00 +0100] [7] [INFO] Worker exiting (pid: 7)
At the moment, I recommend running the API locally from the develop branch using the run.sh script: https://github.com/021-projects/Uptime-Kuma-Web-API/tree/develop?tab=readme-ov-file#how-to-use-it
I haven't tested this in Docker yet.
By the way, I also opened Issues in the fork repository, so you can post new issues there 👌