ravendb

RavenDB Embedded license not registering


I have added RavenDB.Embedded@5.2.2 to an ASP.NET Core 5.0 application and I am attempting to configure the license without entering it into the studio GUI form. I have 2 licenses: a community and a developer -when I copy/paste either into the studio GUI it works.

I have tried:

  1. Putting the license json into a file called license.json in the Server directory
  2. Setting the command line arguments to include --License.Path=C:/path/to/the/license.json
  3. Setting the License.Path key in settings.json to the path to the license
  4. Steps 2 and 3 but with License and the text value of the license

My expectation is that when setting the license via configuration, the studio should not prompt me for a license. Perhaps my assumption is wrong about this.

Has anyone successfully configured a RavenDB embedded instance without the web form?


Solution

  • From the RavenDB team:

    Hi,

    License is only automatically activated on a non-bootstrapped server (new, empty one). It can be done e.g. like that:

    EmbeddedServer.Instance.StartServer(new ServerOptions
    { 
    CommandLineArgs = new List<string>
    {
    "--License.Path=D:\\temp\\lic.json"
    }
    });
    

    But if you previously bootstrapped the server (e.g. created a database and there was no license in the env variables or command line args), then license will not be automatically activated. If this was done, then you can issue a POST to https://github.com/ravendb/... with the license JSON.