Search code examples
memgraphdb

Do I need to be memgraph user in order to run Memgraph in WSL?


I've installed Memgraph inside WSL:

wget https://download.memgraph.com/memgraph/v2.10.0/ubuntu-20.04/memgraph_2.10.0-1_amd64.deb

sudo dpkg -i memgraph_2.10.0-1_amd64.deb

I've noticed a new user in my /etc/passwd (memgraph:x:114:122::/var/lib/memgraph:/bin/bash) and /etc/shadow (memgraph:*:19587:0:99999:7:::)

What is the purpose of this user?


Solution

  • memgraph user is created when you install Memgraph on Linux. It is used to run Memgraph under that user memgraph. I run Memgraph on my Windows laptop as part of WSL. Once I start Ubuntu I run Memgrpah with sudo runuser -l memgraph -c '/usr/lib/memgraph/memgraph'. I've tries running it as root, but I couldn't do it. I presume that this is done for security reasons.