-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fb3643
commit 7ed913a
Showing
1 changed file
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,9 @@ Here's an overview of the general configuration. | |
|
||
> **Note:** OpenID does not support the ability to disable only registration. | ||
|
||
>> **Quick Tip:** Even with registration disabled, add users directly to the database using `npm run create-user`. If you can't get npm to work, try `sudo docker exec -ti LibreChat sh` first to "ssh" into the container. | ||
>> **Quick Tip:** To delete a user, you can run `docker-compose exec api npm run delete-user [email protected]` | ||
Quick Tips: | ||
- Even with registration disabled, you can add users directly to the database using the create-user script. | ||
- To delete a user, you can use the delete-user script. | ||
|
||
<div style={{display: "flex", justifyContent: "center", alignItems: "center", flexDirection: "column"}}> | ||
<div className="image-light-theme"> | ||
|
@@ -94,3 +95,47 @@ To set up the mod system, review [the setup guide](/docs/configuration/mod_syste | |
|
||
> *Please Note: If you want this to work in development mode, you will need to create a file called `.env.development` in the root directory and set `DOMAIN_CLIENT` to `http://localhost:3090` or whatever port is provided by vite when runnning `npm run frontend-dev`* | ||
## User Management Scripts | ||
|
||
### Create User Script | ||
|
||
The create-user script allows you to add users directly to the database, even when registration is disabled. Here's how to use it: | ||
|
||
1. For the default docker-compose.yml: | ||
``` | ||
docker-compose exec api npm run create-user | ||
``` | ||
|
||
2. For the deploy-compose.yml: | ||
``` | ||
docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run create-user" | ||
``` | ||
|
||
3. For local development (from project root): | ||
``` | ||
npm run create-user | ||
``` | ||
|
||
Follow the prompts to enter the new user's email and password. | ||
|
||
### Delete User Script | ||
|
||
To delete a user, you can use the delete-user script: | ||
|
||
1. For the default docker-compose.yml: | ||
``` | ||
docker-compose exec api npm run delete-user [email protected] | ||
``` | ||
|
||
2. For the deploy-compose.yml: | ||
``` | ||
docker exec -it LibreChat-API /bin/sh -c "cd .. && npm run delete-user [email protected]" | ||
``` | ||
|
||
3. For local development (from project root): | ||
``` | ||
npm run delete-user [email protected] | ||
``` | ||
|
||
Replace `[email protected]` with the email of the user you want to delete. | ||
|