2022-12-09 15:54:19 -05:00
# Server Commands
2023-06-29 15:48:16 -04:00
The `immich-server` docker image comes preinstalled with an administrative CLI (`immich-admin` ) that supports the following commands:
2022-12-09 15:54:19 -05:00
2025-11-17 17:15:44 +00:00
| Command | Description |
| -------------------------- | ------------------------------------------------------------- |
| `help` | Display help |
| `reset-admin-password` | Reset the password for the admin user |
| `disable-password-login` | Disable password login |
| `enable-password-login` | Enable password login |
| `disable-maintenance-mode` | Disable maintenance mode |
| `enable-maintenance-mode` | Enable maintenance mode |
| `enable-oauth-login` | Enable OAuth login |
| `disable-oauth-login` | Disable OAuth login |
| `list-users` | List Immich users |
| `version` | Print Immich version |
| `change-media-location` | Change database file paths to align with a new media location |
2022-12-09 15:54:19 -05:00
## How to run a command
2025-09-25 15:54:34 +01:00
To run a command, [connect ](/guides/docker-help.md#attach-to-a-container ) to the `immich_server` container and then execute the command via `immich-admin <command>` .
2022-12-09 15:54:19 -05:00
2023-01-09 16:32:58 -05:00
## Examples
2023-01-16 13:09:04 -05:00
Reset Admin Password
2022-12-09 15:54:19 -05:00
2023-09-23 21:06:59 -05:00
```
immich-admin reset-admin-password
Found Admin:
- ID=e65e6f88-2a30-4dbe-8dd9-1885f4889b53
- OAuth ID=
- Email=admin@example .com
- Name=Immich Admin
? Please choose a new password (optional) immich-is-cool
The admin password has been updated.
```
2023-01-09 16:32:58 -05:00
2023-01-16 13:09:04 -05:00
Disable Password Login
2023-01-09 16:32:58 -05:00
2023-09-23 21:06:59 -05:00
```
immich-admin disable-password-login
Password login has been disabled.
```
2023-01-09 16:32:58 -05:00
2024-03-11 23:32:00 -04:00
Enable Password Login
2023-01-09 16:32:58 -05:00
2023-09-23 21:06:59 -05:00
```
immich-admin enable-password-login
Password login has been enabled.
```
2023-01-16 19:31:46 -05:00
2025-11-17 17:15:44 +00:00
Disable Maintenance Mode
```
2025-12-11 16:19:33 +01:00
immich-admin disable-maintenance-mode
2025-11-17 17:15:44 +00:00
Maintenance mode has been disabled.
```
Enable Maintenance Mode
```
immich-admin enable-maintenance-mode
Maintenance mode has been enabled.
Log in using the following URL:
https://my.immich.app/maintenance?token=<token>
```
2024-03-11 23:32:00 -04:00
Enable OAuth login
```
immich-admin enable-oauth-login
OAuth login has been enabled.
```
Disable OAuth login
```
immich-admin disable-oauth-login
OAuth login has been disabled.
```
2023-01-16 19:31:46 -05:00
List Users
2023-09-23 21:06:59 -05:00
```
immich-admin list-users
[
{
id: 'e65e6f88-2a30-4dbe-8dd9-1885f4889b53',
email: 'immich@example .com.com',
2023-11-11 20:03:32 -05:00
name: 'Immich Admin',
2023-09-23 21:06:59 -05:00
storageLabel: 'admin',
externalPath: null,
profileImagePath: 'upload/profile/e65e6f88-2a30-4dbe-8dd9-1885f4889b53/e65e6f88-2a30-4dbe-8dd9-1885f4889b53.jpg',
shouldChangePassword: true,
isAdmin: true,
createdAt: 2023-07-11T20:12:20.602Z,
deletedAt: null,
updatedAt: 2023-09-21T15:42:28.129Z,
oauthId: '',
}
]
```
2025-03-17 23:27:59 +05:30
Print Immich Version
```
immich-admin version
v1.129.0
```
2025-07-18 10:57:29 -04:00
Change media location
```
immich-admin change-media-location
2025-07-29 16:58:50 -04:00
? Enter the previous value of IMMICH_MEDIA_LOCATION: /data
? Enter the new value of IMMICH_MEDIA_LOCATION: /my-data
...
Previous value: /data
Current value: /my-data
2025-07-18 10:57:29 -04:00
2025-07-29 16:58:50 -04:00
Changing database paths from "/data/*" to "/my-data/*"
2025-07-18 10:57:29 -04:00
? Do you want to proceed? [Y/n] y
Database file paths updated successfully! 🎉
2025-07-29 16:58:50 -04:00
...
2025-07-18 10:57:29 -04:00
```