Skip to main content

How to Self-Host AI Notes Locally

Follow these steps to set up AI Notes on your local machine:

Prerequisites

  1. Install Git.
  2. Install Node.js (LTS version recommended).
  3. Install npm (comes with Node.js).
  4. Install MongoDB and ensure it is running locally.
  5. Set up an S3-compatible storage like Cloudflare R2, DigitalOcean Spaces, or Fly.io.
  6. Obtain API keys for OpenRouter if for AI features.
  7. Obtain API keys for Groq if for AI features.

Steps to Self-Host

Step 1: Client side

  1. 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.

  1. Navigate to the Project Folder
    Move into the project directory:
cd ai-notes-client
  1. Create env file
    create a file .env
VITE_API_URL="http://localhost:3000"
  1. Install Dependencies
    Install the required packages:
npm install
  1. 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

  1. 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.

  1. Navigate to the API Folder
    Move into the project directory:
cd ai-notes-api
  1. 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"
  1. Install Dependencies
    Install the required packages:
npm install
  1. 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.