> For the complete documentation index, see [llms.txt](https://hatchbox.gitbook.io/hatchbox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hatchbox.gitbook.io/hatchbox/apps/postgres.md).

# Postgres

## How can I enable PostGIS?

You'll need to install Postgis:

```
sudo apt-get install postgis postgresql-13-postgis-3-scripts
```

Then create the extension:

```
$ sudo su postgres
$ psql
psql (10.4 (Ubuntu 10.4-2.pgdg16.04+1), server 9.6.9)
Type "help" for help.

postgres=# CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;
CREATE EXTENSION
CREATE EXTENSION
postgres=# \q
```

Last up, change your DATABASE\_URL env var to start with `postgis://` instead of `postgresql://`
