Immich: Deleted User Still Showing? Here’s How To Fix It

by Viktoria Ivanova 57 views

Hey guys! 👋 Ever faced the frustrating issue where a deleted user just won't disappear from your Immich server? You're not alone! This article dives deep into a peculiar bug reported by an Immich user, where a deleted user stubbornly remains in the admin UI, highlighted in red, even after the specified removal delay. Let's explore the issue, analyze the steps to reproduce it, and discuss potential solutions. If you're struggling with a similar problem, you've come to the right place! We'll break down the technical details, examine the logs, and provide a comprehensive guide to help you troubleshoot and resolve this annoying glitch. So, buckle up and let's get started!

Understanding the Issue

The core problem revolves around user deletion within the Immich ecosystem. When a user is deleted via the web UI, there's an option to schedule them for immediate removal. However, in some cases, this immediate removal doesn't seem to work as expected. The user remains visible in the admin UI, often highlighted in red to indicate an issue. This can be confusing and potentially problematic, especially in environments where user management is critical.

Keywords: User deletion, Immich server, admin UI, bug, troubleshooting

The Initial Report

Our journey begins with a user who encountered this exact scenario. After deleting a user and selecting immediate removal, they noticed the user persisted in the admin UI. Their server was configured with a one-day delay for user removal, but even after three days, the user remained. What's even more perplexing is the absence of relevant logs, making it difficult to pinpoint the cause of the issue.

This situation highlights the importance of robust logging and reliable user management processes. When things go wrong, logs are our best friends, providing clues and insights into the inner workings of the system. Without them, we're essentially flying blind.

Replicating the Problem: Steps to Reproduce

To effectively troubleshoot any issue, it's crucial to be able to reproduce it consistently. Here are the steps the user outlined, which we can use as a starting point for our investigation:

  1. Delete a user from the web UI: This is the first trigger. Navigate to the admin panel and initiate the user deletion process.
  2. Select the checkbox for immediate removal: This is the critical step where the user requests the system to bypass the delayed removal and delete the user right away.
  3. Observe the admin UI: After the deletion process, check the admin UI to see if the user has been removed.

If the bug is present, the user will still appear in the list, likely highlighted in red. This simple set of steps allows us to consistently recreate the issue and test potential solutions.

Keywords: Reproducing bugs, Immich web UI, user removal, admin panel, troubleshooting steps

Diving into the Technical Details

To understand the root cause, let's dissect the technical environment where this issue occurred. The user provided valuable information about their setup, which is crucial for our analysis.

Operating System and Immich Version

The Immich server is running on NixOS, a powerful and unique Linux distribution known for its declarative configuration management. This means the entire system's configuration is defined in code, making it highly reproducible and consistent. The specific version of Immich Server is v1.136.0, and the Immich Mobile App is also at v1.136.0. Knowing the versions helps us narrow down the potential causes, as specific bugs might be present in certain releases.

Docker Configuration

Immich is running within Docker containers, which is a common deployment strategy. The user shared their docker-compose.yml content, providing insights into the container configuration. Let's break down some key aspects:

  • Immich Service: This section defines the core Immich service, enabling it and specifying the location for media files (/srv/immich).
  • Environment Variables: The IMMICH_CONFIG_FILE environment variable points to a JSON configuration file managed by NixOS's sops (Secrets Operations) system. This likely contains sensitive information like database credentials and API keys.
  • User and Group Permissions: The users.users.immich.extraGroups setting grants the Immich user membership in the video and render groups, likely for accessing hardware acceleration resources.
  • Systemd Services: The configuration includes systemd service definitions for immich-server and a related service tsnsrv-imm. These services manage the lifecycle of the Immich containers, ensuring they start on boot and are restarted if they crash.

This detailed configuration gives us a good understanding of the environment where the bug is occurring. It highlights the use of NixOS, Docker, and systemd, which are all potential areas to investigate.

Keywords: NixOS, Docker, docker-compose.yml, Immich configuration, systemd services

Absence of Relevant Logs

One of the most significant clues is the lack of relevant log entries. The user diligently searched the logs using journalctl, a powerful tool for querying systemd logs. They specifically looked for entries containing