Leena Lee

If you don't want big tech to have all of your data, read this

November 30, 2026

If you are worried that Big Tech like Google, Apple or Facebook has access to too much of your information, you're right to be concerned.

If you use Google Photos, iCloud or other cloud storage options, they have access to all of that.

They might not be scanning through it now but they could certainly do it easily, especially with the advancements in AI.

I was looking into repurpose a PC computer I have and came across a self-hosted alternatives like Immich and decided to give it a shot.

It turned out to be the best decision because my photos and videos were all over the place and finding anything took forever.

After I got immich up and running I'm easily able to find and use all of the 30,000 photos and videos I've taken over the years.

Setting up the old PC with Linux

The old PC I repurposed has the following specs:

- Storage: 1TB SSD
- Memory: 32GB
- Processor: AMD Ryzen 7 2700X Eight-Core
- GPU: NVIDIA GeForce GTX 1660 Ti

I have a short article on how to set up a linux server (a setup guide is coming soon).

Attaching and encrypting the external drive

Since my PC "only" had 1TB of storage I knew I had to attach external drive because I had a lot of photos and videos.

I had a lot of external drives laying around so I plugged them in.

Since it was going to stay permanently plugged into the Linux server and hold actual personal files, I wanted it both in a Linux-native format.

There wasn't a concern of someone breaking into the house and stealing the drives but it is a possibility so I choose to encrypt everything.

Here's the full process:

1. Find the drive after plugging it in

lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT

Double, triple check the size matches the drive you think it is. Don't accidentally wipe something you weren't intending to.

2. Wipe the existing partition table and create a new one

sudo wipefs -a /dev/sdX
sudo parted /dev/sdX --script mklabel gpt
sudo parted /dev/sdX --script mkpart primary 0% 100%

3. Encrypt the partition with LUKS

sudo cryptsetup luksFormat /dev/sdX1
sudo cryptsetup open /dev/sdX1 mydrive

4. Format the now-unlocked drive as ext4

sudo mkfs.ext4 /dev/mapper/mydrive

5. Mount it

sudo mkdir -p /mnt/mydrive
sudo mount /dev/mapper/mydrive /mnt/mydrive

6. Make it survive a reboot

This needs two files. First, /etc/crypttab, so the system knows to unlock it:

mydrive UUID=your-luks-uuid-here none luks

Then /etc/fstab, so it knows where to mount it once unlocked:

UUID=your-ext4-uuid-here  /mnt/mydrive  ext4  defaults,nofail  0  2

The nofail part matters it means the server still boots fine even if the drive isn't plugged in that day.

Moving everything over with rsync

Once the drive was actually staying encrypted, it was time to move my files over. The easiest way is rsync.

Dry run first, every single time just to make sure. the -n flag does this.

rsync -avhP --delete -n /source/path/ /mnt/mydrive/destination/

Then run the real thing:

rsync -avhP --delete /source/path/ /mnt/mydrive/destination/

A couple of things I to be aware of: there is a trailing slash that is needed on the source path.

With the trailing slash you are copying contents of the folder

But without it you copy the folder itself

And -a is a flag that preserves permissions and timestamps which might be needed if you have Docker containers that expect files to be owned by specific users.

Deduping files, there's a lot of duplicates

It turns out I'm a digital hoarder.

I have so many copies of files. Sometimes there were 10 copies of the same file, image, or video across different computers and hard drives.

There were hundreds of gigabytes of duplicate files.

I had photos saved three different times because I exported them from my phone, then backed it up, then saved it again to another drive just in case.

To deduplicate, I used a tool called czkawka, which does both exact duplicate matching and perceptual matching for photos that are visually identical but technically different files

czkawka_cli image --directories /data/staging --file-to-save results.txt

I always saved to a results file first and actually read it before deleting anything there's no undo button here. Once I trusted the results:

czkawka_cli image --directories /data/staging --delete-method AllExceptNewest

This cleared up so much space.

For a more simpler and common tool you could also use dupeguru.

Script to rename all my files

Another thing I had to handle as consolidated was naming conflicts.

I had files from different devices that were named the same thing even though they were different images or videos.

I wrote a small Python script that reads the EXIF data off photos (and falls back to the file's modified date for things without EXIF) and renames everything to a consistent YYYY-MM-filename pattern:

from PIL import Image
from PIL.ExifTags import TAGS
from datetime import datetime
import os

def get_exif_date(filepath):
    try:
        img = Image.open(filepath)
        exif = img._getexif()
        if exif:
            for tag, val in exif.items():
                if TAGS.get(tag) == "DateTimeOriginal":
                    return datetime.strptime(val, "%Y:%m:%d %H:%M:%S")
    except Exception:
        pass
    return None

def get_default_date(filepath):
    return get_exif_date(filepath) or datetime.fromtimestamp(os.path.getmtime(filepath))

The script asks for confirmation before renaming anything.

It's not super fancy but it did help me organize and label all my photos and videos so that i can group them by a specific vacation or trip.

It made it so that I could scan the files by name and be able to tell when and where the photos or video was taken without having to open it

Piecing everything together with Immich on Docker

The ultimate goal was to have a Docker container that runs Immich and give it access to photos and videos that I have on an external mounted drive.

The storage is on the disk the but the browsing interface that lets me easily find my media files is the UI that Immich provides.

This provided me with the same experience as taking photos on my phone and seeing them backed up to Google Photos. Immich has a mobile app that works exactly the same, if not better, than the Google Photos mobile app.

With this setup, I get all the same features but I now own and store all my data locally. No one else has access.

With my Linux Server set up, I'm also able to add more self-hosted apps that replace things like Spotify, Audible and more. Any open-source alternative is fair game. You can browse the options on https://selfh.st/apps/

I can honestly say that it's worth the effort and it's easier than you might think.

Want the next build?

New videos go up on YouTube first.

Keep reading

More posts