How to allow remote access to RethinkDB?

April 13, 2015 3.1k views
Dokku Node.js NoSQL Ubuntu

Hi, I have an app in NodeJS using Dokku that uses RethinkDB. I want to access that database from an app in my computer but I don't know how to do that.
What address should I use as host? And how can I enable remote access without exposing the database to possibles attacks?

2 Answers

The most secure way to do that would be using an SSH Tunnel to get access to the RethinkDB dashboard.

Take a look at this tutorial: How To Set Up SSH Tunneling on a VPS. I believe RethinkDB uses port 8080 for its dashboard.

In this article, you'll learn how to create a safe, encrypted tunnel between your computer and your VPS along with how to bypass limits in a corporate network, how to bypass NAT, etc.

How are you using RethinkDB with Dokku? Are you using dokku-rethinkdb-plugin? If so, you can set the port that RethinkDB will be available at when you first bind it to your app.

dokku rethinkdb:bind-cluster <app> [host port]

If you do not set [host port], a random port will be be used. You can find this port with:

dokku rethinkdb:info <app>
Have another answer? Share your knowledge.