How to install MyVestaCP with latest PostgreSQL on Debian 12

MyVestaCP installs PostgreSQL 15 by default on Debian 12, as that is the version available in Debian’s official repositories. The installer does not automatically detect or install newer PostgreSQL releases, such as version 17 or 18. Therefore, if you use the MyVestaCP installer to set up PostgreSQL, it will install version 15 on your system. However, PostgreSQL 17 and 18 include several performance and feature enhancements over version 15. Upgrading to one of these newer versions can provide noticeable improvements in efficiency and reliability.

In this post, I will show you how to install the latest version of PostgreSQL on Debian 12 while using MyVestaCP.

  • Add the latest PostgreSQL repo (before installing myVestaCP)

To manually configure the Apt repository, run the following commands on the terminal:

sudo apt install curl ca-certificates

sudo install -d /usr/share/postgresql-common/pgdg

sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc

. /etc/os-release

sudo sh -c "echo 'deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main' > /etc/apt/sources.list.d/pgdg.list"

sudo apt update
  • Check which version will be installed
apt show postgresql | grep Version
  • Generate MyVestaCP installer

Since MyVestaCP does not install PostgreSQL by default, you need to prepare your MyVesta installation script by selecting PostgreSQL on their installation generator page: https://www.myvestacp.com/install_generator.html

  • Run the myVestaCP installer

Run the MyVestaCP installation command in the terminal you created on their website in the previous step. The command should look like this:

sudo bash vst-install-debian.sh --apache yes --nginx yes --phpfpm no --vsftpd no --proftpd yes --named yes --mysql yes --mysql8 no --postgresql yes ...

During installation, PostgreSQL will pull the latest version instead of 15. After the installation of MyVestaCP, check the version of PostgreSQL by running the following command on the terminal:

psql --version

That’s it. Now your Debian machine will have the latest PostgreSQL with MyVestaCP control panel.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.