romain Posted October 17, 2023 Share Posted October 17, 2023 (edited) I've been able to bulk upload photos to Immich manually through the command line by going to my Docker tab, finding the Immich container, clicking ">_ Console" and running the command: immich upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api --recursive directory/ This works fine, but I'd like to automate this using userscripts so that it runs automatically from time to time. I don't know much about writing scripts though - I've tried a few things but haven't gotten it to work. If I click the ">_" button at the top of my GUI for the UNRAID terminal, and run: docker exec -it immich bash I can get into the docker container, so my userscript looks like this: #!/bin/bash docker exec -it immich bash immich upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api --recursive directory/ When I run that though I get the error: Quote the input device is not a TTY /tmp/user.scripts/tmpScripts/immich test/script: line 3: immich: command not found I've also tried running: docker exec -it immich upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api --recursive directory/ but get an error message telling me that the upload command is not found. I'm pasting in the generic 'immich upload' command from the Immich website, the command that I'm running has my correct API key, IP address & upload source directory. Can anyone suggest a way to set up my user script so that I can run it on a schedule to grab any photos that I put into the upload source directory? Another item that I'm concerned about once I get the first part running - when I run the immich upload command through the docker console, there is a message that says something like 'you're about to upload ### photos, are you sure?' and then I have to enter y/n. Is there a way to make sure that the user script can confirm 'y' for me? Edited October 17, 2023 by romain added more details. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.