#Error on build and crash on startup

1 messages · Page 1 of 1 (latest)

forest grotto
#

Hi, I just forked the repo but I can't seem to be able to start it. I renamed the root .env.example to .env and replaced CREDS_KEY, CREDS_IV, JWT_SECRET and JWT_REFRESH_SECRET env variables as per docs using the replit repo to generate crypto keys.

I am on MacOS, and using Docker to set it up. When running docker-compose build I receive an error. When running docker-compose up I can see lots of "LibreChat exited with code 0". My node version is v19.9.0

forest grotto
#

Seems to have figured it out. I needed to have both .env and .env.example files present before running docker-compose build

proud nova
#

Both? You should only need one or the other

forest grotto
#

yes i needed both. If I only had the .env.example the build process would crash and state that there is no .env present. If I did not have a .env.example present the script would crash with the error that you can see in the first image

lyric nest
#

Exactly the same issue but for me, StefanENC solution doesn't work, neither keeping only .env or .env.example.

Node v20.3.0

raven tundra
#

@lyric nest

remove this line in the main package.json file in root dir
"install": "node config/install.js",

We're working on addressing these issues, but for now this may work

lyric nest
raven tundra
#

@lyric nest do you have docker desktop? if so,

stop the container, click on librechat

#

then we can see the logs

#

feel free to copy paste them here

#

the last resort is repeating on a clean install, you will have to make sure to clear anything in the cache

you could try this first
docker-compose build --no-cache

#

and then, on a fresh install of the project, (but only if you have no other docker containers you're using)

docker system prune --all --volumes

#

just to be sure, you're experiencing the same issue as Stefan?

raven tundra
#

we pushed a change that may help if you pull from github

lyric nest
#

Thanks @raven tundra and thank you also for the quick responses. So, this is the steps I have done just now.

  1. I did a fresh install by running (docker-compose build --no-cache) and docker system prune --all --volumes followed by git clone https://github.com/danny-avila/LibreChat.git

  2. I added OpenAI API Key and generated JWT_SECRET, CREDS_KEY and CREDS_IV in the .env.example file and saved the file as .env

  3. I ran ```docker-compose up````

Result: I keep getting the same error, LibreChat exited with code 0.

In Docker Desktop, I can not see any logs for LibreChat since it only got status restarting.

raven tundra
#

That says librechat?

lyric nest
raven tundra
#

Ah I meant the last one. And you have no build errors?

lyric nest
#

nope

raven tundra
#

Usually the last one will have some logs. You can stop it and see if it does

#

If you have no build errors, I suspect you have one of 2 issues

CRED_KEY
CRED_IV may not be set or not set correctly

#

In the root .env file

lyric nest
raven tundra
#

Interesting, you can try running the image from dockerhub. There are notes in the docker-compose file to do so.

If you’re not set on docker, you can also try it locally, but I’m not sure why it’s not working for you. What’s your operating system?

lyric nest
#

MacOS (Ventura 13.4). Just tried it with newly generated Cred_key and cred_iv, didn't work. Will try to do it from dockerhub

#

works when running the image from dockerhub..

raven tundra