- Move `autogpt_libs.supabase_integration_credentials_store` into `backend` - `.store` -> `backend.integrations.credentials_store` - `.types` -> added to `backend.data.model` - Rename `SupabaseIntegrationCredentialsStore` to `IntegrationCredentialsStore` We wanted to get a few security things in quickly in #8403 and had to make some compromises to do so. This picks those up and fixes them. - Resolves #8540 ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> --------- Co-authored-by: Reinier van der Leer <pwuts@agpt.co> Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
4.9 KiB
Getting Started with AutoGPT: Self-Hosting Guide
This tutorial will walk you through the process of setting up AutoGPT locally on your machine.
Introduction
This guide will help you setup the server and builder for the project.
We also offer this in video format. You can check it out here.
!!! warning DO NOT FOLLOW ANY OUTSIDE TUTORIALS AS THEY WILL LIKELY BE OUT OF DATE
Prerequisites
To setup the server, you need to have the following installed:
Checking if you have Node.js & NPM installed
We use Node.js to run our frontend application.
If you need assistance installing Node.js: https://nodejs.org/en/download/
NPM is included with Node.js, but if you need assistance installing NPM: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
You can check if you have Node.js & NPM installed by running the following command:
node -v
npm -v
Once you have Node.js installed, you can proceed to the next step.
Checking if you have Docker & Docker Compose installed
Docker containerizes applications, while Docker Compose orchestrates multi-container Docker applications.
If you need assistance installing docker: https://docs.docker.com/desktop/
Docker-compose is included in Docker Desktop, but if you need assistance installing docker compose: https://docs.docker.com/compose/install/
You can check if you have Docker installed by running the following command:
docker -v
docker compose -v
Once you have Docker and Docker Compose installed, you can proceed to the next step.
Cloning the Repository
The first step is cloning the AutoGPT repository to your computer. To do this, open a terminal window in a folder on your computer and run:
git clone https://github.com/Significant-Gravitas/AutoGPT.git
If you get stuck, follow this guide.
Once that's complete you can close this terminal window.
Running the backend services
To run the backend services, follow these steps:
-
Within the repository, clone the submodules and navigate to the
autogpt_platformdirectory:git submodule update --init --recursive cd autogpt_platformThis command will initialize and update the submodules in the repository. The
supabasefolder will be cloned to the root directory. -
Copy the
.env.examplefile available in thesupabase/dockerdirectory to.envinautogpt_platform:cp supabase/docker/.env.example .envThis command will copy the
.env.examplefile to.envin thesupabase/dockerdirectory. You can modify the.envfile to add your own environment variables. -
Run the backend services:
docker compose up -d --buildThis command will start all the necessary backend services defined in the
docker-compose.combined.ymlfile in detached mode.
Running the frontend application
To run the frontend application, follow these steps:
-
Navigate to
frontendfolder within theautogpt_platformdirectory:cd frontend -
Copy the
.env.examplefile available in thefrontenddirectory to.envin the same directory:cp .env.example .envYou can modify the
.envwithin this folder to add your own environment variables for the frontend application. -
Run the following command:
npm install npm run devThis command will install the necessary dependencies and start the frontend application in development mode.
Checking if the application is running
You can check if the server is running by visiting http://localhost:3000 in your browser.
Notes:
By default the application for different services run on the following ports:
Frontend UI Server: 3000 Backend Websocket Server: 8001 Execution API Rest Server: 8006
Additional Notes
You may want to change your encryption key in the .env file in the autogpt_platform/backend directory.
To generate a new encryption key, run the following command in python:
from cryptography.fernet import Fernet;Fernet.generate_key().decode()
Or run the following command in the autogpt_platform/backend directory:
poetry run cli gen-encrypt-key
Then, replace the existing key in the autogpt_platform/backend/.env file with the new one.