Tuesday, February 24, 2015

Couch DB Getting External Connectivity Running in Windows 8

Getting external connectivity for Windows 8 requires a few configuration changes.  These article describes what's necessary to get CouchDB running so that it will accept connections from remote hosts.

Open a windows terminal as an administrator and run the following commands:

netsh advfirewall firewall add rule name="CouchDB/HTTP"  dir=in action=allow protocol=TCP localport=5984
netsh advfirewall firewall add rule name="CouchDB/HTTPS" dir=out action=allow protocol=TCP localport=6984
netsh advfirewall firewall add rule name="CouchDB/HTTP"  dir=in action=allow protocol=TCP localport=5984
netsh advfirewall firewall add rule name="CouchDB/HTTPS" dir=out action=allow protocol=TCP localport=6984

This will open the necessary ports through the Windows 8 firewall.

Then proceed to the directory where your CouchDB installation was done.  For example for my machine the installation is in:

C:\Program Files (x86)\Apache Software Foundation\CouchDB

Once you have navigated to this directory you will then need to navigate to the following subdirectory:

\etc\couchdb

Edit the default.ini file and modify the following entry from:

[httpd]
port = 5984
bind_address = 127.0.0.1

To:

[httpd]
port = 5984
bind_address = 0.0.0.0

This will allow CouchDB to accept incoming connections from any host.

Proceed to the Windows Services console and restart the CouchDB service.  Once the service has restarted you should be able to connect from any remote host.

If you are intending for hosts to connect from the internet make sure you also open your firewall by creating port forwarding rules from your firewall to your host.  These rules should open TCP ports 5984 and 6984.



No comments:

Post a Comment