this post was submitted on 30 Apr 2024
32 points (94.4% liked)

Selfhosted

40246 readers
533 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I would like new images to be uploaded to Immich from my phone and deleted after 30 days automatically, so I was thinking about this flow:

  1. I will Sync files to the server using Syncthing

  2. I will Copy files from the Synced folder to an Immich Consume folder, (not sure how to copy only new files (maybe use created date)). Then delete images that are older than 30 days which will remove them from my phone.

  3. I will upload to Immich using Immich CLI (?) which will use the delete after upload flag.

Basically:  

(1)

Camera, Screenshots, etc =Syncthing=> SyncthingImageConsume/{Folder}

(2)

{Script on SyncthingImageConsume}

SyncthingImageConsume/{Folder} =CopyNewFiles=> ImmichConsume/{Folder}

Then delete older than 30 days.

(3)

{Script on ImmichConsume}

Upload to immich and then delete

 

would this work? and is there a better way to do it? any tips?

you are viewing a single comment's thread
view the rest of the comments
[–] couch1potato@lemmy.dbzer0.com 2 points 6 months ago* (last edited 6 months ago) (8 children)

I just set up something similar a couple weeks ago because I wanted to upload named album folders as albums into immich.

Workflow is:

Syncthing to sync phone folder to folder on unraid server.

2nd syncthing instance to sync above folder to "photo albums" folder.

Immich-go cron job runs hourly to upload photo albums folder to immich

I used immich-go because the CLI upload with album tag kept failing and apparently it's a common issue so.. ¯\_(ツ)_/¯ immich-go worked first try.

Now all my photos are uploaded as albums with no manual input:

[–] Mir@programming.dev 2 points 6 months ago (1 children)

Thank you. First person to not advise me to use something other than immich for this. And thanks for the heads up about the CLI, can you share the upload script?

[–] couch1potato@lemmy.dbzer0.com 1 points 6 months ago* (last edited 6 months ago)

Sure... I'm on unraid...

cd /mnt/user/appdata_docker/immich/immich-go
./immich-go -server=http://192.168.20.1:8080 -key=IMMICH_API_KEY upload -create-album-folder -when-no-date=FILE /mnt/user/photo_libraries```


![](https://lemmy.dbzer0.com/pictrs/image/5155dc7f-1545-4e07-b7ec-4721e5fec43a.jpeg)


There are other flag arguments that may be applicable to your use case... I'd suggest finding immich-go documentation on github and reading. It's not that intense of a read.
load more comments (6 replies)