Getting Started
Neo4j is a leading graph database that stores data as nodes and relationships rather than tables. It excels at queries that traverse highly connected data — social graphs, recommendation engines, fraud detection, knowledge graphs, and network analysis. Available as a managed service in Eyevinn Open Source Cloud.
Prerequisites
- If you have not already done so, sign up for an OSC account.
Step 1: Create a Neo4j instance
Navigate to the Neo4j service in the OSC web console and click Create docker-neo4j. Fill in the fields:
| Field | Value |
|---|---|
| Name | A short alphanumeric identifier (e.g. mygraph) |
| Auth | Authentication string in the format neo4j/<your-password> (e.g. neo4j/mypassword123) |
Click Create and wait for the instance status to turn green.
Tip: If you leave
Authunset, Neo4j defaults to requiring a password change on first login usingneo4j/neo4j. SetAuthexplicitly to pre-configure credentials.
Default Credentials
If Auth is not set, the default credentials for the Neo4j Browser are:
| Field | Value |
|---|---|
| Username | neo4j |
| Password | neo4j |
You will be prompted to change the password immediately on first login.
Step 2: Access the Neo4j Browser
Click on your running instance card to open it, then click Open to access the Neo4j Browser web UI. Log in with the credentials from Step 1.
From the browser you can:
- Run Cypher queries against your graph database
- Visualize nodes and relationships as a graph
- Import and export data
- Monitor database performance
Step 3: Connect from your application
Neo4j uses the Bolt protocol (port 7687) for application connections. Use one of the official drivers:
import neo4j from 'neo4j-driver';
const driver = neo4j.driver(
'bolt://<instance-url>:7687',
neo4j.auth.basic('neo4j', '<your-password>')
);
const session = driver.session();
const result = await session.run(
'CREATE (p:Person {name: $name}) RETURN p',
{ name: 'Alice' }
);
await session.close();
await driver.close();
Note: Check the instance details in the OSC console for the exact Bolt endpoint URL and port.
Example: Basic Graph Queries
Once connected, try these Cypher queries in the Neo4j Browser:
// Create nodes and a relationship
CREATE (alice:Person {name: 'Alice'})
CREATE (bob:Person {name: 'Bob'})
CREATE (alice)-[:KNOWS]->(bob)
// Find all people Alice knows
MATCH (alice:Person {name: 'Alice'})-[:KNOWS]->(friend)
RETURN friend.name
// Find shortest path between two nodes
MATCH path = shortestPath(
(alice:Person {name: 'Alice'})-[*]-(target:Person {name: 'Bob'})
)
RETURN path
Configuration Options
| Option | Required | Description |
|---|---|---|
name |
Yes | Alphanumeric instance name |
Auth |
No | Authentication in username/password format. Defaults to neo4j/neo4j if not set |
CLI Usage
# Create a Neo4j instance
osc create neo4j-docker-neo4j mygraph \
-o Auth="neo4j/mySecurePassword123"