# VCAP\_SERVICES for local CouchDB

**URL:** https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950
**Category:** General
**Created:** [8 October 2020 15:21 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950 "2020-10-08T15:21:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Stwissel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stwissel/32/126_2.png) [@Stwissel](https://discourse.nodered.org/u/Stwissel)
#### Post date: [8 October 2020 15:21 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950/1 "2020-10-08T15:21:51Z")

</div>

I have a NodeRED application on Bluemix using Cloudant. All well and good.  
I tried to run it local after setting the VCAP\_SERVICES environment variable. All well and good.

Now I want to change to a local couchDB (Port 5984) but I fail to find the right set of entries for the VCAP\_SERVICES environment variable to point to local.

My goal: without touching the flows switch between the databases bases on the env variable.  
Can someone enlighten me?

---

<div class="post-metadata">

### Author: ![Stwissel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stwissel/32/126_2.png) [@Stwissel](https://discourse.nodered.org/u/Stwissel)
#### Post date: [8 October 2020 15:26 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950/2 "2020-10-08T15:26:20Z")

</div>

local couch has no username/password

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [8 October 2020 15:40 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950/3 "2020-10-08T15:40:47Z")

</div>

Not so much a Node-RED question as it is an IBM Cloud/Cloud Foundry/VCAP\_SERVICES question.

In your `VCAP_SERVICES` value you'll have a `cloudantNoSQLDB` array of bound services. If you have more than one instance in that array, hopefully you can identify which is the one you want to point to local. Within that instance will be a `credentials` object. You should be able to set some combination of `host`, `port` , `url`, `username`, `password` to get it to connect locally. If there are lots of `iam_*` type properties, you'll want to remove them.

---

<div class="post-metadata">

### Author: ![Stwissel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stwissel/32/126_2.png) [@Stwissel](https://discourse.nodered.org/u/Stwissel)
#### Post date: [8 October 2020 17:21 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950/4 "2020-10-08T17:21:32Z")

</div>

Hi Nick,

thx for chipping in.

I tried a lot of permutations, quite frustrating. My conclusion: I suspect I do have to create a local user, since empty username/password or no username/password didn't work. At the end I resorted to use an environment variable to store the URL. Works online and local.

If I find an spare hour, I'll try with a locked down database and report back

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [7 December 2020 17:21 UTC](https://discourse.nodered.org/t/vcap-services-for-local-couchdb/33950/5 "2020-12-07T17:21:33Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
