Published 2023/01/04 - Updated 2023/01/07 - Written by Nathaniel Walser

How to deploy EventStoreDB with Docker Compose

EventStoreDB is a database that is designed to store data as a series of events. It supports features like persistent subscriptions, catch up subscriptions and projections, just to name a few. It can be used to implement patterns like event sourcing.

This setup is tailored for development purposes only. For production it needs to be extended quite a bit.

Install EventStoreDB

Create a docker-compose.yml file in an empty directory. Copy the following content into the newly created file.

version: "3.4"

    image: eventstore/eventstore:latest
      - EVENTSTORE_INSECURE=true # let eventstore run without ceritficate
      - EVENTSTORE_EXT_TCP_PORT=1113 # set internal tcp port
      - EVENTSTORE_HTTP_PORT=2113 # set internal admin ui port
      - "1113:1113" # map internal tcp port
      - "2113:2113" # map internal admin ui port
      - type: volume
        source: eventstore-data
        target: /var/lib/eventstore
      - type: volume
        source: eventstore-logs
        target: /var/log/eventstore


Run docker-compose up in your terminal inside this folder to download and start the EventStoreDB container.

docker-compose up

Get started with the gRPC Client

Install the gRPC client SDK inside of your project.

dotnet add package EventStore.Client.Grpc.Streams

# Nuget PM
Install-Package EventStore.Client.Grpc.Streams

After the installation you can create an EventStoreDB client like this:

var settings = EventStoreClientSettings
var client = new EventStoreClient(settings);

For more examples, like how to setup catch up subscriptions or append events to streams check out the official EventStoreDB docs.

Get started with the Admin UI

After installation your EventStoreDB admin ui is available under port 2113. You can access it without username and password under http://host.docker.internal:2113/.

More Templates