Installing Ravendb on the Raspberry Pi

826 Views Asked by At

I'm currently trying to install Ravendb 4.1.5-patch-41012 for the Raspberry Pi on my Raspberry Pi 3 Model B running Raspbian Stretch Lite. When I run the run.sh script it will give an error about not being able to open a browser even if I set the Setup.Mode in the settings to none. After that I'm able to run server commands but I'm not able to access Ravendb studio and the Ravendb server locally or using my local network. Are there extra steps I have to take and or thing I have to keep in mind when installing Ravendb on the Raspberry Pi?

2

There are 2 best solutions below

0
On BEST ANSWER

Raspbian Stretch Lite doesn't equipped with local web browser, therefor you may need to give outside access before using web setup. In the following link you can find description on the Server's configuration: https://ravendb.net/docs/article-page/4.1/csharp/server/configuration/configuration-options

Modify Server/settings.json in a way it fits your security needs, as follows (Replace 10.0.0.90 with your Pie's IP)

  • Totally unsecured access from anywhere (ATTENTION: This will give access to the database to any one with access to this docker instance):
{
  "ServerUrl": "http://0.0.0.0:8080",
  "PublicServerUrl": "http://10.0.0.90:8080",
  "Setup.Mode": "None",
  "Security.UnsecuredAccessAllowed": "PublicNetwork",
}
  • Access from docker's host machine or other machines on you local LAN:
{
  "ServerUrl": "http://10.0.0.90:8080",
  "Setup.Mode": "None",
  "PublicServerUrl": "http://10.0.0.90:8080",
  "Security.UnsecuredAccessAllowed": "PrivateNetwork",
  "License.Eula.Accepted": true
}

Browsing to http://10.0.0.90:8080 should work at this point.

You can use cli, read : https://ravendb.net/docs/article-page/4.1/Csharp/server/configuration/command-line-arguments

Example:

cd ~/RavenDB/Server
./Raven.Server --Security.UnsecuredAccessAllowed=PublicNetwork --ServerUrl=http://0.0.0.0:8080 --PublicServerUrl=http://10.0.0.90:8080 --Setup.Mode="None" --DataDir=/mnt/ExternalDisk/RavenDB

As a side note: I do recommend to set "DataDir" to external mounted USB disk, rather then using the default SD card data path, if this is your case. And later on you may want to use scripts for adding RavenDB as service on your Pie (see install-daemon.sh here : https://github.com/ravendb/ravendb/tree/v4.2/scripts/linux)

0
On

The run.sh is trying to start a browser the first time you start RavenDB to give you access to it. Given that you are running the Lite version, there is no such browser, obviously.

See Adi's comment on how to access RavenDB from outside the Pi machine. You can just call server/Raven.Server instead of the run.sh instead to start RavenDB