DEV Community

Cover image for How to spin ArangoDB server with Docker and Docker Compose
Sony AK
Sony AK

Posted on • Updated on

How to spin ArangoDB server with Docker and Docker Compose

Today I will share about how to create ArangoDB server with Docker and Docker Compose. I found it useful for my development machine.

Here is my scenario. I have Linux Ubuntu 19.10 (eoan) and I want to have ArangoDB server instance. I don't want to install ArangoDB manually but instead just use Docker.

For those who doesn't know about ArangoDB yet, ArangoDB is one of NoSQL database in the market. I already use it on production and so far give me excellent performance and fit with our needs.

According to Wikipedia.

ArangoDB is a free and open-source native multi-model database system developed by ArangoDB GmbH. The database system supports three data models with one database core and a unified query language AQL. The query language is declarative and allows the combination of different data access patterns in a single query.

For more information you can go to


I assume that you already have Docker and Docker Compose installed on your machine. If not, please refer to for Docker installation and refer to for Docker Compose installation.

In this case I am on Linux Ubuntu, but the result I think should be similar for other OS.

Compose file

File docker-compose.yml

version: '3.7'
    image: arangodb:latest
      ARANGO_ROOT_PASSWORD: rootpassword
      - 8529:8529
      - arangodb_data_container:/var/lib/arangodb3
      - arangodb_apps_data_container:/var/lib/arangodb3-apps

Enter fullscreen mode Exit fullscreen mode

What is the Docker Compose file above means?

It will have ArangoDB image and it will take the latest version. As of this writing, the latest version of ArangoDB is 3.6.0. ArangoDB will have user root and password rootpassword. It will expose port 8529 to the host machine.

It will also using data container to save the data, called arangodb_data_container and arangodb_apps_data_container. It's useful for data persistent, so the data will not be deleted even later you call command docker-compose down.

Run it

docker-compose up -d
Enter fullscreen mode Exit fullscreen mode

Above command will start the services on detach mode (similar like running in the background).

If everything OK then our ArangoDB server will start.

How to check ArangoDB container is running or not?

Type this command.

docker ps
Enter fullscreen mode Exit fullscreen mode

The result it will look like this.

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
88405a9c31e0        arangodb:latest     "/ aran…"   3 seconds ago       Up 2 seconds>8529/tcp   arangodb_arangodb_db_container_1
Enter fullscreen mode Exit fullscreen mode

Looks good and our ArangoDB container is running well.

To check our data container, check with command below.

docker volume ls
Enter fullscreen mode Exit fullscreen mode

It will show like below.

local               arangodb_arangodb_apps_data_container
local               arangodb_arangodb_data_container
Enter fullscreen mode Exit fullscreen mode

That's looks good.

How to connect to ArangoDB server

Via WebUI

Go to http://localhost:8529 or

Alt TextWeb UI login page of ArangoDB

Via command line (in host machine)

Make sure you have arangosh client tool command installed on host machine. Refer to for installing the Client Tools.

arangosh --server.endpoint http+tcp:// --server.password rootpassword
Enter fullscreen mode Exit fullscreen mode

Via command line (in container)

You can directly run arangosh client tool command on the container by typing this command.

docker exec -ti CONTAINER_ID arangosh
Enter fullscreen mode Exit fullscreen mode

Replace the CONTAINER_ID with your container ID.

Alt Textarangosh screen after successful login

Now we can enjoy our local ArangoDB database server for any purpose we want. For me this setup is fine for testing purpose.

How to stop the ArangoDB server

To shutdown database without delete all containers.

docker-compose stop
Enter fullscreen mode Exit fullscreen mode

To shutdown database and delete all containers.

docker-compose down
Enter fullscreen mode Exit fullscreen mode

That's it and we are done. Relax, if you already create some data it will not gone.

The code above also available on my GitHub repository at

Thank you and I hope you enjoy it.



Cover image from photo by Christina Morillo from Pexels at

Top comments (1)

codemesid profile image

Hey, so I cooked up a simple Express Js server and created a docker compose file with Arango Db & Server as 2 services.

As per the article arango db should be accessible by arango_db_container_name:8529 in express.

But that is not the case. Any idea. what the connection string might be?

version: "3.9"
    image: arangodb:3.9
      ARANGO_ROOT_PASSWORD: rootpassword
      - 5001:8529
      - /var/lib/docker/volumes/arangodb3/_data:/var/lib/arangodb3
      - /var/lib/docker/volumes/arangodb3-apps/_data:/var/lib/arangodb3-apps
    build: ./server
      - arango_db
      - "arango_db:database"
      - ARANGODB_URL=database
      - 5002:5000
Enter fullscreen mode Exit fullscreen mode

on server, all tried urls for connection (as per solutions online)

url : database:8529
url : tcp://database:8529
Enter fullscreen mode Exit fullscreen mode