Installation: Manual Setup
Automatic Certificate Renewals Via Setup Wizard
RavenDB has developed a quick and simple process to set up a fully secure cluster with our Setup Wizard.
We've developed automatic renewals of certificates when setting up with the Setup Wizard together with Let's Encrypt.
If you choose manual setup and/or to provide your own certificate, you are responsible for its periodic renewal.
In this page:
- Downloading Server and Setting Up Node Folders
- Disabling 'Setup Wizard'
- Server Url and Port
- Security
- Configuration
Downloading Server and Setting Up Node Folders
Download the RavenDB server package and extract it into permanent server folders on each machine.
We recommend using multiple machines to improve cluster availability via failover in case one goes down.
- Each folder that contains an extracted server package will become a functional node in your cluster.
- If you move the folders after installation, the server will not work.
You'll receive a 'System.InvalidOperationException: Unable to start the server.' error because it will look for the file path that is set when you install.
By default, when a server is started using run.ps1
(or run.sh
in Linux) script. It will open a browser with a Setup Wizard which will guide you through the server configuration process.
The setup is started because the default configuration file settings.json (found in the downloaded RavenDB Server package inside the Server folder) comes configured like this:
{
"ServerUrl": "http://127.0.0.1:0",
"Setup.Mode": "Initial",
"DataDir": "RavenData"
}
Which means that the Server will run:
- On
localhost
with arandom port
- In
Setup Wizard
mode - Store the data in
RavenData
directory
Disabling 'Setup Wizard'
To disable the 'Setup Wizard' please change the Setup.Mode
in the settings.json configuration to None
or remove it completely.
Server Url and Port
Setting the ServerUrl
to http://127.0.0.1:0
will bind the server to a localhost
with a random port
. For manual setup we suggest changing the port to a non-random value - e.g. 8080.
Port in Use
In some cases the port might be in use, this will prevent the Server from starting with "address in use" error (EADDRINUSE
).
For a list of IPs and ports already in use on your machine, enter netstat -a
in the command line.
Security
Protect Your Cluster From The Start
We highly recommend securing your server from the start to prevent potential vulnerabilities later.
RavenDB makes securing your cluster from the start as easy as possible to prevent the possiblity of forgetting to secure before going into production.
If you set RavenDB to listen to connections outside your local machine without first securing your cluster, your database will immediately block this now vulnerable configuration and require the administrator to properly setup the security and access control to prevent unauthorized access.
Read the Manual Certificate Configuration section to learn how to setup security manually.
Configuration
Read the Configuration Section to learn more about using settings.json and see a list of configuration options.