I am tring to find instructions to install Immich on my Ubuntu Server VM.
I am new to linux but I am learning. I did successfully get Piwigo running in linux server and really like that program.
I would like to install Immich on a linux VM and not with the use of docker.😍
I have attempted the WSL Docker ubuntu installation and though it work only if I connect with Localhost.
I am learning docker and will continue to experiment. but my prefered method is fat vm's as this makes it easy to backup the vm by backing up the vhdx file offline to tape. And easy recovery. I currently do not see an easy way to backup a docker environment and for now until I learn more I do not want to get side tracked here.
I would really like an instruction set to install on the ubuntu server VM directly without docker.
33 Replies
:wave: Hey @jollyman,
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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: 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.If you think full vms are easier to recover over containers and a bare install will be easier than docker then you're doing both wrong
And by that he also means there's no official instructions. Docker is the only official installation method.
may be. it is just what I understand. I am still learning docker but it is very complicated. I can not find the vm drive files. I can fnot figure out how to add external hdds to move storage and a load of other tihings.
That sounds more like general Linux/sysadmin knowledge, not docker specifically
To add, learning how to do the things you mentioned with docker will be leagues easier than learning how to run a docker app without docker
And you could still make a separate vm with docker only for a specific app
I prefer full os installs on an os without docker currently. Though I am experimenting with docker.
that said I do have a docker version running in a windows server 2022 with wsl enabled then a docker container.
The issue: 1) I can only way I can access the immich is to do localhost::2283/photos this is unacceptable as I need to give the machine an IP address so I can get to it. I can not ssh into the box as there is no interface for them. 2) I want to create an externals hard drive and attach the storage the docker container will use to that external storage so the images are not stored on the same drive the application is on. This is just for starters and things docker is not allowing me to do.
The issue: 1) I can only way I can access the immich is to do localhost::2283/photos this is unacceptable as I need to give the machine an IP address so I can get to it. I can not ssh into the box as there is no interface for them. 2) I want to create an externals hard drive and attach the storage the docker container will use to that external storage so the images are not stored on the same drive the application is on. This is just for starters and things docker is not allowing me to do.
Docker has no connection as to what IP your server is accessible on...
this is something you will setup in your DHCP server , with careful consideration of any VLANs, firewalls on host or guest VM, etc
as to 2), I have no idea why you would be using windows if you already are comfortable with linux VMs, a debian or ubuntu VM will be a much better experience
you just set the UPLOAD_LOCATION env var in immich to the path of where you want the files stored
again, if you have these external/network mounts already setup in a linux VM, docker adds no additional complexity to it. The questions you are asking would not be solved by not using docker
it is jsut a matter of buying more hardware to switch over to linux vm's. needing to finds some old scrap hardware.
ok but your initial question was "how to install immich on an ubuntu server VM"
if you already have a linux server right now you can just install immich on that
yes since that will allow me to bypass docker
no, it will not
and I can have access to the host vm and make the necessary changes
But in summary, there are no instructions for this. So you first need to understand what docker is before you can try running it in a bare vm
(not only are there no instructions but running without Docker is something that we provide no support for, so if you have issues we will not be able to help you here)
And it gives you a lot more headaches not using docker ;)
kinda sad... but does not matter.
going down the docker route then. How do I ssh to the Docker container created. At a bare minimum I need to assign an IP address to the docker container vm. So I can access it from other vm's in my network and not just the host machine's local host.
going down the docker route then. How do I ssh to the Docker container created. At a bare minimum I need to assign an IP address to the docker container vm. So I can access it from other vm's in my network and not just the host machine's local host.
The IP will be the IP of the VM:2283
If you want a different ip you can look into docker networking and ipvlan/macvlan
I doubt you need it though
To me this primarily sounds like trying to apply concepts you're used to that may not always make sense/apply to a container world
Docker != VM
A Docker container is a lightweight, portable unit used to run applications. It packages the application along with all the necessary dependencies (such as libraries, configuration files, and runtime environments) into a single, isolated environment. This allows the application to run consistently across different environments, whether it's on a developer's laptop, a testing server, or in production.
One of the main advantages of Docker containers is that they share the same underlying operating system (OS) kernel. This means they don’t need their own OS, which makes them significantly more efficient in terms of resource usage compared to virtual machines. Because containers only include the application and its dependencies, they are much smaller in size and start up in seconds. This makes containers very fast and easy to deploy.
Containers are also highly portable, as the same container image can be run on any system that supports Docker. Whether you're developing on a local machine, testing in a staging environment, or deploying to the cloud, the containerized application behaves the same way, ensuring consistency across environments. Docker ensures that the application inside the container works exactly as expected, regardless of the underlying infrastructure.
Another key feature of Docker is that containers are isolated from each other, meaning that each container can run a different application or version of an application without interfering with others. However, since containers share the host OS kernel, they are not as isolated as virtual machines (which run their own OS), but this trade-off results in lower overhead and faster performance.
Overall, Docker containers are an ideal solution for modern software deployment. They simplify the development, testing, and deployment process, making applications more portable, efficient, and scalable.
Docker Compose is a tool that simplifies the management of Docker applications, whether they involve a single container or multiple containers. By using a single configuration file (docker-compose.yml), you can define all the necessary services, networks, volumes, and other settings required for your application. While Docker Compose is especially useful for applications with multiple containers, it is equally effective for managing a single container, as it provides a clean, repeatable way to define and run your environment.
One of the key advantages of Docker Compose is its portability. The entire setup is contained in the YAML file, which makes it very easy to move your configuration to another machine. By transferring the docker-compose.yml file and any associated bind mounts (local directories or files shared between the host and containers), you can quickly recreate the exact same environment on a different system. Once you have moved the file and mounts, running the application on the new machine is as simple as executing docker compose up. Docker Compose handles pulling images, creating containers, and setting up the necessary networks automatically.
When it comes to networking, Docker Compose sets up a default network for containers to communicate with each other. You can also define custom networks to have more control over how containers interact. For example, if you're using multiple containers, you can choose to isolate certain services on their own networks or allow others to share a network.
Docker Compose also makes data management straightforward by supporting volumes and bind mounts. Volumes are used to persist data beyond the lifecycle of containers, while bind mounts allow you to map host directories directly to containers, making it easy to share files or manage persistent data. If you’re moving your setup to another machine, you just need to ensure these mounts are correctly set up on the new host.
In summary, Docker Compose is a versatile tool that is ideal for managing both single-container and multi-container applications. It makes managing configurations, networking, and data much simpler, and its portability allows you to easily move your application between machines by transferring the YAML file and necessary resources.
https://docs.docker.com/ if you want to dive deeper but the above gives a quick overview and the example yaml files in the immich installation instructions should be able to get you started quickly...
however, immich is not the easiest application to begin your self-hosting journey!
it is a rabbit hole because once you self-host something like immich with some of your most precious data/memories, you also need to start thinking about proper backups!
immich is not a backup solution, immich itself needs to be backed up to prevent data loss
Docker Documentation
Home
Docker Documentation is the official Docker library of resources, manuals, and guides to help you containerize applications.
@jollyman
thank you for your details.
I fully follow and understand what your saying. I am working down the self hosting route. However I am new to the linux platform and learning as I move forward. that said my current environment is a windows environment and my first experience with docker... is mixed docker in windows works as expected. However docker using linux utilizes WSL. in microsoft's wsl2 design using ubuntu unix, it nats the docker vm's to the windows host that said you have to do a port proxie to get the linux vm docker to work. and i say work limitely. I can only access the docker from the host machine only. other machines and router configs can not access the linux docker vm's since it is behind a 172 ip address that only the host system knows about. if I could get the docker vm's to receive an ip address from my network's vlan I would be fine. Currently only my windows dockers get my vlan's ip address. my linux vm's get a virtual 172 IP address the host nats with the virtual machine and currently only the host machine can access the dockers. I would probably do better if I could buy another piece of hardware and install ubuntu instead of windows but for now this is all i have. as for my hyper-v vm's I build each vm as a single purpose vm. and the vm's install from a core os for minimalist utilization of resources. As for backups I utilize my backup server in a offline vlan on it's own separate network to ensure good online and offline backups.
I fully follow and understand what your saying. I am working down the self hosting route. However I am new to the linux platform and learning as I move forward. that said my current environment is a windows environment and my first experience with docker... is mixed docker in windows works as expected. However docker using linux utilizes WSL. in microsoft's wsl2 design using ubuntu unix, it nats the docker vm's to the windows host that said you have to do a port proxie to get the linux vm docker to work. and i say work limitely. I can only access the docker from the host machine only. other machines and router configs can not access the linux docker vm's since it is behind a 172 ip address that only the host system knows about. if I could get the docker vm's to receive an ip address from my network's vlan I would be fine. Currently only my windows dockers get my vlan's ip address. my linux vm's get a virtual 172 IP address the host nats with the virtual machine and currently only the host machine can access the dockers. I would probably do better if I could buy another piece of hardware and install ubuntu instead of windows but for now this is all i have. as for my hyper-v vm's I build each vm as a single purpose vm. and the vm's install from a core os for minimalist utilization of resources. As for backups I utilize my backup server in a offline vlan on it's own separate network to ensure good online and offline backups.
Docker on Windows is not recommended for production in general.
My take is: Usually it's a carryover to get you through before switching to Linux or for trying something on a Gaming PC running Windows.
it would be nice to have the option to install on the vms directly to bypass docker. At least then I can assign a valid IP address to the vm's to make things work. Until I get the hardware for a ubuntu unix server
I think I have just found something that might work:
https://github.com/arter97/immich-native
That's probably more complicated than just learning how Docker works
And to be clear, if you use an install method like that we can't give support for it
And you can also assign an ip address in your network to a container if you have to
In most cases you don't actually need that (Immich for instance doesn't and if you happen to need it you're using it wrong most likely) but it is an option
(for instance you may want that for stuff like service discovery)
You know, just because you have a hammer doesn't mean it's a nail ;)
In Docker, containers are typically connected to the default bridge network, which uses Network Address Translation (NAT) to share the host machine's IP address. However, containers can also be configured to receive their own IP address outside of the default setup, which is useful for network isolation or when containers need to be directly accessible from outside the host machine. There are several methods to achieve this.
One option is a custom bridge network, which allows you to configure custom settings, such as IP address ranges for containers. While still a form of bridge network, it gives you more control over IP allocation. Containers on a custom bridge network still share the host's IP via NAT, but with more flexibility in managing their network setup.
There are other options but they are out of scope here and you would need to dive deeper into reading documentation as none of us would sanely be able to provide you support for these options.
Quintessance is that you should stay away from Docker on Windows and get any system that runs linux to use Docker Engine.
It’s also important to note that Docker Desktop on Windows has compatibility limitations compared to running Docker on Linux. Docker Desktop relies on a virtual machine to run Linux containers on Windows, and this can create issues, especially with file systems. For instance, if you mount a PostgreSQL database inside a container and store it on an NTFS file system (common on Windows), the performance may suffer, or the database may not function correctly. This is because NTFS handles file operations differently than Linux file systems like ext4. As such, it’s important to be aware of these limitations when using Docker on Windows, particularly when dealing with file system-intensive applications like databases.
@jollyman
All really good info. Looks like my docker endevors will have to be a few years away from trying. As i need to get some hardware to run linux ubuntu.
What hypervisor does ubuntu or other linux platforms use. that are full blown hypervisors? Docker i assume will work on any of them but just want to make sure when I do get a linux hardware system I get one that can do both a hypervisor and docker. To learn and work with both properly. I really wish there was a non docker approved installation of your product. The little I have seen of it... I really like.
No sorry cloud options is not valid for me as I will not pay a monthly fee for a product. However I will pay a one time fee and perhaps a upgrade fee if I choose to upgrade to a specific version.
What hypervisor does ubuntu or other linux platforms use. that are full blown hypervisors? Docker i assume will work on any of them but just want to make sure when I do get a linux hardware system I get one that can do both a hypervisor and docker. To learn and work with both properly. I really wish there was a non docker approved installation of your product. The little I have seen of it... I really like.
No sorry cloud options is not valid for me as I will not pay a monthly fee for a product. However I will pay a one time fee and perhaps a upgrade fee if I choose to upgrade to a specific version.
just so you know, docker is not really a hypervisor as containerization is not considered virtualization
you could even run linux in a VM and the run docker engine there
if you want a "full blown hypervisor", linux runs kvm/qemu if the packages are installed but there are different hypervisors available, need to google
as a last word, if you do this to save money... self-hosting rarely saves money, definitely not if you consider you own time but even without your time it is difficult to save money with self hosting while still doing it properly,secure and safe. it is a fun journey though
agreed anything worth doing invests time and it is the journey that counts to do it right. in the long run it saves money as I am not reliant on 3rd party vendors and keeps me knowledgeable on the underlining technologies.
it most likely will not save money in the long run either but yes, the advantage is not to be reliant on 3rd party vendors and their price strategies that lure you in and then make you dependent to take your money, you keep the data with yourself and gain knowledge....
in my case, I spent more time and money on this than I would spend for my entire family for everyones individual lives for all of these external offers combined 😄
but I dont regret it still
still though looking out for family first but I like learning an so sometime next year I will get me a server . Hoping soon to have one in the first quarter.