# How to add options to postgres connection?

**URL:** <https://forum.gitea.com/t/how-to-add-options-to-postgres-connection/6399>\
**Category:** General\
**Created:** [December 12, 2022, 1:42pm UTC](https://forum.gitea.com/t/how-to-add-options-to-postgres-connection/6399 "2022-12-12T13:42:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Misaka](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/misaka/32/3289_2.png) [@Misaka](https://forum.gitea.com/u/Misaka)\
**Post date:** [December 12, 2022, 1:42pm UTC](https://forum.gitea.com/t/how-to-add-options-to-postgres-connection/6399/1 "2022-12-12T13:42:31Z")

</div>

Hi,

I would like to use postgres as the backend database for gitea, but I can’t seem to find a place to add the options for postgres, what should I do ?

> db url tested elsewhere that worked:

`DATABASE_URL=postgres://username:password@server-address/gitea?sslmode=require&options=project%3Dproject_name`

Like the `project_name` above what should I do to get gitea to use this options to connect to postgres?

---

<div class="post-metadata">

**Author:** ![jake](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jake](https://forum.gitea.com/u/jake)\
**Post date:** [December 26, 2022, 9:12pm UTC](https://forum.gitea.com/t/how-to-add-options-to-postgres-connection/6399/2 "2022-12-26T21:12:21Z")

</div>

You want to use the individual configuration settings (see [Config Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#database-database)), your connection URI roughly translates to:

```auto
[database]
DB_TYPE=postgres
HOST=server-address
NAME=gitea
USER=username
PASSWD=password
SSL_MODE=require

```

I am not familiar with Postgres, so not sure what the `options=project%3Dproject_name` does. If it is necessary for a connection to complete, I think you will need to file an enhancement issue on [GitHub](https://github.com/go-gitea/gitea/issues) to add support for the options parameter.
