> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codecobra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your Odoo

> The first thing CodeCobra asks for — a connection to your Odoo system, so it can answer from real data.

CodeCobra is far more useful once it can see your actual system. So the first thing it asks a new account for is a connection — before any projects, before any settings.

It takes about a minute.

<Steps>
  <Step title="Your Odoo address and login">
    Enter the web address you use to reach Odoo, your login, and either your password or an Odoo API key.

    An **API key is the better choice**: you can scope it, and you can revoke it without changing your own password. Generate one in Odoo under **Preferences → Account Security → New API Key**.
  </Step>

  <Step title="Pick the database — if you're asked">
    CodeCobra checks which databases your server exposes. Most installations run one, in which case it detects it and moves on without asking.

    You'll only see this step if your server hosts several, or if it keeps its database list private and needs you to type the name.
  </Step>

  <Step title="Confirm the version">
    CodeCobra reads the Odoo version from the server and shows you what it found. Confirm it's right — the version determines how any code it writes is built.
  </Step>
</Steps>

That's it. You land in a chat, connected, and can ask your first question straight away.

## What it does with the connection

Nothing you haven't asked for. On a new connection CodeCobra can read your data to answer questions; changing anything is a separate, deliberate step.

The connection is stored encrypted and can never be read back — see [Security](/security/overview).

<Tip>Not ready to connect a production system? Point it at a staging or test database instead. You can add more environments later, and choose per chat which one CodeCobra is allowed to touch.</Tip>

## If it can't connect

| What you see                    | Usually means                                                                                  |
| ------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Can't find that address**     | A typo, or an internal-only URL that isn't reachable from outside your network.                |
| **Login didn't work**           | Wrong login or key. If you're using an API key, check it was generated for the user you named. |
| **Database not found**          | The server hosts several and the name needs typing in exactly.                                 |
| **That doesn't look like Odoo** | The address resolves to something else — a marketing site, or a proxy in front of Odoo.        |

You can save a connection that doesn't test cleanly and fix it later, so a temporarily unreachable server doesn't block you from setting up.

## Skipping it

You can dismiss the setup and connect later from any project's settings. CodeCobra still works — it can answer general Odoo questions and write code — but it can't tell you anything about *your* system until it has a connection.

<Card title="Connect more environments" icon="plug" href="/projects/odoo-environments">
  Adding production, staging and test connections to a project, and setting what each one is allowed to do.
</Card>
