1.7 KiB
Memos Build Instructions
This document outlines the steps to build Memos from source, including both the backend (Go) and frontend (React/TypeScript).
Prerequisites
- Go 1.24 or later
- Node.js and npm (for frontend)
- Git
Build Steps
-
Clone the repository:
git clone https://github.com/usememos/memos.git cd memos -
Install Go 1.24: First, try installing through your package manager:
sudo apt-get update sudo apt-get install golang-1.24If Go 1.24 is not available in your package manager, you can install it manually:
wget https://go.dev/dl/go1.24.0.linux-arm64.tar.gz sudo tar -C /usr/local -xzf go1.24.0.linux-arm64.tar.gzAdd Go to your PATH by adding these lines to your
~/.bashrc:export GOROOT=/usr/local/go export PATH=$GOROOT/bin:$PATHReload your shell configuration:
source ~/.bashrcVerify the installation:
go versionYou should see
go version go1.24.0in the output. -
Build the frontend: Navigate to the web directory and install dependencies:
cd web npm installBuild the frontend for release (this places the files in the correct location for embedding):
npm run releaseThis will output the built files to
../server/router/frontend/dist. -
Build the backend: Run the build script:
cd .. bash scripts/build.shThis will create the
memosexecutable in the./builddirectory. -
Run the application:
./build/memos --mode dev
The application should now be accessible at http://localhost:5230 with the embedded frontend.