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

# Determining the PostgreSQL and PostGIS versions

> Learn how to determine which versions of PostgreSQL and PostGIS are installed on a server using the psql command-line program.

This article describes how to determine which PostgreSQL and PostGIS versions are installed on a server.

## Determining the PostgreSQL version

To determine which PostgreSQL version is installed on your server, log in to your account [using SSH](/docs/using-ssh-secure-shell), and then type the following command at the command line:

```shell theme={null}
psql --version
```

Alternatively, you can log in to PostgreSQL from the command line [using the psql program](/docs/connect-to-postgresql-from-the-command-line), and then type the following query to view additional version information:

```sql theme={null}
SELECT version();
```

### Determining the PostGIS version

Your server may also have PostGIS installed. To determine the version installed on your server, log in to PostgreSQL from the command line [using the psql program](/docs/connect-to-postgresql-from-the-command-line), and then type the following query:

```sql theme={null}
SELECT PostGIS_full_version();
```

If PostGIS is installed, you see output that resembles the following (the exact version numbers may differ):

```
POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6 March 2012" 
GDAL="GDAL 1.9.1, released 2012/05/15 GDAL_DATA not found" LIBXML="2.7.6" TOPOLOGY RASTER
(1 row)
```

If PostGIS is not installed, however, you see output that resembles the following:

```
ERROR:  function postgis_full_version() does not exist
```

<Note>
  If you have a managed VPS or managed Dedicated server and would like PostGIS installed, please open a support ticket at [https://my.hosting.com](https://my.hosting.com).
</Note>

## Installed PostgreSQL versions

The PostgreSQL version installed on a server depends on the operating system version:

* Servers running **AlmaLinux/Rocky Linux/CloudLinux 9** have **PostgreSQL 13.18.1** installed.
* Servers running **AlmaLinux/Rocky Linux/CloudLinux 8** have **PostgreSQL 10.23.4** installed.
* Servers running **CloudLinux 7** have **PostgreSQL 9.6.22** installed.

## Related articles

* [Connecting to PostgreSQL using psql](/docs/connect-to-postgresql-from-the-command-line)
