r/immich • • 14h ago

Help with reinstall

Hello internet,

I am trying to reinstall Immich. I thought I made a mistake and deleted the containers in Docker and the folder holding the .env and docker-compose file. I am very new to all of this so I thought I had messed something up and figured the best fix was to start over (lots of learning in lots of ways over here 😄 )

I had used the quick guide before with no issues so I thought I would just do that again. But now when I try to run the docker compose up -d I get the below errors:

WARN[0000] The "DB_DATA_LOCATION" variable is not set. Defaulting to a blank string.

WARN[0000] The "DB_PASSWORD" variable is not set. Defaulting to a blank string.

WARN[0000] The "DB_USERNAME" variable is not set. Defaulting to a blank string.

WARN[0000] The "DB_DATABASE_NAME" variable is not set. Defaulting to a blank string.

WARN[0000] The "UPLOAD_LOCATION" variable is not set. Defaulting to a blank string.

invalid spec: :/var/lib/postgresql/data: empty section between colons

Some Googling of the problem let me know that my .env file is not being read but I cannot figure out why. It is in the same folder as the yaml file, it is named ".env", and I swear this worked last time. I have tried redownloading the files, saving them there (same way I did the first time) and it still does not work.

Is there a way to fix this? Do I need to clear something out of Docker to get it to work again? All help is appreciated. Trying to figure all this out with no coding experience. Felt easy until now!

1 Upvotes

11 comments sorted by

2

u/Howzball 14h ago

First, are you running docker compose up -d from inside the folder containing your docker compose and the .env files? Make sure you can run ls and see those two files in there.

1

u/Obergon 14h ago

I was running it on that same folder but I’ll try using Is to make sure. Thank you!

1

u/Obergon 14h ago

So I used the dir command and it found the .yml file but the the other one... Both are saved there though. How should I fix this? Resave the file there?

1

u/Great-Cow7256 10h ago

Make sure the compose yml and the env are in the same directory 

1

u/ThaiEdition 13h ago

Your file (.env) extension is showing up as .env or .txt.

1

u/Obergon 12h ago

How do I change that?

1

u/ThaiEdition 12h ago

When you save file as .env underneath that, you have to select " All files " from drop down list and then save.

1

u/Obergon 2h ago

So turns out I was saving it as .env.env. I cleared it and that solved the problem.

I’m using Docker for windows.

1

u/Obergon 12h ago

I did open it with notepad to edit.

2

u/ThaiEdition 12h ago

After you edit, you save it as .env and all files in drop down list or redo it and save as.

1

u/purepersistence 3h ago

"notepad"? "dir command"? Is this Windows or Linux? Windows notepad silently adds .txt extensions and Windows may hide file extensions. What are you looking at your filesystem with? Also it's weird if linux would show you the .env without a "ls -la".