mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1232] can't run the docker after setup Access control #868
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#868
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @katfionn on GitHub (Dec 8, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1232
🐞 Describe the bug
After i set env for my container as it said: https://ntfy.sh/docs/config/#access-control, i can't run the ntfy container any more. here's how i set the container's env
but the
.dbfile has notcreated automaticallyas we expected.Any help or instructions will be helpful!
💻 Components impacted
self hosting, installed from 1panel's APP store
💡 Screenshots and/or logs
🔮 Additional context
@wunter8 commented on GitHub (Dec 8, 2024):
I'm guessing you didn't mount a volume, so /var/lib/ntfy doesn't exist in the container.
See the example docker compose files here: https://docs.ntfy.sh/config/#__tabbed_2_1
@katfionn commented on GitHub (Dec 8, 2024):
you're right, let me try to reinstall the container, thanks a lot
@katfionn commented on GitHub (Dec 9, 2024):
It was so helpful. I make it worked eventually, thanks again.
@katfionn commented on GitHub (Dec 9, 2024):
If you're using 1panel to install the ntfy and you wnat to use ACL function, here's how i make it work, hope it can hope anyone is rookie as me. But if you have better idea, please let me know.
first step : install the app
Install the ntfy app from the app store

next : delete the container
App store should build a container automatically, delete it now

then : build a container from official doc's yaml config
ntfy-officialntfy-officialand creat new file nameddocker-compose.yaml, and edit the file and pause the config, save the filedocker-compose up -dand pressEnteron your keyboardafter that : copy
/var/lib/ntfyfiles to local pathdocker pscp ntfy-official-ntfy-1:/var/lib/ntfy /home/onepanel/1panel/apps/ntfy/ntfy/data/lib/ntfyfianl step : edit APP's yml file and rebuild the APP's container
docker-compose.ymlfiledocker-compose up -dand pressEnteron your keyboard如果你也使用1panel面板里的应用商店来安装ntfy,并且你需要用到ACL功能,这是我的经验分享,希望对同是菜鸟的你有帮助。如果你有更好的办法,麻烦也让我学习学习
首先,安装1panel里的APP
然后,删掉容器
应用商店的应用装好后会默认创建一个容器,删掉它

接着,用官方的配置创建一个容器
ntfy-officialntfy-official,然后新建一个文件名为docker-compose.yaml, 然后编辑这个文件,把官方文档里的粘贴进去,然后保存docker-compose up -d然后回车然后,把官方的容器里对应的、缺少的文件拷出来
docker pscp ntfy-official-ntfy-1:/var/lib/ntfy /home/onepanel/1panel/apps/ntfy/ntfy/data/lib/ntfy最后,编辑1panel的APP yml配置,然后重建容器
docker-compose.yml文件docker-compose up -d然后回车@gongfuture commented on GitHub (Jan 16, 2026):
@katfionn I'm facing the same issue and have been struggling to find a solution. Your response inspired me to look more closely at the differences between the two. The 1panel store version's Docker Compose has an additional permission restriction:
user: ${PUID}:${PGID}. In the .env file,PGID=1000 PUID=1000, which restricts ntfy to a regular user. However, the default mounted path in 1panel is/opt/1panel/apps/which hasrootpermissions, so it cannot create a database, leading to an error.@katfionn 遇到一样的问题,苦寻无果。看到你的回答受到了启发,详细看了一下两个之间的区别,1panel商店版本的docker compose多了一个权限限制,
user: ${PUID}:${PGID},.env文件内PGID=1000 PUID=1000,限制了ntfy为普通用户。但是1panel默认挂在的/opt/1panel/apps/路径下是root权限,所以不能创建数据库导致报错This is my personal opinion, and I'm just a beginner user. If you have other perspectives, feel free to point them out
这是我个人的看法,我也只是一个小白用户,有其他看法欢迎指点