Skip to content

Commit 09debb2

Browse files
authored
Merge pull request #3312 from Sabika-Tasneem/main
Add Memgraph on Arm install guide
2 parents 75e876f + 2195d85 commit 09debb2

1 file changed

Lines changed: 363 additions & 0 deletions

File tree

Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,363 @@
1+
---
2+
additional_search_terms:
3+
- graph database
4+
- database
5+
- cypher
6+
- graph analytics
7+
- graph algorithms
8+
- docker
9+
- arm64
10+
- aarch64
11+
12+
13+
layout: installtoolsall
14+
minutes_to_complete: 20
15+
multi_install: true
16+
multitool_install_part: false
17+
official_docs: https://memgraph.com/docs/getting-started/install-memgraph
18+
test_images:
19+
- ubuntu:24.04
20+
test_maintenance: true
21+
title: Memgraph on Arm
22+
tool_install: true
23+
weight: 1
24+
draft: true
25+
---
26+
27+
[Memgraph](https://memgraph.com/) is an open-source, in-memory graph database built for real-time streaming and analytical workloads. It is compatible with the [Cypher](https://memgraph.com/docs/querying) query language and the Bolt protocol used by Neo4j drivers, so existing Cypher/Bolt applications can connect without changes.
28+
29+
Memgraph publishes native `aarch64` Linux packages and multi-architecture Docker images, so it runs unmodified on Arm-based hardware.
30+
31+
Graph algorithms parallelize well and scale with core count, and Arm servers often have a meaningful cost-per-query advantage over equivalent x86 instances that make them an increasingly popular fit for graph workloads.
32+
33+
This guide covers two installation paths:
34+
35+
- **Docker**: the quickest way to try Memgraph, and the portable option for macOS, Windows, and any Linux distribution.
36+
- **Native Linux packages**: a good choice when Docker is unavailable or not preferred, or when you want to benchmark Memgraph directly on the host.
37+
38+
At the end of each path, you will run a few Cypher queries with `mgconsole`, then optionally add [MAGE](https://memgraph.com/docs/advanced-algorithms), Memgraph’s graph-algorithm and query-module extension library.
39+
40+
## What should I do before installing Memgraph?
41+
42+
Confirm you are using an Arm computer with 64-bit Linux by running:
43+
44+
```bash { target="ubuntu:latest" }
45+
uname -m
46+
```
47+
48+
The output should be:
49+
50+
```output
51+
aarch64
52+
```
53+
54+
If you see a different result, you are not using an Arm computer running 64-bit Linux.
55+
56+
57+
## How do I install Memgraph with Docker?
58+
59+
Docker is the simplest way to run Memgraph on any operating system. The official images on [Docker Hub](https://hub.docker.com/u/memgraph) are multi-arch manifests, so `docker pull` automatically selects the `arm64` variant on Arm hosts.
60+
61+
If Docker is not already installed, follow the [Docker install guide](/install-guides/docker/).
62+
63+
### How do I start the Memgraph container?
64+
65+
The core image is `memgraph/memgraph`, which includes the Memgraph database plus the bundled `mgconsole` CLI. Start it with:
66+
67+
```bash { target="ubuntu:latest" }
68+
docker run -p 7687:7687 -p 7444:7444 --name memgraph memgraph/memgraph:3.10.1
69+
```
70+
71+
The container exposes two ports:
72+
73+
- `7687`: the Bolt port used by `mgconsole`, Memgraph Lab, and every Bolt-compatible driver.
74+
- `7444`: streams Memgraph logs to Memgraph Lab for real-time monitoring.
75+
76+
To confirm that the Arm image was pulled, inspect it:
77+
78+
```bash { target="ubuntu:latest" }
79+
docker inspect memgraph/memgraph:3.10.1 --format '{{.Architecture}}'
80+
```
81+
82+
The expected output is:
83+
84+
```output
85+
arm64
86+
```
87+
88+
### Which Docker image should I choose?
89+
90+
| Image | Includes |
91+
| --- | --- |
92+
| `memgraph/memgraph` | Memgraph database + `mgconsole` CLI. Start here! |
93+
| `memgraph/memgraph-mage` | Memgraph database + `mgconsole` + [MAGE](https://memgraph.com/docs/advanced-algorithms), a library of advanced graph algorithms and query modules. |
94+
| `memgraph/mgconsole` | Standalone CLI client. |
95+
| `memgraph/lab` | Memgraph Lab web UI. |
96+
97+
Start with `memgraph/memgraph` to get the database itself. If you later want PageRank, community detection, node embeddings, NetworkX integration, or other advanced query modules, see the [MAGE section](#how-do-i-install-the-mage-graph-algorithm-library) below.
98+
99+
### How do I connect with mgconsole inside the container?
100+
101+
The `memgraph/memgraph:3.10.1` image ships with `mgconsole` already inside the container:
102+
103+
```bash { target="ubuntu:latest" }
104+
docker exec -it memgraph mgconsole
105+
```
106+
107+
You should see a prompt similar to:
108+
109+
```output
110+
mgconsole X.X
111+
Connected to 'memgraph://127.0.0.1:7687'
112+
Type :help for shell usage
113+
Quit the shell by typing Ctrl-D(eof) or :quit
114+
memgraph>
115+
```
116+
117+
Skip to the [example queries](#how-do-i-run-example-cypher-queries) section to try it out.
118+
119+
## How do I install Memgraph natively on Linux?
120+
121+
Memgraph provides native `aarch64` packages for the following distributions:
122+
123+
- Ubuntu 24.04
124+
- Debian 12 and Debian 13
125+
- Fedora 42
126+
127+
Choose the package that matches your distribution from the [Memgraph Download Hub](https://memgraph.com/download). For convenience, direct download URLs for every supported platform are listed in the [direct download links](https://memgraph.com/docs/getting-started/install-memgraph/direct-download-links) page.
128+
129+
### How do I install on Ubuntu or Debian?
130+
131+
Download the `arm64` `.deb` package. For Ubuntu 24.04 on Arm:
132+
133+
```bash { target="ubuntu:latest" }
134+
wget https://download.memgraph.com/memgraph/v3.10.1/ubuntu-24.04-aarch64/memgraph_3.10.1-1_arm64.deb
135+
```
136+
137+
Install the package:
138+
139+
```bash { target="ubuntu:latest" }
140+
sudo dpkg -i memgraph_3.10.1-1_arm64.deb
141+
```
142+
143+
If `dpkg` reports missing dependencies, resolve them with:
144+
145+
```bash { target="ubuntu:latest" }
146+
sudo apt-get install -f
147+
```
148+
149+
### How do I install on Fedora?
150+
151+
Download the Fedora `aarch64` `.rpm`:
152+
153+
```bash
154+
wget https://download.memgraph.com/memgraph/v3.10.1/fedora-42-aarch64/memgraph-3.10.1_1-1.aarch64.rpm
155+
```
156+
157+
Install it:
158+
159+
```bash
160+
sudo dnf install ./memgraph-3.10.1_1-1.aarch64.rpm
161+
```
162+
163+
### How do I verify Memgraph is running?
164+
165+
The package installs a `systemd` service. Check its status:
166+
167+
```bash { target="ubuntu:latest" }
168+
sudo systemctl status memgraph
169+
```
170+
171+
If it is not already running, start it and enable it on boot:
172+
173+
```bash { target="ubuntu:latest" }
174+
sudo systemctl start memgraph
175+
sudo systemctl enable memgraph
176+
```
177+
178+
Inspect the startup log to confirm the version:
179+
180+
```bash { target="ubuntu:latest" }
181+
sudo journalctl --unit memgraph --no-pager | head
182+
```
183+
184+
You should see a line similar to:
185+
186+
```output
187+
You are running Memgraph v3.10.1
188+
```
189+
190+
The configuration file lives at `/etc/memgraph/memgraph.conf`. After editing it, restart the service with `sudo systemctl restart memgraph`. The full configuration reference is in the [Memgraph configuration docs](https://memgraph.com/docs/database-management/configuration).
191+
192+
## How do I increase the memory map area limit?
193+
194+
Memgraph allocates many small memory mappings, and on larger graphs the default Linux limit (`vm.max_map_count = 65530`) can be hit. This typically surfaces as a hung transaction, `munmap` errors, or `bad_alloc` crashes. Memgraph recommends roughly one memory map area per 64 KB of system RAM. The full table and background are in the [system configuration docs](https://memgraph.com/docs/database-management/system-configuration#increasing-memory-map-areas).
195+
196+
For an 8–32 GB host, `524288` is the recommended starting value. Set it for the current session:
197+
198+
```bash { target="ubuntu:latest" }
199+
sudo sysctl -w vm.max_map_count=524288
200+
```
201+
202+
To persist the change across reboots, add it to `/etc/sysctl.conf` or a drop-in under `/etc/sysctl.d/`, then reload:
203+
204+
```bash { target="ubuntu:latest" }
205+
echo 'vm.max_map_count=524288' | sudo tee -a /etc/sysctl.conf
206+
sudo sysctl -p
207+
```
208+
209+
Verify the new value:
210+
211+
```bash { target="ubuntu:latest" }
212+
sysctl vm.max_map_count
213+
```
214+
215+
This setting is applied on the Linux host, so it is relevant for both the native and Docker installs. Docker containers inherit the host's `vm.max_map_count`.
216+
217+
## How do I install mgconsole?
218+
219+
`mgconsole` is Memgraph’s command-line client for executing Cypher queries. It is already included in the Memgraph Linux packages and in the `memgraph/memgraph:3.10.1` and `memgraph/memgraph-mage:3.10.1` Docker images, so you only need a separate install if you want to run it from a different machine.
220+
221+
To install it standalone, download the binary for your platform from the [Memgraph Download Hub](https://memgraph.com/download#individual), or pull the Docker image:
222+
223+
```bash { target="ubuntu:latest" }
224+
docker run -it memgraph/mgconsole:latest --host <memgraph-host> --port 7687
225+
```
226+
227+
Full `mgconsole` documentation, including all command-line flags, is available in the [CLI docs](https://memgraph.com/docs/getting-started/cli).
228+
229+
## How do I run example Cypher queries?
230+
231+
With Memgraph running either in Docker or as a native service, you can send queries non-interactively through `mgconsole`.
232+
233+
Create two nodes and a relationship:
234+
235+
```bash { target="ubuntu:latest" }
236+
echo "CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'});" \
237+
| mgconsole --host localhost --port 7687
238+
```
239+
240+
Read them back:
241+
242+
```bash { target="ubuntu:latest" }
243+
echo "MATCH (n) RETURN n;" | mgconsole --host localhost --port 7687
244+
```
245+
246+
The expected output is a two-row tabular result listing the `Alice` and `Bob` nodes.
247+
248+
Count the nodes:
249+
250+
```bash { target="ubuntu:latest" }
251+
echo "MATCH (n) RETURN count(n) AS node_count;" \
252+
| mgconsole --host localhost --port 7687
253+
```
254+
255+
Expected output:
256+
257+
```output
258+
+------------+
259+
| node_count |
260+
+------------+
261+
| 2 |
262+
+------------+
263+
```
264+
265+
Clear the graph:
266+
267+
```bash { target="ubuntu:latest" }
268+
echo "MATCH (n) DETACH DELETE n;" | mgconsole --host localhost --port 7687
269+
```
270+
271+
Re-running the count confirms the graph is empty:
272+
273+
```bash { target="ubuntu:latest" }
274+
echo "MATCH (n) RETURN count(n) AS node_count;" | mgconsole --host localhost --port 7687
275+
```
276+
277+
Expected output:
278+
279+
```output
280+
+------------+
281+
| node_count |
282+
+------------+
283+
| 0 |
284+
+------------+
285+
```
286+
287+
If you prefer an interactive session, run `mgconsole` without piping input:
288+
289+
```bash { target="ubuntu:latest" }
290+
mgconsole --host localhost --port 7687
291+
```
292+
293+
If you are using the Docker install, substitute `docker exec -it memgraph mgconsole` for `mgconsole` in any of the commands above.
294+
295+
### A quick pattern-matching example
296+
297+
Memgraph’s strength is pattern matching. Try a slightly richer graph:
298+
299+
```bash { target="ubuntu:latest" }
300+
mgconsole --host localhost --port 7687 <<'EOF'
301+
CREATE (alice:Person {name: 'Alice'})-[:KNOWS]->(bob:Person {name: 'Bob'}),
302+
(bob)-[:KNOWS]->(carol:Person {name: 'Carol'}),
303+
(alice)-[:KNOWS]->(dave:Person {name: 'Dave'});
304+
MATCH (a:Person {name: 'Alice'})-[:KNOWS*1..2]->(friend)
305+
RETURN DISTINCT friend.name AS friend_of_alice;
306+
EOF
307+
```
308+
309+
This returns everyone reachable from Alice via one or two `KNOWS` hops.
310+
311+
## How do I install the MAGE graph-algorithm library?
312+
313+
[MAGE](https://memgraph.com/docs/advanced-algorithms) is an open-source library that extends Memgraph with advanced graph algorithms and query modules, such as PageRank, community detection, shortest paths, node embeddings, NetworkX integration, and more, all callable from Cypher. MAGE is a separate add-on. If you want these capabilities, install the MAGE variant described below.
314+
315+
### MAGE with Docker
316+
317+
Switch from the base image to `memgraph/memgraph-mage:3.10.1`, which bundles MAGE on top of the same database:
318+
319+
```bash { target="ubuntu:latest" }
320+
docker stop memgraph && docker rm memgraph
321+
docker run -p 7687:7687 -p 7444:7444 --name memgraph memgraph/memgraph-mage:3.10.1
322+
```
323+
324+
Confirm that the MAGE algorithms are loaded:
325+
326+
```bash { target="ubuntu:latest" }
327+
echo "CALL mg.procedures() YIELD name WITH name WHERE name STARTS WITH 'pagerank' RETURN name;" \
328+
| docker exec -i memgraph mgconsole
329+
```
330+
331+
You should see entries such as `pagerank.get`.
332+
333+
### MAGE with native Linux packages
334+
335+
Memgraph provides a prebuilt MAGE `arm64` `.deb` package for Ubuntu 24.04. It is installed on top of an existing Memgraph package install:
336+
337+
```bash { target="ubuntu:latest" }
338+
wget https://download.memgraph.com/memgraph-mage/v3.10.1/ubuntu-24.04/memgraph-mage_3.10.1-1_arm64.deb
339+
sudo dpkg -i memgraph-mage_3.10.1-1_arm64.deb
340+
sudo systemctl restart memgraph
341+
```
342+
343+
For other distributions, or to build MAGE from source with custom algorithms, follow the [MAGE install guide](https://memgraph.com/docs/advanced-algorithms/install-mage).
344+
345+
### Run a MAGE algorithm
346+
347+
With MAGE loaded, you can call any of its algorithms from Cypher. For example, compute PageRank on the small graph created earlier:
348+
349+
```bash { target="ubuntu:latest" }
350+
echo "CALL pagerank.get() YIELD node, rank RETURN node, rank ORDER BY rank DESC;" \
351+
| mgconsole --host localhost --port 7687
352+
```
353+
354+
The complete algorithm catalog is documented at [Available algorithms](https://memgraph.com/docs/advanced-algorithms/available-algorithms).
355+
356+
## Where do I go next?
357+
358+
- Explore the [Cypher query language](https://memgraph.com/docs/querying) and the [Memgraph data model](https://memgraph.com/docs/fundamentals).
359+
- Install the visual [Memgraph Lab](https://memgraph.com/docs/memgraph-lab) for browsing and visualizing graphs.
360+
- Pick a [client library](https://memgraph.com/docs/client-libraries) for Python, Go, Rust, Java, JavaScript, or C#.
361+
- Join the Memgraph community on [Discord](https://discord.gg/memgraph).
362+
363+
You are now ready to build and query graphs with Memgraph on Arm.

0 commit comments

Comments
 (0)