> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/database/postgresql/install-postgresql.md).

# Install PostgreSQL

## Overview and generalities

* By default every Postgres installation comes with one database already created called "postgres"
* This is important because Postgres requires you to specify the name of the database to make a connection, so there needs to always be one database
* [Postgres Downloads URL](https://www.postgresql.org/download/)

## Linux Debian

* Install Packages

```bash
sudo apt update && sudo apt install postgresql postgresql-contrib
```

* Once the installation is complete, the PostgreSQL service will start. To verify the installation, use the <mark style="color:orange;">`psql`</mark> tool to print the server version

```bash
sudo -u postgres psql -c "SELECT version();"
```

{% hint style="info" %}
Output should look like:

```bash
PostgreSQL 11.5 (Debian 11.5-1+deb10u1) on x86_64-pc-linux-gnu, 
compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
```

{% endhint %}

## Windows

* Download installer from the [Postgres Downloads URL](https://www.postgresql.org/download/)
* Follow the Wizard like any other app
* Select path where you want installed (Usually left default)
* Select additional components to be installed

![](/files/SVDGdO4C4RpKGFXnSE7U)

* Pass in the password for the superuser

![](/files/a41BRBt4jvADRlaEwViV)

* Pass in the Database Port (Default: 5432)&#x20;
* Click next on the rest and this will start the install
