Thursday, February 17, 2022

How To Enable SSL On CouchDB ( HTTPS (SSL/TLS) Options )

 in This Tutorial you will Learn " How To Enable SSL On Apache CouchDB"

CouchDB is an open-source, document-oriented NoSQL database.
SSL, or Secure Sockets Layer, is an encryption-based Internet security protocol.
Homepage - https://couchdb.apache.org/

Doc - https://docs.couchdb.org/en/3.2.0/config/http.html
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; dnf groupinstall "Development Tools" -y ; yum install -y yum-utils
yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo
dnf makecache ; dnf -y install couchdb
systemctl start couchdb ; systemctl enable couchdb ; systemctl status couchdb

mkdir -p  /etc/couchdb/cert ; cd /etc/couchdb/cert
openssl genrsa > privkey.pem
openssl req -new -x509 -key privkey.pem -out couchdb.pem -days 1095
chmod 600 privkey.pem couchdb.pem
chown couchdb privkey.pem couchdb.pem

nano  /opt/couchdb/etc/local.ini
[chttpd]
port = 5984
bind_address = 0.0.0.0

[ssl]
enable = true
cert_file = /etc/couchdb/cert/couchdb.pem
key_file = /etc/couchdb/cert/privkey.pem

[admins]
admin = StrongPassword
systemctl restart couchdb
firewall-cmd --zone=public --permanent --add-port=5984/tcp ; firewall-cmd --reload
firewall-cmd --zone=public --permanent --add-port=6984/tcp ; firewall-cmd --reload

http://127.0.0.1:5984/_utils/
https://127.0.0.1:6984/_utils/
User/Pass -  admin/StrongPassword
__________________________________________________________________________________________

No comments:

Post a Comment