Security
Users
You can securise your topic and ntfy instance by only allowing connected users. For that follow the next instructions:
- add to your docker-compose the following
environment:
NTFY_ENABLE_LOGIN: true # Enable the login module
NTFY_AUTH_FILE: /var/lib/ntfy/auth.db # Create the users/ACL database
NTFY_AUTH_DEFAULT_ACCESS: deny-all # If the user isn't in an ACL he can't see any topic can be change by write/read-only
- connect to your docker by shell and create your users, the password for the user will be asked after hit enter for the command
ntfy user add --role=<admin/user> <username>
ACL
To allow your user to use the different topics you can setup ACLs, use the following command:
ntfy access <username> <topic> <read/write/read-write/deny>