Self-hosting

Self-host Oatmilk

Run your own Oatmilk on your computer, a server or a cloud, with your data and AI models staying with you.

Oatmilk runs on your own hardware with everything it needs: the web app and its AI agents, PostgreSQL, file storage, Redis, scheduled jobs, sign-in, the REST API, MCP for AI apps and the command line. Set up for it, nothing leaves the machine: accounts, books, statements, receipts and documents stay in your database and on your disk, and AI models can run on your own hardware too.

One command asks a few questions, writes the settings, builds Oatmilk and starts it:

Shell
bun run self-host setup

Choose a guide

You wantFollowTime
Oatmilk on your own computer, just for youRun it on your computer20 minutes
Every AI model on your own hardwareUse local AI models15 minutes
Nothing at all leaving the machineGo completely off-grid30 minutes
A server for your team at your own domainRun it on a server30 minutes
Amazon Web Services with RDS, ElastiCache and S3Deploy on AWS1 hour
Google Cloud with Cloud SQL, Memorystore and Cloud StorageDeploy on Google Cloud1 hour
Microsoft Azure with its managed PostgreSQL and RedisDeploy on Azure1 hour
Your own PostgreSQL, Redis or S3-compatible storage (Neon, Upstash, Cloudflare R2, MinIO…)Bring your own services20 minutes
A machine without DockerRun it without Docker1 hour
To change Oatmilk's codeDevelop Oatmilk locally15 minutes

Then manage sign-in and accounts, and update, back up and troubleshoot your installation.

What runs where

Everything runs in Docker Compose, from the self-host/ folder of Oatmilk's source.

PieceWhat it isStays on your machine?
Web app and agentsOne container, app, with the web app, every AI agent and the five-minute jobsYes
DatabasePostgreSQL 17, bundled, or your own PostgreSQL 15 or newerYes
Database APIPostgREST, the same piece Supabase runs. Never published.Yes
File storageSupabase Storage, on a Docker volume or in an S3-compatible bucketYes, on the disk or MinIO
RedisCaches, rate limits and locks. Bundled, or your own.Yes
Sign-inAccounts in your database with Better Auth, or ClerkYes, with Better Auth
HTTPSCaddy: its own certificate for *.localhost, Let's Encrypt for a real domainYes, on *.localhost
AI modelsOllama, LM Studio or any OpenAI-compatible server, or Vercel AI GatewayYes, with local models
EmailOff, or Resend for invoices, invitations and remindersOff
Bank, payment and data connectionsWise, Stripe, Notion, Google Drive, Microsoft: each optional, set up per companyOnly when you connect them

What you need

  • Oatmilk's source code, cloned with Git.
  • Docker Desktop, or Docker Engine with Compose 2.20 or newer. Check with docker compose version.
  • Bun 1.3 or newer, which runs the setup commands.
  • About 4 GB of memory and 15 GB of disk for Oatmilk itself. Local AI models need more: see Use local AI models.
  • The internet, once, to build the image. After that, Oatmilk can run without it.

Use your Oatmilk like the hosted one

A self-hosted Oatmilk has the same app, REST API, webhooks and MCP server. These docs are part of it too: open /docs on your own address, and every example uses that address.

  • API keys come from Developers › API keys: oat_test_… on an install for one computer, oat_live_… on a server.
  • AI apps connect to https://<your address>/api/mcp and sign in through your Oatmilk's own accounts.
  • The CLI signs in with oatmilk login --host https://<your address>. See Sign in and choose a company.