How to allow remote access to RethinkDB?

Posted April 13, 2015 6.4k views

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?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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>