Overview
This template provides a production‑ready Neo4j instance as a Monk runnable. You can:- Run it directly to get a managed Neo4j graph database with sensible defaults
- Inherit it in your own runnable to seamlessly add graph data modeling and querying to your stack
What this template manages
- Neo4j container (
neo4jimage, configurable tag) - Network services on ports 7474 (HTTP), 7473 (HTTPS), 7687 (Bolt)
- Persistent volumes for data, configuration, imports, and plugins
- Browser-based interface for queries and graph visualization
- Memory configuration for page cache and heap
Quick start (run directly)
- Load templates
- Run Neo4j with defaults
- Customize configuration (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesinneo4j.yml, thenmonk load MANIFESTand run.
http://localhost:7474 and connect using Bolt protocol on port 7687.
Configuration
Key variables you can customize in this template:${monk-volume-path}/neo4j on the host:
/data- Graph database files/conf- Configuration files/import- CSV and data import files/plugins- Additional plugins and extensions
Use by inheritance (recommended for apps)
Inherit the Neo4j runnable in your application and declare a connection. Example:Ports and connectivity
- Service:
adminon TCP port7474(HTTP browser interface) - Service:
dbon TCP port7687(Bolt protocol) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the database host.
Persistence and configuration
- Data path:
${monk-volume-path}/neo4j/data:/data - Config path:
${monk-volume-path}/neo4j/conf:/conf - Import path:
${monk-volume-path}/neo4j/import:/import - Plugins path:
${monk-volume-path}/neo4j/plugins:/plugins - You can drop additional configuration files into the config path to customize Neo4j settings.
Features
- Native graph storage and processing
- Cypher query language for intuitive graph queries
- ACID transactions for data consistency
- High performance graph traversals
- Graph algorithms library (APOC and Graph Data Science)
- Visual query builder and graph visualization
- Full-text search capabilities
- Role-based access control
Related templates
- See other templates in this repository for complementary services
- Combine with monitoring tools (
prometheus-grafana/) for observability - Integrate with your application stack as needed
Troubleshooting
- If authentication fails, check that you’re using the correct credentials. Default username is
neo4jand the password must be set on first login. - Ensure the host volumes are writable by the container user.
- For memory issues, adjust
page_cache_size,heap_initial_size, andheap_max_sizebased on your dataset size. - Check logs:
- For connection issues, verify the Bolt port (7687) is accessible and not blocked by firewall rules.