knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
15.09k stars 1.38k forks source link

upgrade.go:75: error running migration v4.0.0: pq: permission denied to create extension "pgcrypto" #2127

Closed mstfknn closed 2 hours ago

mstfknn commented 3 hours ago

root@listmonk:~# ./listmonk --upgrade 2024/10/31 09:30:13.788009 main.go:107: v4.0.1 (f5dfb0c 2024-10-28T07:48:58Z, linux/amd64) 2024/10/31 09:30:13.788257 init.go:162: reading config: config.toml 2024/10/31 09:30:13.788555 init.go:302: connecting to db: localhost:5432/listmonk ** IMPORTANT: Take a backup of the database before upgrading. continue (y/n)? y 2024/10/31 09:30:15.317117 upgrade.go:73: running migration v4.0.0 2024/10/31 09:30:15.317154 v4.0.0.go:16: IMPORTANT: this upgrade might take a while if you have a large database. Please be patient ... 2024/10/31 09:30:15.318558 upgrade.go:75: error running migration v4.0.0: pq: permission denied to create extension "pgcrypto"

knadh commented 2 hours ago

pq: permission denied to create extension "pgcrypto"

The error says that the Postgres credentials you've provided in config.toml don't have the permission to initiate that extension. Please create a user with appropriate database permissions.