{NOTE: }
-
RavenDB can be launched using Docker.
-
Stable and LTS Docker images of RavenDB Server are available for Ubuntu Linux and Windows Nano Server.
-
Information related to setting and running RavenDB on Docker is available in this page and in the RavenDB dockerhub page.
-
Upgrading RavenDB
5.x
or lower to RavenDB 6.0 or higher requires a simple migration procedure. -
In this page:
{NOTE/}
{PANEL: Requirements}
- Docker Configuration
Use the default Docker networking configuration. - Security
Do not expose the Docker instance beyond the host machine.
{WARNING: } If you Do intend to host RavenDB on Docker and expose it externally, please make sure the server is secure.
{WARNING/} - Storage
- Non-NFS file systems are Supported.
NTFS, Ext4, and other non-NFS volume mounts' file systems are supported. - SMB and CIFS mounts are not supported.
Linux Docker containers running under Windows Docker hosts via shared volumes are not supported due to CIFS protocol usage.
- Non-NFS file systems are Supported.
- Platforms
RavenDB images are available for:- Ubuntu (22.04, 20.04) or any other Debian-based distribution.
- Windows Nano Server
{PANEL/}
{PANEL: Setup and Execution}
To install or run a Docker RavenDB image use an updated stable or nightly version.
Use the following tags to install the latest Stable or LTS RavenDB Server version.
-
Latest RavenDB version
- Tag:
latest
/ubuntu-latest
Latest RavenDB version, running on Ubuntu container - Tag:
windows-latest
Latest RavenDB version, running on Windows Nano Server - Tag:
windows-1809-latest
Latest RavenDB version, running on Windows Nano Server version 1809 - Tag:
windows-ltsc2022-latest
Latest RavenDB version, running on Windows Nano Server version LTSC2022 - An updated tags list is available here.
- Tag:
-
Latest RavenDB LTS version
- Tag:
latest-lts
/ubuntu-latest-lts
Latest RavenDB LTS version, running on Ubuntu container - Tag:
windows-latest-lts
Latest RavenDB LTS version, running on Windows Nano Server - Tag:
windows-1809-latest-lts
Latest RavenDB LTS version, running on Windows Nano Server version 1809 - Tag:
windows-ltsc2022-latest-lts
Latest RavenDB LTS version, running on Windows Nano Server version LTSC2022 - An updated tags list is available here
- Tag:
To install or run RavenDB start the Docker service, and run a RavenDB image manually or using a script.
-
Running manually:
Run RavenDB using docker run, e.g. -
Ubuntu image:$ docker run -p 8080:8080 ravendb/ravendb:ubuntu-latest
Windows image:$ docker run -p 8080:8080 ravendb/ravendb:windows-latest
-
Running using a script:
Run a RavenDB image using a dedicated script for Ubuntu or Windows.
Ubuntu-based image script
Windows-based image script
{NOTE: Setup and Management}
After running the image, access it from a browser using its URL.
By default: http://localhost:8080
If the server is not installed yet, connecting it will start the Setup Wizard.
After installing the server, connecting it will open its management studio.
{NOTE/}
To share data with the Docker host using Docker for Windows:
- The Docker client application must have
sharing
enabled. - The directory (e.g.
C:\RavenDb\Data
) must exist.
The Dockerfiles
used to build RavenDB Server images and their assets can be found at:
To install using the latest
tag, and persist the data stored on your
hard disk if the container is removed, you can use:
{CODE-BLOCK:bash}
docker run --rm -d -p 8080:8080 -p 38888:38888 -v /var/lib/ravendb/data ravendb/ravendb
{CODE-BLOCK/}
- The data will now remain available even if the container is removed.
- When you start a new instance of the image using a volume mounted to the same directory, the data will still be available.
- To keep persistence, RavenDB data in a Windows container is always
kept in this location:
C:/RavenDB/Server/RavenData
To start the RavenDB container on your localhost without running
through the Setup Wizard each time, you can use:
{CODE-BLOCK:bash}
docker run --rm -d -p 8080:8080 -p 38888:38888 -v /var/lib/ravendb/data --name RavenDb-WithData
-e RAVEN_Setup_Mode=None -e RAVEN_License_Eula_Accepted=true
-e RAVEN_Security_UnsecuredAccessAllowed=PrivateNetwork ravendb/ravendb
{CODE-BLOCK/}
Using this command will skip the Setup Wizard and mount a volume for data persistence.
{WARNING: Warning}
Please be aware that running a Docker container with RAVEN_Setup_Mode=None
and
RAVEN_Security_UnsecuredAccessAllowed=PrivateNetwork
will run an Unsecure server.
{WARNING/}
{INFO: EULA acceptance}
By setting RAVEN_License_Eula_Accepted=true
you're accepting our terms & conditions.
{INFO/}
{PANEL/}
{PANEL: Migration}
If a Docker image of RavenDB version 5.x
or lower is installed on your
system and you want to upgrade it to version 6.0
or higher, a short migration
process will be required.
Please visit our Docker migration page to
learn how to perform this migration.
{PANEL/}
{PANEL: Configuration} RavenDB can be adjusted using:
-
The settings.json configuration file.
-
Environment Variables, e.g. - {CODE-BLOCK:plain} RAVEN_Setup_Mode=None RAVEN_DataDir=RavenData RAVEN_Certificate_Path=/config/raven-server.certificate.pfx {CODE-BLOCK/}
-
CLI arguments
Variables can be passed to a RavenDB Docker image in a CLI arguments line, e.g. -
./Raven.Server --Setup.Mode=None
{PANEL/}
{PANEL: FAQ}
A: Set the Setup.Mode
configuration option to None
m like so:
{CODE-BLOCK:plain}
RAVEN_ARGS='--Setup.Mode=None'
{CODE-BLOCK/}
A: Set the env variables like so:
{CODE-BLOCK:plain}
RAVEN_ARGS='--Setup.Mode=None'
RAVEN_Security_UnsecuredAccessAllowed='PrivateNetwork'
{CODE-BLOCK/}
A: By modifying RAVEN_ARGS
environment variables,
that will be passed on as a CLI arguments line.
A: To get logs available when running the docker logs
command, you need to enable
this option in RavenDB server.
E.g., set the environment variables as shown below to enable logging to the console.
{CODE-BLOCK:plain}
RAVEN_ARGS='--log-to-console'
{CODE-BLOCK/}
{NOTE: }
Please note that this behavior may have performance implications.
To modify the logging level use the RAVEN_Logs_Mode
variable.
Additional information regarding logging configuration is available
here.
{NOTE/}
A: Mount it as a Docker volume, and use the --config-path PATH_TO_CONFIG
command line argument to use a settings file from outside of the server directory.
Alternatively, you can pass your custom settings.json
content via the
RAVENDB_SETTINGS
environment variable.
A: Except for the RavenDB Studio, which can be accessed from the browser,
you can connect the RavenDB administration console using the rvn
utility
as follows:
{CODE-BLOCK:plain}
docker exec -it CONTAINER_ID /opt/RavenDB/Server/rvn admin-channel Will try to connect to discovered Raven.Server process : 8...
_____ _____ ____
| __ \ | __ \| _ \
| |__) |__ ___ _____ _ __ | | | | |_) |
| _ // _` \ \ / / _ \ '_ \| | | | _ <
| | \ \ (_| |\ V / __/ | | | |__| | |_) |
|_| \_\__,_| \_/ \___|_| |_|_____/|____/
Safe by default, optimized for efficiency
Build 60, Version 6.0, SemVer 6.0.0-custom-60, Commit 10ed5a8 PID 8232, 64 bits, 8 Cores, Phys Mem 23.866 GBytes, Arch: X64 Source Code (git repo): https://github.com/ravendb/ravendb Built with love by Hibernating Rhinos and awesome contributors! +---------------------------------------------------------------+ Connected to RavenDB Console through named pipe connection...
ravendb> help ... {CODE-BLOCK/}
{NOTE: }
Additional information about running RavenDB as a console is available
here.
{NOTE/}
{PANEL/}