WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.45k stars 321 forks source link

Registration problem #232

Open bing-10 opened 1 year ago

bing-10 commented 1 year ago

image After deploying through docker compose, I start test the client by register a new account. However, here comes the problem (400 bad request), is it due to my wrong configuration?

Suleman-Elahi commented 1 year ago

show the compos file you are using and the platform you are deploying it .....

bing-10 commented 1 year ago

I just modified the SERVER_DOMAIN and APP_DOMAIN: image image

Suleman-Elahi commented 1 year ago

If you are using Google Cloud or AWS then have you allowed those ports through the firewall?

bing-10 commented 1 year ago

I am using AWS and I can get access to the admin page like this: image but the problem occurs in the client

ilovefreesw commented 1 year ago

Try using the default SQLite database. You are using Postgres. If SQLite works, then you need to change localhost to internal IP address of the host machine.

Or, you can also use host.docker.internal instead of localhost.

postgres://postgres:postgrespw@host.docker.internal:49153/chatgpt

bing-10 commented 1 year ago

I have left the postgres configuration commented to take the SQLite as default. Should I configure it explicitly? image

Suleman-Elahi commented 1 year ago

Is it working now ?

The problem with your setup is that you are using the localhost. That will not work.

Set DB_URL to what @ilovefreesw mentioned above.

bing-10 commented 1 year ago

I set this but still got the error: image

image

Suleman-Elahi commented 1 year ago

That's strange .. post the log of docker-compose up command.

bing-10 commented 1 year ago

image image image image image image

Suleman-Elahi commented 1 year ago

Yes, it is the problem with the Postgres srever name. I think you are using older version of Docker. Whatever the OS is this, find its IP address.

Tell me the output of ip addr show command.

bing-10 commented 1 year ago

image

Suleman-Elahi commented 1 year ago

Then use this as the DB_URL = postgres://postgres:postgrespw@172.31.88.184:49153/chatgpt

And if it still doesn't work then create a new EC2 instance with Ubuntu 22.04 or Ubuntu 20.04 image.

bing-10 commented 1 year ago

I tried this, but the problem remains unresolved.

Suleman-Elahi commented 1 year ago

Did it work when you used the default SQLite database?

bing-10 commented 1 year ago

As for creating a new EC2 instance, I have not tried. Could you please give me some more detailed instructions? Thank you.

Suleman-Elahi commented 1 year ago

Where are you using it right now ? on Which cloud provider and operating system?

Suleman-Elahi commented 1 year ago

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

bing-10 commented 1 year ago

AWS, Ubuntu-22.04.1

bing-10 commented 1 year ago

Follow this tutorial: I think this is the same. https://www.youtube.com/watch?v=VKDU10gbYVQ

But it uses DigitalOcean ..so chnage that for yourself..of if you can afford DO then follow this tutorial.

Thank you, I'll take it as a reference.