[Tutorial] Immich remote video transcoding #14142
erkexzcx
started this conversation in
Community Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description & Prerequisites
Decided to write this in order to help fellow users to transcode their library on remote server (e.g. gaming PC), where their immich server isn't powerful enough, or doesn't have required hardware acceleration.
In this example, immich server is the server that hosts your Immich instance on (basically
docker-compose.yml
contents). remote server is more powerful hardware, e.g. your gaming PC.Prerequisites:
${UPLOAD_LOCATION}
mountpoint/files directly. It means that users who don't store files in remote storage (e.g. via NFS) will have a hard time to set it up, but it's not a problem to me.So before you begin - understand this if you are using local storage, you might need to mount it via SMB or NFS to your remote server. If you cannot do this - this guide tutorial will not work for you.
Procedure
Perform these steps on immich server:
redis
(ports: [6379:6379]
) anddatabase
(ports: [5432:5432]
) ports in yourdocker-compose.yml
, so these 2 are accessible from the outside (so your remote server can access it)..env
and add this variable:IMMICH_WORKERS_INCLUDE: 'api'
docker-compose.yml
stack:docker compose down
anddocker compose up -d
.Now perform these steps on remote server:
docker-compose.yml
,example.env
(rename to.env
) andhwaccel.transcoding.yml
files. From docker-compose remove everything butimmich-server
and update how you mount your${UPLOAD_LOCATION}
, so it points to the same physical location as your immich server..env
and update DB password and DB name to match what's on your immich server. Additionally, add these variables:DB_HOSTNAME=<ip_of_immich_server>
andREDIS_HOSTNAME=<ip_of_immich_server>
andIMMICH_WORKERS_INCLUDE: 'microservices'
.docker compose up -d
and see if no errors:docker logs -f immich_server
(all should be green).Now go back to Immich WebUI and configure hardware transcoding settings. My remote server has RX 7900 GRE, it supports AV1 encoding & decoding and hardware acceleration is powered by
vaapi
method, so I enabled it. Now go to jobs and press to transcode all your videos. Once it starts, rundocker logs -f immich_server
on your remote server to see if any errors (e.g. if your hardware acceleration is working). If no errors in red - congratulations, everything is working. :)Depending on your use-case, you might want to revert the changes. Security & firewall aspects are out of scope for this tutorial.
Beta Was this translation helpful? Give feedback.
All reactions