<SOLVED> Please help out a dummy
Hello everyone, new here. I'm also, unfortunately, extremely new to Linux in general...as in I installed it last night for the first time. I tried to originally get immich going on Windows 10 on my server, however the further I got into trying to get it set up, the more roadblocks I hit. I'm running reasonably old hardware (it's just an old office computer I got from my previous workplace, they were getting rid of them), and I kept hitting restrictions in windows that wouldn't allow me to use docker properly. So, I scrapped that, and figured I'd just use Ubuntu to get it up and running.
I thought I was competent enough to get by with a couple of guides. I was sorely mistaken. I try to follow guides, but I get stuck at parts where it's assumed I know what the hell I'm doing in Linux, which unfortunately I don't. Am I going to be able to get this going, or do I need a reasonable knowledge of working in the Linux environment to be able to set things up? I'm pretty sure I have everything I need in terms of the files required, but I have no idea how to configure them to my system. If anyone is up for a (hopefully not too great) challenge, I'd appreciate any help. I'd be willing to start over from scratch as I'm not too invested into the system yet, it's pretty fresh and I don't have any personal stuff on it yet. This will hopefully be set up solely as my storage server, but I'm just unfamiliar with the OS enough that I'm stuck.
Thanks for reading, and I'll accept any help!
117 Replies
You might be better off with a NAS OS such as Unraid
Still linux under the hood, but with some friendly UI on top
You'll be able to do it, but it will be a learning curve so if you don't plan on learning and using Linux it might be good to find an alternate solution. If you decide to try Linux, I would use a version that has a GUI. "Server" versions are command line only, and while light on resources, if you aren't familiar it can be a bit much to configure some things and verify they're doing what you think they are. What are you trying to install Linux on and what distro did you try?
I'm using Ubuntu 22.04.03 LTS (Jammy). This isn't the server version, so I do have a GUI, but I'm still having a rough go of getting things set up right. it's easy enough to figure out how to get and run the packages, but beyond that (for instance setting up the .env file), I'm getting lost. I set up my drives in a raid 1 setup for backup using mdadm, so I don't think I need help there.
Fwiw the sort of UI that things like Unraid give you are specifically tailored to managing storage/docker/etc, rather than being a general purpose desktop env, so there is some value there. Of course if you prefer to do it this way that's totally valid too
What's giving you trouble with the .env?
One of the things that keeps getting me too is dependencies of certain things. I keep getting tripped up by requiring an ADDITIONAL package of something
oops, wasn't meant to be a reply, that was unrelated
Dependencies of packages should get installed automatically 🤔
I don't know, maybe it's not dependencies, but other packages, this is where my inexperience is kicking my butt
I just found that as I tried to do a few things, I needed some new package of whatever type. Unfortunately I was trying to do this last night when I was getting kinda drowsy. Silly me thought this would be reasonably simple, but without prior knowledge in Linux systems, I had a tough time
I think the crowd who always espouses "Linux is super easy, bro!" is forgetting their first day with it, 🙂
I guess my first question would be, where should I be putting the files to start with? I have them in immich-app folder. I have the docker-compose.yml and example.env files there.
That seems correct. You just want the two files together in a folder with nothing else, stored in a place that makes sense to you
Make sure to rename example.env to just .env, so compose picks it up
when I open that folder, there is a sub folder immich-data that is empty, I didn't make that folder
It may have been automatically created by docker when you started up the containers, depending on what you configured as volume mounts.
I'll be honest, I'm not sure what I did with the container. I was trying to follow a guide but once I got to editing the files, I wasn't sure what information to change or what to edit it to
they assume some knowledge of Linux so they'd just be like "put in your username and change your password to a random string, enter the location where ..." that's where I wasn't sure what it was asking me to do as much
Which guide were you following?
and by the way, I appreciate the help with this.
We strongly recommend using the official docs, as things are changing pretty often so a random guide might be outdated
Docker Compose [Recommended] | Immich
Docker Compose is the recommended method to run Immich in production. Below are the steps to deploy Immich with Docker Compose.
one was this one... https://www.youtube.com/watch?v=URJiQb8PwWo
Jim's Garage
YouTube
Don't Let Apple & Google Harvest Your Photos, Use Immich to Self-Ho...
Your photos are precious and personal. Why not protect your privacy by safeguarding them with your own private cloud? Immich is the perfect replacement for iCloud and Google Photos. It has 'close' feature parity, is mobile native, and is really simple to configure.
Let me talk you through it's features and show you how to deploy it, including a...
Seems recent, so it could be not wrong 😛
Maybe cross-reference with the official docs for clarification?
And don't hesitate to ask stuff here ofc
so here's dummy question #1... "Populate UPLOAD_LOCATION with your preferred location for storing backup assets." What do I put for the location? How do I know what location I want?
This is what I meant by I wasn't sure what to edit in the files, because I don't quite know either what it's asking, or how to find that info. Is it just looking for a local file location?
Yeah, just a local folder path. Likely where your RAID-ed drives are mounted, or something like that
how do I convey that? ./dev/md0 ?
/dev
is just raw devices, you would mount one of those somewhere (using mount
manually, via settings in /etc/fstab
automatically, or via some other system automatically), commonly under /mnt
.
If you run mount
, it should show you a list of all mounted devices and their pathsokay...I typed that and it just gave me a huge string of (to me) random stuff. ie. "nsfs on /run/snapd/ns/snap-store.mnt type nsfs (rw)" and about 50 more lines
Ah,
snap
is a package manager that will pollute that a little bit yeah
Detouring into some linux tools here, but that's probably no problem: grep
can be used to filter stuff. Pipes |
can be used to take the output from one command and send it into another. So if you run
mount | grep -v snap
That will get all the output from mount, and then filter out every line with snap
. That should give a result with significantly less lines (and then I can explain the meaning of what's left 😛 )There were some packages that I got that may be unnecessary for me because I thought I needed some things to help resolve my issues, but they kinda got me nowhere.
Still have all this. From what I can tell it's only listing sda1 and sda2 which is my boot drive partitions, but in disks I see my 2 storage drives and the raid 1 array listed.

Yup, seems likely. So then your raid array is not mounted yet
Did you follow a guide for creating that? It should have instructions for setting up the mount as well
The easiest way to find your path and make sure things are working correctly is to use the file manager. It operates much like Windows explorer, but since there's many different files managers you'd have to find it on the menu first. I'm running a Flavor of Ubuntu called Mate that runs a different desktop, more similar to older windows. Definitely look into those if you stick with Ubuntu as your distro of choice for the time being.
Yeah, see, there's my inexperience, I didn't realize there was more to it and stopped at the step I stopped at, lol. I'm doing the mounting now (I think)
If you have the program "Disks" that will help you with the mounting process.
okie dokie, I got it mounted now
shows up in the mount list now, as well as gives me a mount location in disks
I second the opinion that UnRAID is an excellent way to get immich running, but it's a little pricey
It's basically a few clicks though, which is amazing
yeah, I'd like to at least give it a decent trial before spending cash on it. The reason I'm trying to get it up in the first place is so I can stop paying Google
Makes sense
If it's worth it, then I will be willing to pay for Unraid, but for now I'm broke
Unraid does have a trial version fwiw (and it's a one time payment). But knowing how all this stuff works 'from scratch' is absolutely worth it, if a bit more effort
Yeah, agreed. Linux is awesome, and very useful to be familiar with
I'll be honest, I'm not against starting over, lol. Maybe I should just set up the trial
but I do also agree that knowing linux isn't a bad thing
Sounds like you've got your storage drive mounted now, so that's a start! It's honestly not too complicated on Ubuntu
It's also not really something I see myself getting too into anyway, I'm getting old, I don't need to be re-inventing my computing experience
I didn't try it myself, but my friend said that UnRAID's trial works indefinitely if you don't restart haha
Of course, without a UPS, a power outage would put an end to that...
okay, so, I'm mounted, but I don't know how to interact with the raid array. it wouldn't let me make a folder for instance (I'm almost ashamed to admit, but it's also my first time setting up a raid array. Never needed one before)
This whole project trying to set this up is a series of firsts 🙂
Hmm, what directory are you in currently? (You can look at the beginning of the current line in your terminal window or type pwd)
(Print working directory)
okay, so, I restarted my server just to make sure everything was working right. My Raid array no longer shows up in "other locations" as it did before, but it still shows it's mounted in disks
however I just noticed that my two drives that make up the raid are not mounted individually, I'm assuming that's an issue?
Haha yeah, I was going to recommend rebooting as a next step to make sure the mount survived the reboot
I used the code that the guide gave me for recompiling on reboot, but guess it didn't work?
What type of RAID array is it? And no, it should appear to be a single disk
Wait, my disks are mounted, I was on the wrong partition highlighted, my bad
Hard to say. If you open the file manager, can you access it/write a new directory/file to it?
my RAID shows it's mounted /mnt/md0
Is it a raid 0 or 1?
no, that's where I'm having an issue, it's not showing in files anymore
raid 1
Perfect, raid 1 is a good way to go for simple redundancy
Can you open a terminal window and try running this?
cd /mnt/md0
k, I'm there now
try mkdir?
Yup!
I was going to say mkdir or touch
permission denied
Ah
It's probably owned by root rather than your user
What about sudo mkdir?
okay, with sudo it created newdir
(I'm literally having to go back and forth looking up how to do these things, lol)
For future reference:
sudo = super user do
su = switch user
The first letter meaning something different threw me off at first
okay, so it's all there and with sudo I can create the folder, but I still can't see anything in Files, but Disks it's there
@bo0tzz Should be owned by the non-privileged user, right?
@Laxbun Try running this:
sudo chown -R youruser /mnt/md0
(With youruser being replaced by your user name)
I don't know if it did anything, just gave me a new blank line in terminal
or maybe I did wrong user, hang on
Try a mkdir without sudo again
Or ls -la /mnt/md0
oh wait, yeah, it worked
sudo chown -R youruser:youruser /mnt/md0
That would change the group too, sorry I forgot that part
Sweet
I would try another reboot to make sure it stuck
should I run that line now?
Sure!
yeah, that changed it to my user
You can hit the up arrow as many times as necesarry to get to the first version
before two folders were root, now they're me
Perfect. I'm curious if it will show up in file explorer after a restart. I would be surprised
k, let me restart
I keep getting mixed up between keyboard/mouse when I'm switching back and forth, lol
Haha
Yeah, I do most stuff with the keyboard
oh I can't see the RAID in Disks anymore
No, sorry, I meant I'm switching between different keyboards/mice for the two computers I'm using. This one is my main machine, the other is the server I'm trying to set up
I can still access it in terminal, but it's not listed
Ah, yeah, I thought you might mean that. I recommend trying out ShareMouse
Can you mkdir without sudo?
nope, back to permission denied
it doesn't list any folder with ls now either
Are you still in /mnt/md0?
It sounds like it's no longer mounted
er, wait, it does with "ls -la /mnt/md0" but didn't with just "ls -l"
althought both are just root and neither belongs to me again
Ah, cool. You can cd /mnt/md0 to navigate there
Ah, I see
that's what I did, it shows me there in terminal
I think the
/mnt/md0
folder would change back to root on a reboot, but the contents shouldn't
(Could be wrong, I'm not that well versed in unix permissions)I believe the user that actually does the mounting on startup determines the root owner
Exactly
@Laxbun Are the two subfolders back to being owned by root, or just /mnt/md0/ itself?
it's not listing anything other than "." and ".." the subfolders aren't showing
Are you sure it's mounted then?
mount | grep -v snap
:Pno, I'm not sure of anything, lol
"er, wait, it does with "ls -la /mnt/md0" but didn't with just "ls -l"
With ls -la /mnt/md0??
Also, as far as the file manager, it looks like you have 2 options. 1 is to change your mounting location to a subdir of /media and 2 is to add a bookmark to the mount
Or alternatively
mount | grep md0
, which would output nothing if it's not mountedLol
nope, isn't showing properly
so I have to remount it?
How did you setup the mount in the first place? With /etc/fstab?
just to show you, this is what I did before that was part of the mounting guide:
Saving the Array Layout
To make sure that the array is reassembled automatically at boot, you have to adjust the /etc/mdadm/mdadm.conf file. You can automatically scan the active array and append the file with the following:
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
Afterward, you can update the initramfs, or initial RAM file system, so that the array will be available during the early boot process:
sudo update-initramfs -u
Add the new filesystem mount options to the /etc/fstab file for automatic mounting at boot:
echo '/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
Your RAID 1 array will now automatically assemble and mount each boot.
If you
cat /etc/fstab
, is the entry actually in there?shows: "/dev/md0 /mnt/md0 ext defaults,nofail,discart 0 0" twice at the bottom
sorry, ext4
oh, also "discard" not discart
Ah. Maybe you'd want to de-dupe that? I'm not actually sure if it matters.
But you can sudo nano /etc/fstab
I'm gonna have a fkin poptart, this is stressing me out, lol
whoah, okay, now what
just literally highlight it and delete it?
The last line, yeah
Then do ctrl+x
y to save
k
shows up only once in cat now
Perfect. You can try sudo mount -a
then what?
ls -l /mnt/md0
againtotal 0
@bo0tzz Any ideas?
starting to think it would have been quicker to just manually back stuff up, lol
Lol
I like immich for its ability to browse the library with a map, share links, face recognition, etc
If you just want a backup, I agree haha
I actually back up my immich files onto a different server
the fact it's "google photos" in open source was what attracted me
Indeed!
that's what I'm looking to replace
Makes sense
I'm replacing iCloud Photos
I'm actually looking to replace the whole Drive suite, but this is a strong start
it's the bulk of my storage on Drive
I have a ONE plan for my family, and my wife has like 35GB of photos just of clouds FFS
okay, if it's as easy as said to get set up on Unraid, then I honestly don't have a problem starting with the trial, and paying for it going forward
I'm happy to support systems that work
I just really wanted a "free" option for this. But I'm honestly losing hope on this setup
not through any fault of you guys though, you've both been super helpful, and I appreciate it greatly
Ah, yeah, I definitely recommend UnRAID if you want other cloud replacements as well. There are lots of great options for other types of files that you can easily configure in UnRAID alongside immich
And you can do vpn/reverse proxy in UnRAID too
I honestly might just do that, any tips before I do?
Hmm. Basically you'll need a physical USB stick dedicated to hosting UnRAID permanently. It's also a good idea to back that up.
One of the nice things about UnRAID is that if you move to different hardware, you don't have to reconfigure everything, just move the drives and the flash drive
Once installed, you can add your disks and start the array. Then add the community apps plugin, where you will find redis, postgresql 14, and immich
After you install those, they will be listed in the Docker tab
To access the actions for a docker container, you click on the icon for that container (this part threw me off for a couple days... I was expecting a button with three dots haha)
You'll probably want to find a guide or get help even with UnRAID, but I found it to be much easier than any other way
You can always DM me
hey man, thanks a ton, and you too @bo0tzz (even @Tony P for initially engaging as well). Going to try out UnRaid and if I can't do that, I'm going replicate the scene from Office Space...
Happy to help. If you decide to try out Linux again let me know. I'm not running RAID but have everything else running just fine.
Good luck, you got this!
Holy crap, I finally got it up and running (I'm pretty sure properly) in UnRaid! In all honesty, I'm not particularly sure how, as I had to fiddle with a number of things to get it right (mostly the variables in the .env and .yml files). But I can both see the stuff on my phone, it's backing up to my Array, and I can access it on another desktop that's not my server.
Hooray. Thank you guys for the help before! I also apparently hate coding in C, so there's that...although it's not like I code in any language.
If I have further issues (I'm thinking a reboot will blow shit up, but we'll get there sooner or later), I'll reach out, but I'm slowly getting it.
Ugh, now I just have to get all my stuff off Google Photos and onto here...