> For the complete documentation index, see [llms.txt](https://docs.bindplane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bindplane.com/deployment/virtual-machine/bindplane/postgresql/postgres-configuration.md).

# Postgres Configuration

Once PostgreSQL is installed, you need to create a user, database, and assign permissions.

### 1. Create User

Replace `your_password` with a secure password.

```sql
CREATE USER "bindplane" WITH PASSWORD 'your_password';
```

### 2. Create Database

Create a database named `bindplane`. You can use a different database name if you prefer.

```sql
CREATE DATABASE "bindplane" ENCODING 'UTF8' TEMPLATE template0;
GRANT CREATE ON DATABASE "bindplane" TO "bindplane";
\c "bindplane";
```

### 3. Grant Permissions

Switch to the database created in step 1 with `\c bindplane`. Replace `bindplane` with the name of your database. Once connected, execute the following `GRANT` commands to give the `bindplane` user access to the `bindplane` database. Update the schema and database name if you used a different name.

```sql
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "bindplane";
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "bindplane";
GRANT ALL PRIVILEGES ON SCHEMA public TO "bindplane";
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bindplane.com/deployment/virtual-machine/bindplane/postgresql/postgres-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
