# Problem with upgrading database to 15 version PostgeSQL

**URL:** https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995
**Category:** Technical Help
**Tags:** docker, self-hosting, help-wanted
**Created:** [April 13, 2024, 9:06am UTC](https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995 "2024-04-13T09:06:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Efim](https://community.baserow.io/letter_avatar_proxy/v4/letter/e/e9a140/32.png) [@Efim](https://community.baserow.io/u/Efim)
#### Post date: [April 13, 2024, 9:06am UTC](https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995/1 "2024-04-13T09:06:13Z")

</div>

Hi!  
I use a selfhosted baserow with traefik and switched to version 1.24.2.  
I know that postgre version 15 is required for work. But when I upgrade to a new version, get a message that everything was successful.  
But when the container starts, i get the same error in the logs about the need to update postgre.  
Help me to update Postgres pls.

The command i used for update:

```auto
docker run \
  --name baserow-pgautoupgrade \
  -e BASEROW_PUBLIC_URL=https://baserow.mydomen.com \
  -e EMAIL_SMTP=true \
  -e EMAIL_SMTP_HOST=smtp.beget.com \
  -e EMAIL_SMTP_PORT=465 \
  -e EMAIL_SMTP_USER=admin@mydomen.com \
  -e EMAIL_SMTP_PASSWORD=%iv9Pass \
  -e EMAIL_SMTP_USE_SSL=true \
  -e FROM_EMAIL=admin@mydomen.com \
  -v baserow_data:/baserow/data \
  --restart no \
  baserow/baserow-pgautoupgrade:1.24.2

```

Part of my docker-compose.yml related to the baserow:

```auto
baserow:
    image: baserow/baserow:1.24.2
    container_name: baserow
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.baserow.rule=Host(`baserow.mydomen.com`)
      - traefik.http.routers.baserow.tls=true
      - traefik.http.routers.baserow.entrypoints=web,websecure
      - traefik.http.routers.baserow.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.baserow.headers.SSLRedirect=true
      - traefik.http.middlewares.baserow.headers.STSSeconds=315360000
      - traefik.http.middlewares.baserow.headers.browserXSSFilter=true
      - traefik.http.middlewares.baserow.headers.contentTypeNosniff=true
      - traefik.http.middlewares.baserow.headers.forceSTSHeader=true
      - traefik.http.middlewares.baserow.headers.SSLHost=coldnaked.ru
      - traefik.http.middlewares.baserow.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.baserow.headers.STSPreload=true
      - traefik.http.routers.baserow.middlewares=baserow@docker
    environment:
      - BASEROW_PUBLIC_URL=https://baserow.mydomen.com
      - EMAIL_SMTP=true
      - EMAIL_SMTP_HOST=smtp.beget.com
      - EMAIL_SMTP_PORT=465
      - EMAIL_SMTP_USER=admin@mydomen.com
      - EMAIL_SMTP_PASSWORD=${MAIL_PASS}
      - EMAIL_SMTP_USE_SSL=true
      - FROM_EMAIL=admin@mydomen.com
    volumes:
      - baserow_data:/baserow/data
volumes:
  baserow_data:

```

My VPS: 2 cores, 2 gb. RAМ.

 ![error2](https://community.baserow.io/uploads/default/original/2X/e/e90847e6c713505246c7282f6c09485519391170.jpeg)

---

<div class="post-metadata">

### Author: ![bram](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://community.baserow.io/u/bram)
#### Post date: [April 15, 2024, 11:48am UTC](https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995/2 "2024-04-15T11:48:03Z")

</div>

Hey @Efim, it looks like you’re running the right steps, but I noticed in the upgrade out the following message: `PostgreSQL Database directory does not contain a database; Skipping upgrade`. I realize the additional output saying that the upgrade was successful is confusing. We’re going to remove that part if it doesn’t actually do the upgrade.

Could it be that the upgrade container wasn’t attached to the same volume you’re running in production?

---

<div class="post-metadata">

### Author: ![Efim](https://community.baserow.io/letter_avatar_proxy/v4/letter/e/e9a140/32.png) [@Efim](https://community.baserow.io/u/Efim)
#### Post date: [April 15, 2024, 5:31pm UTC](https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995/3 "2024-04-15T17:31:20Z")

</div>

Strange things - it was randomly managed to make it work.

Here’s how I did it: after updating Postgre to 15 version, the container didnt start.  
After that i changed the “baserow/baserow” image in docker-compose.yml to “baserow/baserow-pgautoupgrade” and launched this. He didn’t start up either.  
Then i brought back “baserow/baserow” image and it started somehow.

---

<div class="post-metadata">

### Author: ![bram](https://community.baserow.io/letter_avatar_proxy/v4/letter/b/9d8465/32.png) [@bram](https://community.baserow.io/u/bram)
#### Post date: [April 15, 2024, 6:01pm UTC](https://community.baserow.io/t/problem-with-upgrading-database-to-15-version-postgesql/4995/4 "2024-04-15T18:01:43Z")

</div>

Hi @Efim, that actually sounds like a successful update. When you ran the `baserow/baserow-pgautoupgrade` image via Docker Compose, it automatically updated your PostgreSQL data folder because then the correct volume was mounted. It’s expected for the container to stop after the upgrade. After that, you can use `baserow/baserow` because the data folder was updated.
