Skip to content

Podman quadlets instructions #1469

@rarensu

Description

@rarensu

I discovered how to run Memgraph under podman quadlets. It's similar to docker compose, but for completely rootless installations. Everything runs under a regular user, lives in their home directory, and restarts automatically while respecting normal systemd rules.

File memgraph-network.pod:

[Unit]
Description=Memgraph network

[Pod]
PublishPort=7687:7687
PublishPort=3000:3000

[Install]
WantedBy=default.target

File memgraph-data.volume:

[Unit]
Description=Memgraph data volume
DefaultDependencies=no

[Volume]
Driver=local

File memgraph-mage.container:

[Unit]
Description=Memgraph Mage container

[Container]
Image=docker.io/memgraph/memgraph-mage
Pod=memgraph-network.pod
Volume=memgraph-data.volume:/var/lib/memgraph
Label=app=memgraph-mage

[Service]
Restart=on-failure

[Install]
WantedBy=default.target

File: memgraph-lab.container:

[Unit]
Description=Memgraph Lab container
Requires=memgraph-mage.container
After=memgraph-mage.container

[Container]
Image=docker.io/memgraph/lab
Pod=memgraph-network.pod
Label=app=memgraph-lab

[Service]
Restart=on-failure

[Install]
WantedBy=default.target

Usage:

podman quadlets install /path/to/these/four/files/
systemctl --user daemon-reload
systemctl --user start memgraph-mage.service memgraph-lab.service

Additionally, I like to set the Environment=BASE_PATH= for memgraph-lab because that makes it easier for it to coexist with other apps behind a reverse proxy.

I hope you can put this information to some good use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions