Local Docker run
This guide will start Maia from the source code repository, but the running way is Docker (App + Runner). It’s closer to production environment than pnpm dev.
Prerequisites
Section titled “Prerequisites”- Docker + Docker Compose v2
- Git
Start Maia
Section titled “Start Maia”-
Clone the source repo
Terminal window git clone https://github.com/obiscr/maia.gitcd maia -
Create env file
Terminal window cp env.example .env.production -
Edit
.env.production(minimum required).env.production RUNNER_TOKEN=your-tokenRecommended for production:
.env.production RUNNER_TOKEN=your-tokenSETTINGS_ENCRYPTION_KEY=your-stable-key -
Build sandbox image
Terminal window docker build -f Dockerfile.sandbox -t maia-sandbox .Then set
MAIA_SANDBOX_IMAGE=maia-sandboxin.env.productionfile and restart..env.production RUNNER_TOKEN=your-tokenSETTINGS_ENCRYPTION_KEY=your-stable-keyMAIA_SANDBOX_IMAGE=maia-sandbox -
Build and start
Terminal window docker compose --env-file .env.production up -d --build
Then open:
Open Maia Docker default port: http://localhost:3690
Data storage location
Section titled “Data storage location”In Docker mode, data is stored in Docker named volume by default. If you want to store it on the host machine, you can set:
MAIA_DATA_MOUNT_TYPE=bindMAIA_HOST_DATA_DIR=/absolute/path/on/hostFor example:
MAIA_HOST_DATA_DIR=/Users/alice/maia-dataMAIA_HOST_DATA_DIR=/home/alice/maia-dataMAIA_HOST_DATA_DIR=C:\Users\alice\maia-dataAfter setting, you need to restart the container.
Get updates
Section titled “Get updates”When maia source code has updates, run the following commands in the source code directory:
git pulldocker compose --env-file .env.production up -d --build