Skip to content

self hosted docker example with --cache-file option => "flag provided but not defined: -cache-file" #320

Closed
@milksteakjellybeans

Description

@milksteakjellybeans

Apologies if this is user error, I'm tuning a self hosted server and trying to enable the file based caching.

I'm using a modified version of the example that include the "--cache-file" option, as documented
https://ntfy.sh/docs/install/#docker
and
https://hub.docker.com/r/binwiederhier/ntfy/

When running the example (with some path modifications, and the most recent release), I get the following out put:
"Incorrect Usage. flag provided but not defined: -cache-file"

I reviewed the docs on configuring message cache on disk and I'm not seeing what I'm missing.
(https://ntfy.sh/docs/config/#message-cache)

(I might guess that it's choking on the cache file not yet existing, but if that's the case, I'm not sure how to boot strap the feature to write an initial cache file. touch cache.db?)

Here's the command I ran (modified from example):

# cat run_ntfy_ex1.sh 
docker run \
  -v /home/dude/ntfy/ex/var/cache/ntfy:/var/cache/ntfy \
  -p 80:80 \
  -it \
  binwiederhier/ntfy:v1.25.2 \
    --cache-file /var/cache/ntfy/cache.db \
    serve

And here's the output:

# sh run_ntfy_ex1.sh 
Incorrect Usage. flag provided but not defined: -cache-file

NAME:
   ntfy - Simple pub-sub notification service

USAGE:
   ntfy [OPTION..]

COMMANDS:
   help, h  Shows a list of commands or help for one command
   Client commands:
     publish, pub, send, trigger  Send message via a ntfy server
     subscribe, sub               Subscribe to one or more topics on a ntfy server
   Server commands:
     access  Grant/revoke access to a topic, or show access
     serve   Run the ntfy server
     user    Manage/show users

GLOBAL OPTIONS:
   --debug, -d                           enable debug logging (default: false) [$NTFY_DEBUG]
   --help, -h                            show help (default: false)
   --log-level value, --log_level value  set log level (default: "INFO") [$NTFY_LOG_LEVEL]
   --no-log-dates, --no_log_dates        disable the date/time prefix (default: false) [$NTFY_NO_LOG_DATES]
   --trace                               enable tracing (very verbose, be careful) (default: false) [$NTFY_TRACE]
   

Try 'ntfy COMMAND --help' or https://ntfy.sh/docs/ for more information.

To report a bug, open an issue on GitHub: https://github.com/binwiederhier/ntfy/issues.
If you want to chat, simply join the Discord server (https://discord.gg/cT7ECsZj9w), or
the Matrix room (https://matrix.to/#/#ntfy:matrix.org).

ntfy 1.25.2 (86c132f), runtime go1.18.2, built at 2022-06-03T01:45:19Z
Copyright (C) 2022 Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2
flag provided but not defined: -cache-file

Thanks for reviewing

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation🪲 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions