so I installed couchdb on my VPS using snap, it only listened on 127.0.0.1 and this was not ok for me as It's not practical to ssh on a production environment, I would like it to listen on my external IP so I set in the /var/snap/couchdb/1/local.ini the following
[httpd]
bind_address = 0.0.0.0
however it still didn't work, using lsof -i -n -P | grep LISTEN
gave me the following which shows its still listening on the local host:
sshd 1039 root 3u IPv4 15918 0t0 TCP *:22 (LISTEN)
sshd 1039 root 4u IPv6 15927 0t0 TCP *:22 (LISTEN)
postgres 4520 postgres 6u IPv6 23892 0t0 TCP [::1]:5432 (LISTEN)
postgres 4520 postgres 7u IPv4 23893 0t0 TCP 127.0.0.1:5432 (LISTEN)
nginx 15991 root 6u IPv4 72755 0t0 TCP *:80 (LISTEN)
nginx 15991 root 7u IPv6 72756 0t0 TCP *:80 (LISTEN)
nginx 15992 www-data 6u IPv4 72755 0t0 TCP *:80 (LISTEN)
nginx 15992 www-data 7u IPv6 72756 0t0 TCP *:80 (LISTEN)
beam.smp 17728 root 24u IPv4 85538 0t0 TCP *:4000 (LISTEN)
epmd 29600 root 3u IPv4 307366 0t0 TCP *:4369 (LISTEN)
epmd 29600 root 4u IPv6 307367 0t0 TCP *:4369 (LISTEN)
beam 30374 root 8u IPv4 311044 0t0 TCP *:37659 (LISTEN)
beam 30374 root 16u IPv4 311055 0t0 TCP *:5986 (LISTEN)
beam 30374 root 18u IPv4 311057 0t0 TCP 127.0.0.1:5984 (LISTEN)
it turns out that in new versions couchdb listens externally on port 5986 AND internally on 5984, not sure if this was triggered by adding 0.0.0.0 to bind address or not.