How to Self-Host AI Notes Locally
Follow these steps to set up AI Notes on your local machine:
Prerequisites
- Install Git.
- Install Node.js (LTS version recommended).
- Install npm (comes with Node.js).
- Install MongoDB and ensure it is running locally.
- Set up an S3-compatible storage like Cloudflare R2, DigitalOcean Spaces, or Fly.io.
- Obtain API keys for OpenRouter if for AI features.
- Obtain API keys for Groq if for AI features.
Steps to Self-Host
Step 1: Client side
- Clone the Repository
Open your terminal and run:
git clone https://github.com/thenbthoughts/ai-notes-client.git
This will download the AI Notes code to your computer.
- Navigate to the Project Folder
Move into the project directory:
cd ai-notes-client
- Create env file
create a file.env
VITE_API_URL="http://localhost:3000"
- Install Dependencies
Install the required packages:
npm install
- Start the Application
Run the app locally:
npm start
This will start the development server. Open your browser and go to:
http://localhost:3000
Step 2: API Side
- Clone the API Repository
Open your terminal and run:
git clone https://github.com/thenbthoughts/ai-notes-api.git
This will download the API code to your computer.
- Navigate to the API Folder
Move into the project directory:
cd ai-notes-api
- Create an Environment File
Create a file named .env in the project folder and add the following:
CUSTOM_NODE_ENV=prod
EXPRESS_PORT=2000
FRONTEND_CLIENT_URL="localhost:3000"
MONGODB_URI="mongodb://localhost:27017/ai-notes-advance"
- Install Dependencies
Install the required packages:
npm install
- Start the API Server Run the API server locally:
npm start
The API server will start on http://localhost:2000.
You're All Set!
You can now use AI Notes locally on your machine.
For any issues, refer to the GitHub repository.