Log inSign up

Run ArangoDB for documents and graphs on one server

Add the ArangoDB package repository for the 3.12 series, install arangodb3, and set the root password during install (Debian family) or with arango-secure-installation (Rocky and Alma). Keep the endpoint at tcp://127.0.0.1:8529, create a separate database and user in arangosh, and reach the web interface through an SSH tunnel.

Topic: Databases · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13, Rocky Linux 9, AlmaLinux 9 · Updated 2026-12-03

What is ArangoDB good for?

ArangoDB stores JSON documents, key-value pairs and graphs in one engine and queries all of them with a single language, AQL. That suits data where relationships matter as much as the records: social connections, recommendation paths, access rights, or supply chains.

Documents live in collections, similar to tables. Edge collections hold documents with _from and _to fields that link two other documents, and traversals follow those links across many hops in one query. Everything runs in a single server process, arangod, with a built-in web interface on port 8529.

Before you choose it for production, read the license file shipped with the release you install. Recent community builds come with usage terms that differ from older open source releases, so confirm they fit your project.

What should you prepare on the server?

Start from an updated system with a sudo user, and check a few kernel settings ArangoDB warns about at startup.

sudo apt update && sudo apt upgrade -y     # or: sudo dnf upgrade -y
cat /sys/kernel/mm/transparent_hugepage/enabled
sysctl vm.max_map_count vm.overcommit_memory

ArangoDB prefers transparent huge pages set to madvise or never, and a higher memory map limit for large datasets:

echo "vm.max_map_count = 262144" | sudo tee /etc/sysctl.d/90-arangodb.conf
sudo sysctl --system

Plan for at least 2 GB of RAM for small projects; the RocksDB storage engine uses memory for its block cache and write buffers, and graph traversals over many edges are faster when the data fits in cache. The sudo user guide and swap file guide cover the basics if this is a fresh server.

How do you install ArangoDB on Ubuntu or Debian?

Import the repository key, add the repository for the 3.12 series, and install the server package. The installer asks for a root password and whether to upgrade database files automatically.

curl -fsSL https://download.arangodb.com/arangodb312/DEBIAN/Release.key | sudo gpg --dearmor -o /usr/share/keyrings/arangodb.gpg
echo "deb [signed-by=/usr/share/keyrings/arangodb.gpg] https://download.arangodb.com/arangodb312/DEBIAN/ /" | sudo tee /etc/apt/sources.list.d/arangodb.list
sudo apt update
apt policy arangodb3
sudo apt install -y arangodb3
arangod --version | head -n 3
sudo systemctl status arangodb3 --no-pager

The same repository serves Ubuntu 22.04 and 24.04 as well as Debian 12 and 13. If you need to change the root password later, stop the service and run sudo dpkg-reconfigure arangodb3, or change it from arangosh as shown below.

How do you install ArangoDB on Rocky Linux or AlmaLinux?

Drop the repository file into place, install with dnf, then secure the root account with the bundled script before starting the service.

sudo curl -fsSL -o /etc/yum.repos.d/arangodb.repo https://download.arangodb.com/arangodb312/RPM/arangodb.repo
sudo dnf install -y arangodb3
sudo arango-secure-installation
sudo systemctl enable --now arangodb3
arangod --version | head -n 3

The script prompts for the root password and stores it in the database files. Logs go to /var/log/arangodb3/arangod.log on every distribution; read it after the first start for warnings about kernel settings.

How do you keep ArangoDB on localhost?

Set the endpoint in /etc/arangodb3/arangod.conf to the loopback address and make sure authentication is on. The packaged default already uses 127.0.0.1, but confirm it.

[server]
endpoint = tcp://127.0.0.1:8529
authentication = true
storage-engine = auto

[database]
directory = /var/lib/arangodb3
sudo systemctl restart arangodb3
sudo ss -tlnp | grep 8529

The output should show 127.0.0.1:8529 only. Leave the firewall closed for that port. To open the web interface, start a tunnel from your own computer, ssh -N -L 8529:127.0.0.1:8529 deploy@198.51.100.24, and browse to http://localhost:8529. The remote database access guide explains tunnels in detail.

If an application on another server must connect directly, switch the endpoint to ssl://0.0.0.0:8529, set keyfile in the [ssl] section to a PEM file holding certificate and key, and allow only that application server address in ufw or firewalld.

How do you create a database and an application user?

Open arangosh as root, create the database, then add a user with read and write rights on it alone.

arangosh --server.endpoint tcp://127.0.0.1:8529 --server.username root
db._createDatabase("social");
var users = require("@arangodb/users");
users.save("socialapp", "use-a-long-random-password");
users.grantDatabase("socialapp", "social", "rw");
users.grantCollection("socialapp", "social", "*", "rw");
db._useDatabase("social");
db._create("people");
db._createEdgeCollection("follows");

Replace the sample password with a generated one. Applications then log in as socialapp to the social database and never use root.

How do you query documents and graphs with AQL?

Insert a few people and links, then use FOR ... FILTER ... RETURN for documents and a traversal for the graph. You can run these in arangosh with db._query(...) or in the Queries tab of the web interface.

FOR p IN [ { _key: "alice", city: "Lisbon" }, { _key: "bob", city: "Porto" }, { _key: "carol", city: "Lisbon" } ]
  INSERT p INTO people

FOR e IN [ { _from: "people/alice", _to: "people/bob" }, { _from: "people/bob", _to: "people/carol" } ]
  INSERT e INTO follows

FOR p IN people FILTER p.city == "Lisbon" RETURN p._key

FOR v, e, path IN 1..2 OUTBOUND "people/alice" follows
  RETURN { name: v._key, hops: LENGTH(path.edges) }

The traversal returns bob at one hop and carol at two. Add a persistent index on fields you filter by, for example db.people.ensureIndex({ type: "persistent", fields: ["city"] }), so lookups do not scan the whole collection.

How do you back up, upgrade and troubleshoot?

Use arangodump for logical backups and arangorestore to load them. Both connect over the same endpoint.

sudo mkdir -p /var/backups/arangodb
sudo arangodump --server.endpoint tcp://127.0.0.1:8529 --server.username root --server.database social --output-directory /var/backups/arangodb/social-$(date +%F)
arangorestore --server.endpoint tcp://127.0.0.1:8529 --server.username root --server.database social --create-database true --input-directory /var/backups/arangodb/social-2026-12-01

Schedule the dump with a cron job and copy it off the server. Minor upgrades come through apt or dnf; for a new major series, take a dump, change arangodb312 in the repository path to the new series, and follow the upgrade notes. If the service will not start, sudo journalctl -u arangodb3 -n 50 and the log file usually point to a permission problem in /var/lib/arangodb3 or a database file that needs an upgrade run.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
A2-4small graph and document workloads2 vCPU, 4 GB RAM, 100 GB NVMe$14.40/mo$43.20 for 3 months
A4-8larger graphs kept in cache4 vCPU, 8 GB RAM, 180 GB NVMe$28.80/mo$86.40 for 3 months

Questions about ArangoDB multi-model database

Is ArangoDB a graph database or a document database?

Both. Graph edges are themselves documents in edge collections, so the same AQL query can filter documents and walk relationships.

Which port does ArangoDB use?

Port 8529 for the HTTP API and web interface. Keep it on 127.0.0.1 unless another server must connect, and then use TLS and a single allowed IP.

I forgot the root password. What now?

Stop the service, set authentication = false temporarily with the endpoint still on localhost, start it, change the password in arangosh with require("@arangodb/users").update("root", "new-password"), then turn authentication back on and restart.

Can I run ArangoDB in Docker instead?

Yes, an official image exists. Publish the port as 127.0.0.1:8529:8529 so Docker does not open it to the internet, and keep data in a named volume.

How do I check the installed version?

Run arangod --version, or call db._version() inside arangosh.