Skip to main content



Find releases at


Find releases at The NuGet contains Garnet as a library for you to self-host in an application. This can be based on our GarnetServer application code available here. A minimal sample is shown below:

using Garnet;

using var server = new GarnetServer(args);
catch (Exception ex)
Console.WriteLine($"Unable to initialize server due to exception: {ex.Message}");


On Linux

docker run --network=host --ulimit memlock=-1

On Linux configured with basic authentication, replace {{replace_password_here}} with your password

docker run --network=host --ulimit memlock=-1 --auth Password --password {{replace_password_here}}

On MacOS

docker run -p 6379:6379 --ulimit memlock=-1

You can then use redis-cli to connect to

redis-cli> set key value
OK> get key

Dockerfile links:

Docker Compose

Make sure you have installed Docker and Docker Compose.

Download Garnet Docker Compose File


Launch Garnet

docker compose up -d

Confirm image is up

docker ps | grep garnet
# 249b468dcda1 "/app/GarnetServer -…" 21 seconds ago Up 20 seconds>6379/tcp, :::6379->6379/tcp garnet-garnet-1

Log follow

docker logs -f garnet-garnet-1

Connect clients

As before, you can then use redis-cli or any client library in your application to connect to

redis-cli> set key value
OK> get key