Configure your Deephaven instance
This page shows how to take your Deephaven instance beyond the defaults: set up authentication, learn which images and example data are available, add Java packages, give it more memory, and keep it up to date. The Docker examples build on the command you ran in Get started.
Authentication
Keeping your real-time data secure is one of Deephaven's top priorities. By default, Deephaven uses pre-shared key (PSK) authentication. In Get started, you set the key with the -Dauthentication.psk flag in the docker run command.
- With the flag, your key stays the same across server restarts.
- Without the flag, Deephaven generates a new random key each time the server starts.
For enhanced security, replace the placeholder YOUR_PASSWORD_HERE in the -Dauthentication.psk flag with your own long, hard-to-guess key:
In both cases, Deephaven prints the key in the server logs on startup, so you can find it there if you forget it. With the command from Get started, the logs print in the terminal where you ran docker run. The key appears in a line like this one from a Docker Compose log:

To learn more about PSK authentication, see the PSK authentication guide.
In addition to PSK authentication, Deephaven supports the following types of authentication:
Images and example data
Deephaven provides multiple Docker images, called deployments. Each image is available in several versions, such as latest or a specific release. For Groovy, use server-slim, which starts a Groovy console. The other images, such as server and server-all-ai, start a Python console and come pre-installed with different Python libraries.
Your Get started command already runs ghcr.io/deephaven/server-slim:latest, the latest server-slim image.
You can also run Deephaven with Deephaven's example data, Redpanda, or both. Deephaven publishes pre-built docker-compose.yml files that run server-slim this way. To pick one and start it, see Choose a deployment.
To learn more about deployments, check out the guide for installing Deephaven with Docker.
Install Java packages
At some point, you may need a Java package that server-slim doesn't include. To make a Java package available, add its JAR to Deephaven's classpath. With Docker, you can either mount a directory of JARs to /apps/libs or build a custom image that includes them. A custom image keeps the package available in every container started from it. See the user guide on installing Java packages for more information.
Give Deephaven more memory
Large datasets require significant memory. Deephaven runs on the Java Virtual Machine (JVM), and the JVM's maximum heap size caps how much memory Deephaven can use for data. You set it with the -Xmx flag. If you don't, the JVM picks a size based on the memory available, which is often too small for large data.
Fortunately, it's easy to give Deephaven more memory:
- On Docker Desktop, raise the memory limit under Settings > Resources > Advanced, as described in the Docker Desktop settings documentation. Containers can use only as much memory as Docker Desktop allows, which by default is half of your machine's memory.
- Add the
-Xmxflag to theSTART_OPTSenvironment variable you used in Get started. Separate multiple JVM options with spaces. The newSTART_OPTSvalue replaces the old one, so include your pre-shared key in it too.
Here's the docker run command from Get started with a 16 GB maximum heap added:
The memory guide explains more about allocating memory in Deephaven.
Keep your instance up to date
The data world is ever-evolving, and so is Deephaven. It's easy to keep your instance up to date and get the latest features and bug fixes.
To update, pull the latest image:
Then stop your running container and start a new one with the same docker run command you used in Get started. To stop the container, press Ctrl+C in its terminal or run docker stop deephaven. Because the Get started command mounts ./data, your saved files carry over.
If you run Deephaven from a docker-compose.yml file or your own Dockerfile, see the guide to updating Deephaven to set the image version there.