Deploying DocsGPT on Kamatera Performance Cloud
Tags: gpt3, ai, cloud, tutorial
Published: 2023-12-26 10:53:08

![Cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/izf0i79dmppqn535gog9.png)

## Introduction

DocsGPT is an open-source smart solution powered by AI that helps you retrieve relevant information from any technical documentation. This saves the time and effort of manual searches and makes it easier for users to get acquainted with the technical products or even use them.

In this tutorial, you will learn how to host a DocsGPT instance on the Kamatera Cloud Server.

## Creating a Kamatera Cloud Server

Kamatera Cloud is one of the popular cloud providers that provides budget-friendly cloud solutions for enterprises of all levels.

To create a cloud server on Kamatera Cloud, follow the steps below.

**Step 1:** [Sign up](https://try.kamatera.com/free-trial/) for a free account and get a 30-day free trial to test its solutions. If you're an existing user, simply [login](https://console.kamatera.com/login) to your account.

![Sign Up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yhc6qdx9hhacl14zzhbb.png)

**Step 2:** Once you're in the dashboard, click on `My Cloud` and then click on `Servers`.

![Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/811j4b63x1vpsn5ukl2l.png)

**Step 3:** In the `Server Management` dashboard, click on the `Create New Server` button.

![New Server Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/utve8tlckg8pghv5zc5b.png)

**Step 4:** You need to define the server configuration in the `Create New Server` page. For this tutorial, feel free to use the configuration specified below.

- **Choose Zone:** Asia (China, Hong Kong) [Choose the closest zone to you.]
- **Choose An Image:** Server OS Images
     - **Image:** Ubuntu
     - **Choose Version:** 22.04 64_bit_optimized_updated
- **Choose Server Specs:** Use the specs given below.
     - **Type:** B General
     - **CPU:** 2
     - **RAM:** 4GB
     - **SSD DISK#1:** 30GB
     - **Daily Backup:** Leave it unchecked.
     - **Management Services:** Leave it unchecked.
- **Choose Networking:** Simple Mode
     - **Public Internet Network:** Keep it checked. (Sets a Public IP)
     - **Private Local Network:** Keep it checked. (Sets a Private IP)
- **Advanced Configuration:** Hide
- **Finalize Settings:** Use the settings given below.
     - **Password:** Provide a password of your choice.
     - **Validate:** Confirm the password once again.
     - **Server:** 1
     - **Name:** Provide a name of your choice for the server.
     - **Power On Servers:** Keep it checked.
- **Billing Cycle and Pricing:** Hourly Billing Cycle

Now hit the `Create Server` button to start booting up the server.

![Server Configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qk1fso3ak2eqmmc6a91c.png)

It will redirect you to the `Server Management` dashboard where you can check the status of the server creation process by clicking on the `Tasks Queue` tab at the left bottom section.

![Tasks Queue](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfo1hmresaksm29juhqt.png)

**Step 5:** Once the status is 100%, you can interact with the server by clicking on the ▶ button on the dashboard, then selecting the `Connect` menu, and finally clicking on the `Open Remote Console` button.

![Connect To Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ubgbyrdrbcb5p8fjs36q.png)

## Deploying DocsGPT on the Server

You can use the DocsGPT source code to deploy it easily. Follow the steps given below to do so.

**Step 1:** Use the remote console to login to the server. The username will be `root` and the password will be the one that you set above during server configuration.

![Remote Login](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cp01dma17c5dhmag28w.png)

**Step 2:** Now clone the DocsGPT GitHub repository to the server.

```bash
git clone https://github.com/arc53/DocsGPT.git
```

![Git Clone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ld9z7qo5l6q63ga75ef.png)

**Step 3:** You should update all the package information in the system before proceeding further. Use the command to do the update.

```bash
sudo apt update
```

![Update Packages](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/juzyeu9ai1y9655m7fvc.png)

**Step 4:** To run DocsGPT in the server, you need to install the container tools `docker` and `docker-compose`. You can use the command below to install them. Press `Y+Enter` when prompted to proceed with the installation.

```bash
sudo apt install docker docker-compose
```

![Install Docker](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x7zdyu1ovhzrj4wgfj6i.png)

**Step 5:** Now navigate to the DocsGPT folder and add the necessary `.env` variables.

```bash
cd DocsGPT/
nano .env
```

Set the following values in the `.env` file.

```bash
API_KEY= <Your OpenAI API key>
VITE_API_STREAMING= true
```
Use `Ctrl+X`, press `Y`, and then hit `Enter` to exit the Nano editor.

![.env Setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxugzy0anuwee6esnyow.png)

**Step 6:** You now need to set the correct IP address of the DocsGPT backend so that the front end can communicate with it. To do this, you need to change the following in the `docker-compose.yaml` file of DocsGPT.

```bash
nano docker-compose.yaml
```

You can find the `VITE_API_HOST` parameter on Line 7. Edit and save it so that it points to the public IP of this cloud server.

```bash
VITE_API_HOST=http://<Cloud Server Public IP>:7091
```

![Vite Host Setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2oec0wflqt3pvmy41qma.png)

You can find the public IP of the server by going to the `Network` tab on the `Server Management` page.

![Server Public IP](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2egt2em8mi3hiz7usypg.png)

**Step 7:** You can now use the command below to run your DocsGPT instance on the server.

```bash
sudo docker-compose up -d
```

The initial startup takes up some time, so wait until you get a `done` status on the remote console terminal.

![DocsGPT Start](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o261ev9kn4ns4rgp7pha.png)

## Testing the DocsGPT Instance

The DocsGPT instance is now available on the port `5173`. Use the public IP of the server to access its GUI.

```bash
http://<Cloud Server Public IP:5173>
```
You have to choose a source documentation when you open this URL. For now, select `default` and click on `Save` to proceed.

![DocsGPT GUI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o283c0hg0j99ivtr4p7x.png)

Feel free to ask generic questions to DocsGPT in the chat window and it will reply with the answers.

```bash
You: What is DocsGPT?
DocsGPT: DocsGPT is an AI-powered language model developed using OpenAI's GPT (Generative Pre-trained Transformer) architecture. It is designed specifically to assist users in composing and editing documents. DocsGPT can help generate text in various formats, such as essays, code snippets, technical documentation, and more. It understands natural language commands and provides informative responses to user queries. Through its conversational interface, DocsGPT can assist with a wide range of document-related tasks, including content generation, formatting, organization, and more.
```

## Conclusion

In this tutorial, you learned about DocsGPT and Kamatera Cloud. You specifically created a Kamatera Cloud Server, deployed an instance of DocsGPT in it using `docker` and `docker-compose`, and finally tested DocsGPT with a sample question.

Now that you've deployed your instance of DocsGPT, feel free to try it out and test its various features. You can check out their official documentation [here](https://docs.docsgpt.co.uk/) for further information.

Lastly, before you close this page, don't forget to drop a like and share your feedback in the comments below.


[![DocsGPT Cloud](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qnhc4jmkiovj17clqgy.png)](https://docsgpt.arc53.com/)

[![Sponsor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/62eudpkqh1cxxachfdbx.png)](https://github.com/sponsors/Rutam21)