Docker
Docker
To run the ChatGPT application with Docker, follow these steps:
- Provide all necessary credentials such as API keys, access tokens, and the Mongo Connection String in the - docker-compose.ymlfile under the api service.
- Run the command - docker-compose upto start the application.
Note: MongoDB does not support older ARM CPUs like those found in Raspberry Pis. However, you can make it work by setting MongoDB's version to mongo:4.4.18 in docker-compose.yml, which is the most recent version compatible with such devices.
To download the latest version of ChatGPT's Docker image, please visit the chatgptclone/app Tags | Docker Hub page.
Prerequisites
To use ChatGPT, you need to have the following:
- Node.js >= 19.0.0: https://nodejs.org/en/download 
- MongoDB installed or MongoDB Atlas (required if not using Docker) - MongoDB does not support older ARM CPUs like those found in Raspberry Pis. However, you can make it work by setting MongoDB's version to - mongo:4.4.18in- docker-compose.yml, which is the most recent version compatible with such devices.
- If you are using MongoDB Atlas, remove - &w=majorityfrom the default connection string.
 
- BingAI and ChatGPT access tokens (optional, free AIs) 
Usage
- Clone or download the ChatGPT repository to your desired location using the following command: 
git clone https://github.com/danny-avila/chatgpt-clone.git- Create a MongoDB database by following these steps: - Navigate to https://www.mongodb.com/ and sign in or create an account. 
- Create a new project. 
- Build a database using the free plan and name the cluster (example: chatgpt-clone). 
- Use the "Username and Password" method for authentication. 
- Add your current IP to the access list. 
- In the Database Deployment tab, click on Connect. 
- In the "Choose a connection method" section, select "Connect your application". 
- In the "Driver" dropdown menu, select "Node.js" and in the "Version" dropdown, select "4.1 or later". 
- Copy the connection string, fill in your password, and remove - &w=majorityfrom the default connection string.
 
- If you want to use ChatGPT's free version, follow these steps: - Log in to chat.openai.com. 
- Visit https://chat.openai.com/api/auth/session to get your access token. 
- Note that there is a high chance of your account being banned with this method. Continue at your own risk. 
 
- Get your Bing Access Token by following these steps: - Using MS Edge, navigate to bing.com. 
- Make sure you are logged in. 
- Open the DevTools by pressing F12 on your keyboard. 
- Click on the "Application" tab (On the left of the DevTools). 
- Expand the "Cookies" (Under "Storage"). 
- Copy the value of the "_U" cookie. 
 
Last updated
Was this helpful?