Neo4j Graph Database
Neo4j graph database with built-in browser interface.
Overview
Neo4j is a native graph database that stores and manages data as interconnected nodes and relationships, making it exceptionally powerful for scenarios where connections between data points are as important as the data itself. Originally developed in 2007, Neo4j pioneered the graph database space and remains the most widely adopted solution for handling complex, highly connected datasets. Unlike traditional relational databases that struggle with deep relationship queries, Neo4j's native graph storage engine makes traversing relationships lightning-fast regardless of database size.
This Neo4j deployment includes the complete graph database engine with the built-in Neo4j Browser interface, providing both the backend database server and a web-based query and visualization tool. The configuration includes the APOC (Awesome Procedures on Cypher) plugin library, which extends Neo4j with over 450 additional procedures and functions for data integration, graph algorithms, and advanced operations. The setup exposes both the HTTP interface for browser access and the Bolt protocol for programmatic connections.
This stack is ideal for developers building recommendation engines, data scientists analyzing complex networks, enterprises implementing fraud detection systems, and organizations creating knowledge graphs or master data management solutions. The inclusion of APOC makes this particularly valuable for data integration projects where you need to import from various sources, perform graph algorithms, or execute complex data transformations that go beyond standard Cypher capabilities.
Key Features
- Native graph storage engine optimized for traversing relationships at scale
- Cypher declarative query language designed specifically for graph patterns
- Built-in Neo4j Browser with interactive query interface and graph visualizations
- APOC plugin library with 450+ procedures for data integration and algorithms
- ACID compliance ensuring data consistency across complex transactions
- Full-text search capabilities integrated with graph traversals
- Bolt binary protocol for high-performance application connectivity
- Real-time graph analytics and pathfinding algorithms
Common Use Cases
- 1Social network analysis and friend recommendation systems
- 2E-commerce recommendation engines based on purchase patterns and user behavior
- 3Fraud detection systems analyzing transaction networks and suspicious patterns
- 4Knowledge graphs for content management and semantic search applications
- 5Identity and access management with role-based permissions and inheritance
- 6Supply chain optimization and dependency tracking across complex networks
- 7Master data management linking entities across enterprise systems
Prerequisites
- Minimum 4GB RAM recommended for production workloads (1GB minimum for testing)
- Docker and Docker Compose installed with support for bind mounts
- Ports 7474 (HTTP) and 7687 (Bolt) available on the host system
- Basic understanding of graph database concepts and Cypher query language
- NEO4J_USER and NEO4J_PASSWORD environment variables configured
- Sufficient disk space for graph data storage and transaction logs
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 neo4j: 3 image: neo4j:54 container_name: neo4j5 restart: unless-stopped6 environment: 7 NEO4J_AUTH: ${NEO4J_USER}/${NEO4J_PASSWORD}8 NEO4J_PLUGINS: '["apoc"]'9 volumes: 10 - neo4j_data:/data11 - neo4j_logs:/logs12 - neo4j_plugins:/plugins13 ports: 14 - "7474:7474"15 - "7687:7687"16 networks: 17 - neo4j-network1819volumes: 20 neo4j_data: 21 neo4j_logs: 22 neo4j_plugins: 2324networks: 25 neo4j-network: 26 driver: bridge.env Template
.env
1NEO4J_USER=neo4j2NEO4J_PASSWORD=changeme123Usage Notes
- 1Docs: https://neo4j.com/docs/
- 2Access Neo4j Browser at http://localhost:7474 | Bolt port 7687
- 3Login with neo4j/YOUR_PASSWORD (set in NEO4J_AUTH)
- 4APOC plugin pre-installed - provides 450+ procedures and functions
- 5Cypher queries: MATCH (n) RETURN n LIMIT 25 to explore data
- 6Backup: neo4j-admin dump --database=neo4j --to=/backups/
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 neo4j:5 image: neo4j:56 container_name: neo4j7 restart: unless-stopped8 environment:9 NEO4J_AUTH: ${NEO4J_USER}/${NEO4J_PASSWORD}10 NEO4J_PLUGINS: '["apoc"]'11 volumes:12 - neo4j_data:/data13 - neo4j_logs:/logs14 - neo4j_plugins:/plugins15 ports:16 - "7474:7474"17 - "7687:7687"18 networks:19 - neo4j-network2021volumes:22 neo4j_data:23 neo4j_logs:24 neo4j_plugins:2526networks:27 neo4j-network:28 driver: bridge29EOF3031# 2. Create the .env file32cat > .env << 'EOF'33NEO4J_USER=neo4j34NEO4J_PASSWORD=changeme12335EOF3637# 3. Start the services38docker compose up -d3940# 4. View logs41docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/neo4j/run | bashTroubleshooting
- Neo4j fails to start with 'not enough memory' error: Increase Docker container memory limits or add NEO4J_dbms_memory_heap_initial__size environment variable
- Cannot connect to Neo4j Browser at localhost:7474: Check if NEO4J_AUTH environment variables are set correctly and container is fully started
- Bolt connection refused on port 7687: Ensure NEO4J_dbms_connector_bolt_enabled is not set to false and firewall allows the port
- APOC procedures not available in queries: Verify NEO4J_PLUGINS environment variable includes 'apoc' and container has restarted after configuration
- Database becomes slow with large datasets: Add heap memory configuration with NEO4J_dbms_memory_heap_max__size and consider page cache tuning
- Transaction timeout errors during large imports: Increase transaction timeout with NEO4J_dbms_transaction_timeout setting
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download