Self-Hosting Aide Locally
To run a local instance of Aide, follow these detailed steps. This guide ensures that you can set up and manage Aide directly on your machine, providing full control over your environment.
Prerequisites
Ensure you have the following software installed:
- Node.js (v18 or higher): Required for running the server and building the extension. Installation ↗ (opens in a new tab)
- npm: Node Package Manager, used to install dependencies.
- Ollama: Local AI provider for running AI models. Guide ↗ (opens in a new tab)
Steps to Self-Host Aide
1. Clone the Repository
Start by cloning the Aide repository to your local machine.
For Linux/MacOS:
git clone https://github.com/somritdasgupta/aide.git
cd aide
For Windows (Command Prompt or PowerShell):
git clone https://github.com/somritdasgupta/aide.git
cd aide
2. Configure Environment Variables
Edit the .env
file to include your Ollama API key and any other necessary settings.
For Linux/MacOS:
-
Open the
.env
file using a text editor like Nano or Vim.Using Nano:
nano .env
Using Vim:
vim .env
For Windows (using Notepad):
- Open the
.env
file with Notepad or any other text editor.notepad .env
In the .env
file, add your Ollama API key and other relevant configurations:
OLLAMA_API_KEY=your_ollama_api_key
OTHER_API_KEY=your_other_api_key
3. Install Dependencies
Install the required Node.js packages.
For Linux/MacOS/Windows:
npm install
This command installs all dependencies listed in the package.json
file.
4. Build the Extension
Compile the Aide extension for your preferred browser.
For Chrome:
npm run build
For Firefox:
npm run build:firefox
This step prepares the extension files for browser integration.
5. Load the Extension
For Chrome:
- Open the Extension Management page by navigating to
chrome://extensions
. - Enable Developer Mode by clicking the toggle switch next to Developer mode.
- Click the
Load unpacked
button and select thebuild
directory.
For Firefox:
- Open Firefox and navigate to
about:addons
. - Click on the Extensions tab.
- Click "Manage Your Extensions".
- Click "Load Temporary Add-on" and select the
manifest.json
file from thebuild
directory.
6. Launch the Web UI
After loading the extension, access the Aide Web UI by clicking on the extension icon in your browser. This will open a new tab with the Web UI.
- Default Keyboard Shortcut for Web UI:
Ctrl+Shift+L
7. Manage and Monitor
To view application logs:
- For Linux/MacOS/Windows:
npm start
This command starts the local server, allowing you to monitor the application’s activity.
8. Stop the Server (Optional)
To stop the local server, you can use Ctrl+C
in the terminal where the server is running.
9. Updating Aide
To update your local instance:
-
Pull the Latest Changes:
git pull origin main
-
Rebuild the Extension:
npm run build
For Firefox:
npm run build:firefox
-
Restart the Server:
npm start
Troubleshooting
-
Issue: Server does not start or shows errors.
- Solution: Check the terminal for error messages. Ensure Node.js and npm are correctly installed and that the
.env
file contains valid API keys.
- Solution: Check the terminal for error messages. Ensure Node.js and npm are correctly installed and that the
-
Issue: Cannot access the Web UI.
- Solution: Verify that the extension is loaded correctly in your browser and ensure there are no port conflicts or network issues.