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

# Connect external DB

## Connect your own DB

If you already have an existing database set up, you have the option to replace the default hosted database with your own PostgreSQL instance.

<Info>When you link an external database, we do not automatically transfer your existing table structures or data. Additionally, we preserve the Fastgen database, ensuring that if you disconnect your external database, you can seamlessly regain access to the Fastgen database.</Info>

<img src="https://mintcdn.com/organa/x4VcIWGQE6pfuZkY/images/connect-external-db.webp?fit=max&auto=format&n=x4VcIWGQE6pfuZkY&q=85&s=967c97275f2d84b9087d91d72f289028" alt="external-connection" width="812" height="582" data-path="images/connect-external-db.webp" />

Navigate to *Project Settings* and select *External Database* to enter your database credentials. Once the connection is enabled, you can use the DB QUERY ACTION in your APIs & Workflows to interact with the connected database and its corresponding tables.
