Skip to content

Immich updates but does not startΒ #13417

@RiX012

Description

@RiX012

βœ… Have you read and understood the above guidelines?

yes

πŸ”Ž Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

πŸ“œ What is the name of the script you are using?

immich.sh

πŸ“‚ What was the exact command used to execute the script?

update

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 13

πŸ“ˆ Which Proxmox version are you on?

pve-manager/9.1.6/71482d1833ded40a (running kernel: 6.17.4-1-pve)

πŸ“ Provide a clear and concise description of the issue.

I am not an expert on this. I tried to some things with the help of Claude. I also do not know if it is for my installation only, but i thought I report it anyway. Please dismiss the issues if applicable. Thank you.

Issue:
After running update in the Immich LXC console, both immich-web and immich-ml services fail to start. The root cause seems to be that the ml-venv Python virtual environment is not created during the update because the sudo --preserve-env invocation in update_script() fails silently with Invalid argument on this LXC setup.

πŸ”„ Steps to reproduce the issue.

  1. Install Immich using the community-scripts helper
  2. Run update in the LXC console
  3. Update reports success
  4. Immich is unreachable β€” 502 Bad Gateway
  5. systemctl status immich-ml shows exit-code failure
  6. Running bash /opt/immich/app/machine-learning/ml_start.sh reveals: /opt/immich/app/machine-learning/ml-venv/bin/activate: No such file or directory

❌ Paste the full error output (if available).

sudo: unable to set runas group vector: Invalid argument
sudo: uv: Invalid argument

/opt/immich/app/machine-learning/ml_start.sh: line 4:
/opt/immich/app/machine-learning/ml-venv/bin/activate: No such file or directory

ModuleNotFoundError: No module named 'gunicorn'

πŸ–ΌοΈ Additional context (optional).

Manually recreate the venv after a failed update:

bashcd /opt/immich/source/machine-learning
su -s /bin/bash immich -c "VIRTUAL_ENV=/opt/immich/app/machine-learning/ml-venv uv sync --extra cpu --active -n -p python3.11 --managed-python"
systemctl reset-failed immich-ml && systemctl start immich-ml

Possible fix:
Fall back to su -s /bin/bash immich -c "..." if the sudo --preserve-env invocation fails, or add error checking so the update does not report success when the venv creation step fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions