[Feature]: Support native deployments (without docker, includes example) #1657
Replies: 21 comments 27 replies
-
Thank you for this. Really appreciate the work you put into sorting this out. For anyone wanting to deploy on OpenSUSE Tumbleweed/MicroOS here are some pointers. DependenciesFor building
For hosting
SELinuxAllow local nginx proxy to connect to local services via port
NginxGrab the config from this repository and modify to your needs. |
Beta Was this translation helpful? Give feedback.
-
Nice work. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot. |
Beta Was this translation helpful? Give feedback.
-
@jumbi77 I think @oddlama did a good job at pointing that out in his post.
|
Beta Was this translation helpful? Give feedback.
-
(off topic)
https://github.com/hydazz/docker-immich edit: all seems to be working in latest commit... |
Beta Was this translation helpful? Give feedback.
-
Thank you for the contribution. I have a thought about your hashtag #appsshouldbeasignecontainerwhereapplicable Let's say you want to limit the CPU of |
Beta Was this translation helpful? Give feedback.
-
Yes, that's not really possible on a single container - there are indeed use cases for having the containers separated on lower-powered hardware. Most self-hosted image services have single containers which makes deployment much easier on specific OSes (ie Unraid), where most users won't even think about limiting the CPU of a container. |
Beta Was this translation helpful? Give feedback.
-
You could try to start the container with the https://docs.docker.com/config/containers/resource_constraints/#configure-individual-containers Pair that with e.g dumb-init: https://github.com/Yelp/dumb-init#session-behavior |
Beta Was this translation helpful? Give feedback.
-
there should be a way to achieve this with s6 and s6-overlay Why does the machine-learning module spawn 40+ processes that use up over 1GB of ram at idle? is this necessary? is it possible to have the machine-learning run on-demand rather than all the time? |
Beta Was this translation helpful? Give feedback.
-
Any chance on updating this to v1.50.x? Seems since 1.48 some changes were introduced, like the machine learning module in python, which no longer makes the script that much valid. |
Beta Was this translation helpful? Give feedback.
-
awesome. thanks for this. Im trying to put together immich in a freebsd jail on truenas so this will be helpful |
Beta Was this translation helpful? Give feedback.
-
This is going to be a lengthy discussion, I think...
My redis appears to be running:
I have added the following entry to my /etc/hosts file: What am I missing? |
Beta Was this translation helpful? Give feedback.
-
Please add native (bare metal) install support. :/ |
Beta Was this translation helpful? Give feedback.
-
Slightly off-topic:
|
Beta Was this translation helpful? Give feedback.
-
Not having native deployments is incredibly unfortunate, I wish I could just install this inside an LXC container without docker |
Beta Was this translation helpful? Give feedback.
-
Seems like Immich changed a quite since the last time OP was updated. I took the liberty of creating some scripts to natively install Immich v1.97.0. https://github.com/arter97/immich-native Leaving it here so that other people can find it useful. |
Beta Was this translation helpful? Give feedback.
-
I'm adding a vote to the "Please provide native deployment support". From my perspective it can be leveraged into a docker container build workflow and allow LXC container support (or other bare-metal installs) without increasing support/deployment load meaningfully. |
Beta Was this translation helpful? Give feedback.
-
I've heard so many good things about immich and have finally decided to try it out. Then come and find a discussion like this and see that docker is still the only official install method and people are still faffing about to get it to work on bare metal. That's just so disappointing. 😞 |
Beta Was this translation helpful? Give feedback.
-
I'd like to give a huge shout of thanks to arter97 for his install script, for I'm a "macOS can be a server" user (I've an old mac mini as a server) and with his script (and a few changes) I was able to get immich installed and running on macOS monterey and Sonoma. I've also updated my script (located here) to do full end to end installation. It can now:
So, we just need a "Windows can be a server" user to create a Windows install script and we'll have unofficial bare metal installers on all systems. |
Beta Was this translation helpful? Give feedback.
-
Based on Arter's scripts, I made a script that does the same thing but also supports CUDA, or hardware-accelerated video transcoding and machine-learning. Leaving it here so that other people can find it useful. |
Beta Was this translation helpful? Give feedback.
-
Hi all, for those interested in the macOS release I forked 4v3ngR's scripts and adapted them to generate a precompiled pkg file for Apple Silicon that can be installed directly. The new repository is https://github.com/zebrapurring/immich-native-macos, and you can find there the release for Immich v1.121.0. |
Beta Was this translation helpful? Give feedback.
-
Feature detail
Thanks for the great app! One thing that I'm dearly missing is the ability to deploy this on bare-metal, without relying on docker. The problem is that in certain situations, docker might not be a viable option to deploy a project. I for example am using an extremely strict nftables firewall, for which docker simply has no compatibility (and docker will likely still take some years to catch up). Furthermore, I deploy each application in its own KVM virtual machine with libvirt, so docker would just be an unnecessary overhead for me.
I have already managed to get immich running without docker just fine, it would just be missing a tiny bit of packaging to make the process more accessible and repeatable. I've attached my scripts to build and deploy immich below in case you (or any other people stumbling over this) are interested.
Installing on bare-metal
/var/lib/immich
)/var/lib/immich/env
(adapt from upstream provided.env.example
)runuser -u immich -- ./build.sh
127.0.0.1 localhost immich-server immich-microservices immich-machine-learning immich-web
/the/backup/folder/you/want
to/var/lib/immich/upload
The need to map the upload folder in several app directories is a little clunky right now, just like having to use /etc/hosts because hostnames are hardcoded. But the rest is working like a charm without docker.
You might need to change the systemd services a little to fit your system if e.g. your postgresql service is not called
postgresql-14.service
, or when it is running on another system. I've also used systemd to do sandboxing for the services, so they will not be able to access other directories if you need that for some reason.Buildscript
build.sh
This script is adapted from the Dockerfiles I found in this repo.
Systemd service
immich-server.service
Systemd service
immich-microservices.service
Systemd service
immich-machine-learning.service
Systemd service
immich-web.service
P.S.: Is it intended that compiling the most recent release with npm reports 10+ high and 3 critical security issues? Not sure what to do about that as a user.
Platform
Server
Beta Was this translation helpful? Give feedback.
All reactions