Error: The pgvecto.rs extension is not available inthis Postgres instance.
Running postgresql:17 on another machine
Installed vchord and required vector extension.
Using DB_URL='postgresql://immich:<password redacted>@10.5.0.111:5432/immich_db'
DB user immich
DB owner immich
DB name immich_db
User immich has superuser permissions
Extensions installed and attached to immich_db
Vchord
Vector
My understand was if you used vchord pgvecto.rs was not required. I've tried using DB_VECTOR_EXTENSION=vectorchord and [vectorchord] in the .env and the compose file. Which throws a bad variable.
I'm not sure on next steps. 17 doesnt have a 3.0 pgvector.rs and installing 4.0 throws a bad version.
Location in .env which I've commented out and left in with same result.
DB_DATA_LOCATION=postgresql.cffn.us:/data/dbs/immich/postgresql
30 Replies
:wave: Hey @Sirius,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.DB_DATA_LOCATION is meaningless to you if you’re using an external Postgres, so just take that out
Is this a fresh install or what are you migrating from?
If needed it would be DB_VECTOR_EXTENSION=vectorchord, I can’t imagine that throwing an error so please share that
thank you, I'll take it out completely, have done it commented out as well.
Error: Invalid environment variables: DB_VECTOR_EXTENSION=vectorchord
What is telling you that? Doesn’t make sense to me
You can set whatever variable you want in docker
name: immich
services:
immich-server:
container_name: immich
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for ac>
volumes:
# Do not edit the next line. If you want to change the media storage location on >
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
environment:
DB_VECTOR_EXTENSION: ${DB_VECTOR_EXTENSION}
DB_URL: ${DB_URL}
REDIS_HOST: ${REDIS_HOST}
REDIS_PASSWORD: ${REDIS_PASSWORD}
REDIS_USER: ${REDIS_USERNAME}
REDIS_PORT: ${REDIS_PORT}
restart: always
healthcheck:
disable: false
immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the>
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.>
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] >
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
healthcheck:
disable: false
volumes:
model-cache:
.env
You can find documentation for all the supported env variables at https://immich.app/>
The location where your uploaded files are stored
UPLOAD_LOCATION=truenas.cffn.us:/mnt/Backup/Storage/nimbus/immich
THUMB_LOCATION=./thumbs
The location where your database files are stored
DB_SKIP_MIGRATIONS=true
To set a timezonRAS@uc8ckFYH63e, uncomment the next line and change Etc/UTC to a TZ i>
TZ=America/New_York
The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
Connection secret for postgres. You should change it to a random password
Please use only the characters
List of installed extensions Name | Version | Schema | Description
---------+---------+------------+--------------------------------------------------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language vchord | 0.3.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM vector | 0.8.0 | public | vector data type and ivfflat and hnsw access methods immich_db-# \du List of roles Role name | Attributes
-----------+------------------------------------------------------------ immich | Superuser, Create role, Create DB, Replication, Bypass RLS postgres | Superuser, Create role, Create DB, Replication, Bypass RLS
A-Za-z0-9
, without special characters or spaces
DB_VECTOR_EXTENSION=vectorchord
The values below this line do not need to be changed
###################################################################################
DB_URL='postgresql://immich:<redacted>@10.5.0.111:5432/immich_db'
#?sslmode=require'
REDIS_HOST=10.5.0.111
REDIS_PASSWORD=<redacted>
REDIS_USERNAME=immich
REDIS_PORT=6379
full error: with DB_extension set: immich | /usr/src/app/dist/repositories/config.repository.js:44
immich | throw new Error(Invalid environment variables: ${errors.map((error) =>
${error.property}=${error.value}).join(', ')}
);
immich | ^
immich |
immich | Error: Invalid environment variables: DB_VECTOR_EXTENSION=vectorchord
immich | at getEnv (/usr/src/app/dist/repositories/config.repository.js:44:15)
immich | at ConfigRepository.getEnv (/usr/src/app/dist/repositories/config.repository.js:199:22)
immich | at Object.<anonymous> (/usr/src/app/dist/app.module.js:52:56)
immich | at Module._compile (node:internal/modules/cjs/loader:1554:14)
immich | at Object..js (node:internal/modules/cjs/loader:1706:10)
immich | at Module.load (node:internal/modules/cjs/loader:1289:32)
immich | at Function._load (node:internal/modules/cjs/loader:1108:12)
immich | at TracingChannel.traceSync (node:diagnostics_channel:322:14)
immich | at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
immich | at Module.require (node:internal/modules/cjs/loader:1311:12)
immich |
immich | Node.js v22.14.0
Logged in to the immich_db:List of installed extensions Name | Version | Schema | Description
---------+---------+------------+--------------------------------------------------------------------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language vchord | 0.3.0 | public | vchord: Vector database plugin for Postgres, written in Rust, specifically designed for LLM vector | 0.8.0 | public | vector data type and ivfflat and hnsw access methods immich_db-# \du List of roles Role name | Attributes
-----------+------------------------------------------------------------ immich | Superuser, Create role, Create DB, Replication, Bypass RLS postgres | Superuser, Create role, Create DB, Replication, Bypass RLS
Just remove the DB_VECTOR_EXTENSION var, it defaults to vectorchord anyway
LOG [Microservices:EventRepository] Initialized websocket server
immich | Error: The pgvecto.rs extension is not available in this Postgres instance.
immich | If using a container image, ensure the image has the extension installed.
immich | at /usr/src/app/dist/services/database.service.js:70:23
immich | at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
immich | at async /usr/src/app/dist/repositories/database.repository.js:250:27
immich | at async /usr/src/app/node_modules/kysely/dist/cjs/kysely.js:535:20
immich | at async DefaultConnectionProvider.provideConnection (/usr/src/app/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:12:20)
immich | at async /usr/src/app/dist/repositories/database.repository.js:247:13
that gives me the issue of not having pgvecto.rs available
Have you changed your database to use the new image as specified in the release notes?
it's a new install. and I went through the https://immich.app/docs/administration/postgres-standalone/
Pre-existing Postgres | Immich
While not officially recommended, it is possible to run Immich using a pre-existing Postgres server. To use this setup, you should have a baseline level of familiarity with Postgres and the Linux command line. If you do not have these, we recommend using the default setup with a dedicated Postgres container.
You can still use our image in this case, even if it's standalone
Why do you have DB_SKIP_MIGRATIONS?
You should probably just start over with a brand new install. Use the compose and env from our website. Just remove the database block and set the DB_URL variable for the immich server, remove all other DB_variables
mmich | Error: Invalid environment variables: DB_VECTOR_EXTENSION=vectorchord
This is weird to me
Are you 100% sure you’re using 1.133.0? For the immich server
fresh install with -release image
Well let’s start over with a fresh compose and env like I said , you shouldn’t need that var anyway
Can you also post output of
docker inspect immich
My thought is I have the DB_URL in server; if I'm doing a fresh install and pointing to DB URL it should go here: database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
DB_URL='postgresql://immich:<redacted>@10.5.0.111:5432/immich_db'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
but modify to postgres:17-vectorchord0.3.0-pgvectors0.2.0
a postgres container with a DB_URL env var doesn't make sense
right
(please use code formatting with three backticks ` btw)
I'm going to start with brand new install with the compose and env changing the DB_URL and set up the postgres image on the postgresql17 database.
I do wonder if it's looking for vector.rs as it's still in the dockerfile and is the only one I'm missing. When I installed vector.rs 4.0 it told me the version isn't supported which makes sense as 3.0 is the latest version listed in the postgres dockerfile versions.yml
You shouldn’t need vecto.RS
Should be vector 0.8.0 and vchord 0.3.0
This looked correct here
right but when I install vecto.rs 3.0 it moves beyond that error.
Did a fresh yml and .env. going to setup the db image in my postgresql now because it still doesn't like it
Do you have pgvector installed as well?
Vector, vchord, vecto.rs. maybe thats the issue. I thought the vector and pgvector were the same because they were v8.0 I'll add that and see if i get a change.
I feel like you’re not actually running 1.133.0 right now. The environmental variable error doesn’t make sense and even if it were using pgvecto.rs, the index creation command for it was changed in 1.133 so it shouldn’t look like this
I can pin the install image but it is a new install so i can't imagine the docker compose yml pulling a different version when instructed to use release
I’m not sure why it is but it really does look like this is an older immich release based on what you’ve shared so far
Maybe you need to do
docker compose pull
?Can you please do docker inspect immich like I asked above?
Ok so the version was the issue. I changed the version from the default release to v1.133.0 it pulled everything again.
Then it threw a shared preload libraries vchord code i had to login and alter database since it wasnt using the config file.
Once I set shared libraries and reset and and started my redis (didnt start automatically) it inititialized everything and i have login
This is the version that -release pulled Immich v1.132.3
Nice, thanks for sharing. Wonder why release didn’t pull 1.133
So the steps to my solution were to:
1. Pull latest docker-compose.yml and .env. delete postgres and redis containers and set .env variables for DB_URL and REDIS variables.
2. Set the version in .env to the most recent version (resulted in vchord needs to be added to shared_preload_libraries error)
3. Confirmed vchord was in the shared_preload in postgres.conf. login to db as superuser and ALTER SYSTEM shared_preload_libraries TO vchord
4. Started redis as it then threw a redis noperm error
Things that didn't work
1. Installing vecto.rs
2. Trying to install pgvector or vchord when they were already installed and showing as active in the db.
3. Using DB_VECTOR_EXTENSION
This thread has been closed. To re-open, use the button below.