ntfy icon indicating copy to clipboard operation
ntfy copied to clipboard

which key??

Open simpsonetti opened this issue 2 years ago • 5 comments

When i type this here at command prompt: ntfy serve i get this: yaml: line 21: did not find expected key

In line 21 there is only a #

19 # To listen on all interfaces, you may omit the IP address, e.g. ":443". 20 # To disable HTTP, set "listen-http" to "-". 21 # 22 listen-http: ":80" 23 listen-https: ":443" 24 25 # Listen on a Unix socket, e.g. /var/lib/ntfy/ntfy.sock 26 # This can be useful to avoid port issues on local systems, and to simplify permissions. 27 # 28 # listen-unix: 29 # listen-unix-mode: <linux permissions, e.g. 0700> 30 31 # Path to the private key & cert file for the HTTPS web server. Not used if "listen-https" is not set. 32 # 33 key-file: "/home/rzadmin/cert/ntfy.key" 34 cert-file: "/home/rzadmin/cert/ntfy.crt" 35

so which key does is mean? Thanks and regards

simpsonetti avatar Apr 09 '24 11:04 simpsonetti

also having this issue on a fresh install with cache enabled.

W1BTR avatar May 23 '24 13:05 W1BTR

Check your server.yml syntax here: yamllint.com

wunter8 avatar May 23 '24 13:05 wunter8

Check your server.yml syntax here: yamllint.com

I dont have any yamllint.com in my config. The error goes away when I remove my base-url from the config.

Also worth noting I am behind an apache proxy

W1BTR avatar May 23 '24 14:05 W1BTR

Apparently yaml files need spaces before each line. I did not have a space before any line in the server.yml file.

Simply adding a single space fixed all the issues.

W1BTR avatar May 23 '24 14:05 W1BTR

Glad it's working now!

(I will say, though, yaml files don't need a space before each line. BUT the whitespace does need to be consistent throughout the file. So if your first line had a space before it, all the others would need one, too. It should still work if you remove the leading space from every line, so that none of them have a leading space)

wunter8 avatar May 23 '24 14:05 wunter8