To host the graph database on your Synology NAS, you can choose between Neo4j (the industry standard) and Memgraph (a high-performance, in-memory graph database). Both are Bolt-compatible and work seamlessly with the sync scripts.
If not already installed, open the Package Center, search for Container Manager, and click Install.
Memgraph is optimized for speed and works exceptionally well on NAS systems with limited resources.
To correctly set permissions for the container user, you need to execute commands via the terminal:
-
Enable SSH: Ensure SSH is enabled in DSM (Control Panel -> Terminal & SNMP).
-
Connect via SSH: Open your terminal (macOS/Linux) or PuTTY (Windows) and connect:
ssh your_username@NAS_IP_ADDRESS
-
Create & Fix Permissions: Run the following commands to ensure Memgraph has write access to the persistent storage:
# Create directories if they don't exist mkdir -p /volume1/docker/memgraph/data /volume1/docker/memgraph/log # Change ownership to the container user (1026:100) sudo chown -R 1026:100 /volume1/docker/memgraph/data sudo chown -R 1026:100 /volume1/docker/memgraph/log
- Open Container Manager -> Project -> Create.
- Project Name:
memgraph-sync. - Path: Select
/docker/memgraph. - Source: Select "Create docker-compose.yaml" and paste the following configuration:
version: "3"
services:
memgraph:
image: memgraph/memgraph:latest
container_name: memgraph-server
user: "1026:100"
ports:
- "7687:7687"
- "7444:7444"
environment:
- MEMGRAPH_USER=admin
- MEMGRAPH_PASSWORD=admin
volumes:
- /volume1/docker/memgraph/data:/var/lib/memgraph
- /volume1/docker/memgraph/log:/var/log/memgraph
# Memory limit for 2GB NAS systems
deploy:
resources:
limits:
memory: 1G- Click Next and follow the wizard to start the project.
Neo4j provides a robust environment and a powerful web interface for exploring your photo graph.
- Go to Registry in Container Manager.
- Search for
neo4jand download thelatesttag.
- Open File Station and create
/docker/neo4j/dataand/docker/neo4j/logs. - Set permissions for the
neo4jfolder:- Properties -> Permission -> Create.
- User:
Everyone, Permissions:Read & Write. - Check Apply to this folder, sub-folders and files.
- Go to Image, select
neo4j, and click Run. - Port Settings:
7474->7474(HTTP UI)7687->7687(Bolt protocol)
- Volume Settings:
/docker/neo4j/data->/data/docker/neo4j/logs->/logs
- Environment Variables:
NEO4J_AUTH=neo4j/your_password
💡 Tip: After setup, you can verify the connection by opening http://[NAS-IP]:7474 (Neo4j) or using a Bolt client (Memgraph) to ensure the service is running correctly.