# RethinkDB on Windows using VirtualBox

So, I wanted to install **RethinkDB** on my **Windows** machine and found out that it is  [still not supported](https://rethinkdb.com/docs/install/) . After a couple of weeks I decided to find my own solution.

Here it is.

First, I installed the  [VirtualBox](https://www.virtualbox.org/) .
I then  [downloaded Ubuntu](https://ubuntu.com/download/desktop)  and  [installed it on the box](https://www.google.com/search?q=install+ubuntu+on+a+virtualbox&oq=install+Ubuntu+on+a+VirtualBox&aqs=chrome.0.35i39j0l5j69i60l2.726j0j4&sourceid=chrome&ie=UTF-8) .

This was the result:
![rethinkdb-on-windows-with-virtualbox-01.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660570290/ZEW_exe3U.png)

I had issues with the Ubuntu resolution, so  [I installed VirtualBox Guest Additions](http://ubuntu-tutorials.com/2010/06/26/install-virtualbox-guest-additions-on-virtualbox-guests/) 
*(note that the menu wording was slightly different then in the tutorial)*:
![rethinkdb-on-windows-with-virtualbox-02.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660598635/CHZ-Y2ueu.png)

I then also ran ```sudo apt install virtualbox-guest-dkms``` in the console on Ubuntu. I believe I restarted the VM several times between steps.

In the end, I was able to pick a better resolution:
![rethinkdb-on-windows-with-virtualbox-03.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660615846/xNnEXogE0.png)

I then set the VirtualBox Network Adapter for Ubuntu to **Host-Only Adapter**:
![rethinkdb-on-windows-with-virtualbox-04.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660626574/nI1Hq95H3.png)

*This is important for accessing RethinkDB from your host machine.*

In Ubuntu,  [I installed RethinkDB](https://rethinkdb.com/docs/install/ubuntu/) .

I set it up so that  [it starts at system startup](https://rethinkdb.com/docs/start-on-startup/) .

And RethinkDB was up and running:
![rethinkdb-on-windows-with-virtualbox.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660645851/1s6K-gCFR.jpeg)

I then edited the **instance1.conf** file from the previous step, to set the **bind=all** value:
![rethinkdb-on-windows-with-virtualbox-05.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660656022/1AEZyPhZ0.png)
*This is also important for accessing RethinkDB from your host machine.*

You really should  [secure your cluster](https://rethinkdb.com/docs/security/) , even though it is a development system. If you do secure it, do not forget to include the **user** and **password** attributes in your  [connect](https://rethinkdb.com/api/javascript/connect)  call.

Once you have everything running, on your VirtualBox Ubuntu window, hover the mouse over the network icon to get the Ubuntu’s IP address.
![rethinkdb-on-windows-with-virtualbox-06.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660672452/qsCs9YEuY.png)

If you do not see a tooltip with the IP address, make sure you select the Ubuntu window and give it focus, then hover again.

Use that IP address with **:8080** appended to it, to access  [the RethinkDB web interface](https://rethinkdb.com/docs/administration-tools/) .

Also, use that IP address in your code, to connect to RethinkDB.

And this is my final result on my Windows machine IDE, with RethinkDB running in the VirtualBox. I ran the two scripts, **index.js** and **listen.js** in separate consoles, and when **index.js** makes a change to the **tv_shows** table, the **listen.js** script receives the change.
![rethinkdb-on-windows-with-virtualbox-final.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639660690640/up9zKJRS3.png)
