1"use strict";(globalThis.webpackChunkdocs=globalThis.webpackChunkdocs||[]).push([[7484],{75832(e,n,s){s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"how-to/use-neo4j-aura","title":"Use Neo4j Aura","description":"Neo4j Aura is a fully managed cloud graph database. It\'s the easiest way to get started with create-context-graph without running Neo4j locally.","source":"@site/docs/how-to/use-neo4j-aura.md","sourceDirName":"how-to","slug":"/how-to/use-neo4j-aura","permalink":"/docs/how-to/use-neo4j-aura","draft":false,"unlisted":false,"editUrl":"https://github.com/neo4j-labs/create-context-graph/tree/main/docs/docs/how-to/use-neo4j-aura.md","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"sidebar_position":3},"sidebar":"docs","previous":{"title":"Switch Agent Frameworks","permalink":"/docs/how-to/switch-frameworks"},"next":{"title":"Use Neo4j Local","permalink":"/docs/how-to/use-neo4j-local"}}');var r=s(74848),o=s(28453);const i={sidebar_position:3},a="Use Neo4j Aura",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Step 1: Create an Aura Instance",id:"step-1-create-an-aura-instance",level:2},{value:"Step 2: Download the <code>.env</code> File",id:"step-2-download-the-env-file",level:2},{value:"Step 3: Scaffold Your Project",id:"step-3-scaffold-your-project",level:2},{value:"Step 4: Verify the Connection",id:"step-4-verify-the-connection",level:2},{value:"Step 5: Seed Data and Start",id:"step-5-seed-data-and-start",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Connection refused",id:"connection-refused",level:3},{value:"Authentication failed",id:"authentication-failed",level:3},{value:"Slow queries",id:"slow-queries",level:3},{value:"Further Reading",id:"further-reading",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"use-neo4j-aura",children:"Use Neo4j Aura"})}),"\n",(0,r.jsxs)(n.p,{children:["Neo4j Aura is a fully managed cloud graph database. It's the easiest way to get started with ",(0,r.jsx)(n.code,{children:"create-context-graph"})," without running Neo4j locally."]}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A ",(0,r.jsx)(n.a,{href:"https://neo4j.com/cloud/aura/",children:"Neo4j Aura"})," account (free tier available)"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"step-1-create-an-aura-instance",children:"Step 1: Create an Aura Instance"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Go to ",(0,r.jsx)(n.a,{href:"https://console.neo4j.io",children:"console.neo4j.io"})]}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"New Instance"})]}),"\n",(0,r.jsxs)(n.li,{children:["Choose ",(0,r.jsx)(n.strong,{children:"AuraDB Free"})," (or a paid tier for production)"]}),"\n",(0,r.jsx)(n.li,{children:"Select a region close to you"}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"Create"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Save the generated password"})," \u2014 you'll need it in the next step"]}),"\n"]}),"\n",(0,r.jsxs)(n.h2,{id:"step-2-download-the-env-file",children:["Step 2: Download the ",(0,r.jsx)(n.code,{children:".env"})," File"]}),"\n",(0,r.jsxs)(n.p,{children:["After creating the instance, Neo4j Aura offers a ",(0,r.jsx)(n.strong,{children:"Download .env"})," button. This file contains your connection credentials:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-env",children:"NEO4J_URI=neo4j+s://xxxxxxxx.databases.neo4j.io\nNEO4J_USERNAME=neo4j\nNEO4J_PASSWORD=your-generated-password\n"})}),"\n",(0,r.jsx)(n.p,{children:"Save this file somewhere accessible."}),"\n",(0,r.jsx)(n.h2,{id:"step-3-scaffold-your-project",children:"Step 3: Scaffold Your Project"}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.code,{children:"--neo4j-aura-env"})," flag to import your Aura credentials directly:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"uvx create-context-graph my-app \\\n --domain healthcare \\\n --framework pydanticai \\\n --neo4j-aura-env /path/to/Neo4j-xxxxxxxx-Created-2026-03-28.txt \\\n --demo-data\n"})}),"\n",(0,r.jsx)(n.p,{children:"This will:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Parse the ",(0,r.jsx)(n.code,{children:".env"})," file for connection details"]}
1),"\n",(0,r.jsx)(n.li,{children:"Configure the generated project to use your Aura instance"}),"\n",(0,r.jsxs)(n.li,{children:["Set ",(0,r.jsx)(n.code,{children:"neo4j_type"})," to ",(0,r.jsx)(n.code,{children:"aura"})," automatically"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"step-4-verify-the-connection",children:"Step 4: Verify the Connection"}),"\n",(0,r.jsx)(n.p,{children:"After scaffolding, verify the connection:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"cd my-app\nmake test-connection\n"})}),"\n",(0,r.jsx)(n.p,{children:"You should see:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"\u2705 Connected to Neo4j Aura (neo4j+s://xxxxxxxx.databases.neo4j.io)\n"})}),"\n",(0,r.jsx)(n.h2,{id:"step-5-seed-data-and-start",children:"Step 5: Seed Data and Start"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"make install\nmake seed\nmake start\n"})}),"\n",(0,r.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,r.jsx)(n.h3,{id:"connection-refused",children:"Connection refused"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Ensure your Aura instance is ",(0,r.jsx)(n.strong,{children:"Running"})," (not paused)"]}),"\n",(0,r.jsx)(n.li,{children:"Free-tier instances pause after 3 days of inactivity \u2014 resume from the Aura console"}),"\n",(0,r.jsxs)(n.li,{children:["Check that ",(0,r.jsx)(n.code,{children:"NEO4J_URI"})," starts with ",(0,r.jsx)(n.code,{children:"neo4j+s://"})," (TLS required for Aura)"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"authentication-failed",children:"Authentication failed"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Double-check the password in your ",(0,r.jsx)(n.code,{children:".env"})," file"]}),"\n",(0,r.jsxs)(n.li,{children:["If you lost the password, reset it from the Aura console under ",(0,r.jsx)(n.strong,{children:"Instance settings"})]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"slow-queries",children:"Slow queries"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Free-tier Aura instances have limited resources \u2014 queries may take 2-5 seconds"}),"\n",(0,r.jsx)(n.li,{children:"For better performance, upgrade to a paid tier"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"further-reading",children:"Further Reading"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/how-to/use-docker",children:"Use Docker"})," -- alternative: run Neo4j locally via Docker"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/how-to/use-neo4j-local",children:"Use Neo4j Local"})," -- alternative: run Neo4j without Docker"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/docs/quick-start",children:"Quick Start"})," -- get a full app running in under 5 minutes"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453(e,n,s){s.d(n,{R:()=>i,x:()=>a});var t=s(96540);const r={},o=t.createContext(r);function i(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.