Files
danswer-docs/quickstart.mdx
T
2023-07-12 19:40:43 -07:00

54 lines
2.3 KiB
Plaintext

---
title: "Quickstart"
description: "How to deploy Danswer on your local machine"
---
## Requirements
- git
- docker with compose (docker version >= 1.13.0)
## Setup
**This quickstart guide covers setting up Danswer for local execution**
1. Clone the [Danswer](https://github.com/danswer-ai/danswer) repo:
`git clone https://github.com/danswer-ai/danswer.git`
2. Navigate to **danswer/deployment/docker_compose**
4. Bring up your docker engine and run:
- To pull images from DockerHub and run Danswer:
- `docker compose -f docker-compose.dev.yml -p danswer-stack up -d --pull always --force-recreate`
- Alternatively, to build the containers from source and start Danswer, run:
- `docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build --force-recreate`
- These commands are also used to redeploy if any **.env** variables are updated
- This may take 15+ minutes depending on your internet speed.
5. Danswer will now be running on http://localhost:3000.
## OpenAI API Key
**Note:** On the initial visit, Danswer will prompt for an OpenAI API key.
Without this Danswer will be able to provide search functionalities but not direct Question Answering.
You can get an OpenAI API key at:
[https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys)
## Indexing Documents
**This quickstart guide will index a publicly accessible website as this requires no additional authorization setup**
1. Navigate to the top right of Danswer's home screen and select **Admin Panel**
![Connectors](/images/quickstart/DanswerConnectors.png)
2. In the Web Connector dashboard, pick any base URL to index.
- This will index all pages under that base URL that is reachable from hyperlinks.
- You can check the indexing status page to monitor the progress.
![WebConnector](/images/quickstart/DanswerWebConnector.png)
3. After the pages are indexed, you can now navigate back to the homepage and start asking questions and getting
answers! 🥳
![SampleQA](/images/quickstart/DanswerSampleQA.png)
## Shutting Down
1. `docker compose -f docker-compose.dev.yml -p danswer-stack down`
- add `-v` at the end to delete the volumes (containing users and indexed documents)