|
| 1 | +--- |
| 2 | +title: InstructLab UI .env & OAuth config. |
| 3 | +description: Setting up github OAuth and .env file |
| 4 | +logo: images/ilab_dog.png |
| 5 | +--- |
| 6 | + |
| 7 | +This chapter is dedicated to the settings for running the User Interface locally. |
| 8 | + |
| 9 | +## .env |
| 10 | + |
| 11 | +```bash |
| 12 | +IL_UI_ADMIN_USERNAME=admin |
| 13 | +IL_UI_ADMIN_PASSWORD=password |
| 14 | +IL_UI_DEPLOYMENT=dev |
| 15 | + |
| 16 | +OAUTH_GITHUB_ID=<OAUTH_APP_ID> |
| 17 | +OAUTH_GITHUB_SECRET=<OAUTH_APP_SECRET> |
| 18 | + |
| 19 | +NEXTAUTH_SECRET=your_super_secret_random_string |
| 20 | +NEXTAUTH_URL=http://localhost:3000 |
| 21 | + |
| 22 | +IL_GRANITE_API=<GRANITE_HOST> |
| 23 | +IL_GRANITE_MODEL_NAME=<GRANITE_MODEL_NAME> |
| 24 | +IL_MERLINITE_API=<MERLINITE_HOST> |
| 25 | +IL_MERLINITE_MODEL_NAME=<MERLINITE_MODEL_NAME> |
| 26 | + |
| 27 | +GITHUB_TOKEN=<TOKEN FOR OAUTH INSTRUCTLAB MEMBER LOOKUP> |
| 28 | +TAXONOMY_DOCUMENTS_REPO=github.com/instructlab-public/taxonomy-knowledge-docs |
| 29 | +NEXT_PUBLIC_AUTHENTICATION_ORG=<AUTHENTICATION_ORG> |
| 30 | +NEXT_PUBLIC_TAXONOMY_REPO_OWNER=<GITHUB_ACCOUNT> |
| 31 | +NEXT_PUBLIC_TAXONOMY_REPO=<REPO_NAME> |
| 32 | +``` |
| 33 | + |
| 34 | +## OAuth |
| 35 | + |
| 36 | +To set up the github OAuth settings for the UI, please refer to the steps below |
| 37 | + |
| 38 | +`Github settings` -> `Developer settings` -> `OAuth Apps` -> `Create New OAuth App` |
| 39 | + |
| 40 | +Fill in the fields as shown below: |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +Set the `Homepage URL` and the `Authorization Callback URL` to `http://localhost:3000`. |
| 45 | + |
| 46 | +Once the app is created, there will be an option to create a secret. Press the Create Secret button and it will generate a secret for you. |
| 47 | + |
| 48 | +Update the .env files with the new ID and secret ID generated, `OAUTH_GITHUB_ID` = Client ID, `OAUTH_GITHUB_SECRET` = Client Secret |
| 49 | + |
| 50 | +!!! note |
| 51 | + If you prefer to not set up the OAuth, we recommend for you to reach out to the UI Maintainers in our `#ui` [slack channel](https://join.slack.com/t/instruct-lab/shared_invite/zt-2kieyqiz9-zhXSxGnXk6uL_f3hVbD53g) , where they will provide details for setting up an OAuth app for the instructlab-public org. |
0 commit comments