immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
45.08k stars 2.18k forks source link

[BUG] Usage of reset-password-admin #1072

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug I'm trying to find a way to reset the admin password without nuking the docker volume. I found this #928 commit that was merged and can find the .js file under /usr/src/app/dist/apps/cli/src/commands called reset-admin-password.command.js. However, I don't know how to call it. It's probably simple to do but I have no idea how.

For info, I used the following command to enter the immich-server:release image: docker exec -it 0ac7cd4011fd sh

jrasm91 commented 1 year ago

I believe it's just "immich reset-admin-password"

ghost commented 1 year ago

There's no executable called immich in any of the docker images:

/usr/src/app # which immich
/usr/src/app # immich
sh: immich: not found
/usr/src/app # 

Here are the images running:

CONTAINER ID   IMAGE                                        COMMAND                  CREATED       STATUS       PORTS                                       NAMES
f95d1097e34e   altran1502/immich-proxy:release              "/docker-entrypoint.…"   3 hours ago   Up 3 hours   0.0.0.0:2283->8080/tcp, :::2283->8080/tcp   immich_proxy
0ac7cd4011fd   altran1502/immich-server:release             "/bin/sh ./start-ser…"   3 hours ago   Up 3 hours   3001/tcp                                    immich-immich-server-1
548a8fd57f85   altran1502/immich-server:release             "/bin/sh ./start-mic…"   3 hours ago   Up 3 hours   3001/tcp                                    immich-immich-microservices-1
17a3b11f0198   altran1502/immich-machine-learning:release   "/bin/sh ./entrypoin…"   3 hours ago   Up 3 hours                                               immich-immich-machine-learning-1
a538d7a16830   postgres:14                                  "docker-entrypoint.s…"   3 hours ago   Up 3 hours   5432/tcp                                    immich_postgres
13cd2c2c21ab   altran1502/immich-web:release                "/bin/sh ./entrypoin…"   3 hours ago   Up 3 hours   3000/tcp                                    immich-immich-web-1
c460671955ec   redis:6.2                                    "docker-entrypoint.s…"   3 hours ago   Up 3 hours   6379/tcp                                    immich_redis
jrasm91 commented 1 year ago

It should work on the immich-server, but you might have to run "npm link" first.

jrasm91 commented 1 year ago

Basically, there should be a bin folder with a script that launches the file you mentioned in the OP using node. It's supposed to be accessible via "immich" though.

ghost commented 1 year ago

Yup, the npm link then immich reset-admin-password worked! Thanks for your help.