Getting started with Antidote.

Quickstart with Docker


  • Working recent version of Docker (1.12 and up recommended)

Starting a local node

Start a local node with the command:

docker run -d --name antidote -p "8087:8087" antidotedb/antidote

This should fetch the Antidote image automatically. For updating to the latest version use the command docker pull antidotedb/antidote.

Wait until Antidote is ready. The current log can be inspected with docker logs antidote. Wait until the log message Application antidote started on node 'antidote@' appears.

Antidote should now be running on port 8087 on localhost.

Building Antidote releases


  • An UNIX-like OS

  • Erlang 18.3 or later

Getting Antidote

The source code is available open-source at Github.

You can clone it to your machine via

git clone

Building a single node cluster

Antidote uses rebar3 for building releases.

make rel

Rebar3 will now pull all the dependencies it needs from Github, and build the application, and make an Erlang “release” of a single node. If all went well (if it didn’t, contact us at, then you should be able to start a node:

15:55:05:antidote $ make shell
Eshell V5.10.3 (abort with ^G)

Type Ctrl-g and q to quit the shell and stop the node.

Reading from and writing to a CRDT object stored in antidote:

Antidote can store and manage different crdts. Here we see how to update and read a counter.

Start a node (if you haven’t done it yet):

make shell


Perform a write operation (example):

CounterObj = {my_counter, antidote_crdt_counter_pn, my_bucket}.
{ok, TxId} = antidote:start_transaction(ignore, []).
ok = antidote:update_objects([{CounterObj, increment, 1}], TxId).
{ok, _CommitTime} = antidote:commit_transaction(TxId).

You can also update objects with a single call as follows:

CounterObj = {my_counter, antidote_crdt_counter_pn, my_bucket}.
{ok, _CommitTime} = antidote:update_objects(ignore, [], [{CounterObj, increment, 1}]).


Perform a read operation (example):

CounterObj = {my_counter, antidote_crdt_counter_pn, my_bucket}.
{ok, TxId} = antidote:start_transaction(ignore, []).
{ok, [CounterVal]} = antidote:read_objects([CounterObj], TxId).
{ok, _CommitTime3} = antidote:commit_transaction(TxId).

Or in a single call:

CounterObj = {my_counter, antidote_crdt_counter_pn, my_bucket}.
{ok, Res, _CommitTime} = antidote:read_objects(ignore, [], [CounterObj]).
[CounterVal] = Res.

More about the API is described here :

Running Tests

Run only single dc tests

make singledc

Run only multi dc tests

make multidc

Run all tests

make systests

Running specific tests

Tests are located in $ANTIDOTE/test/

make systests SUITE=xxx_SUITE