Self-hosted unified API mock server for REST and gRPC with a web UI.
Use the prebuilt image to run Unimock locally in under a minute.
docker pull ghcr.io/rasadov/unimock:latest
docker run --name unimock \
-p 5100:5100 -p 5101:5101 -p 5102:5102 \
-e UNIMOCK_DB=file:/srv/data/unimock.db \
-v unimock-data:/srv/data \
-v unimock-protos:/srv/unimock-grpc-protos \
ghcr.io/rasadov/unimock:latestOpen http://localhost:5100 for the admin UI.
Stop/remove container:
docker stop unimock && docker rm unimockservices:
unimock:
image: ghcr.io/rasadov/unimock:latest
ports:
- "5100:5100"
- "5101:5101"
- "5102:5102"
environment:
- UNIMOCK_DB=file:/srv/data/unimock.db
volumes:
- unimock-data:/srv/data
- unimock-protos:/srv/unimock-grpc-protos
volumes:
unimock-data:
unimock-protos:Then run:
docker compose up -d- Admin dashboard + management API:
http://localhost:5100 - REST mock server:
http://localhost:5101 - gRPC mock server:
localhost:5102
- Docker with Compose support
docker compose up --buildThen open:
http://localhost:5100
docker compose downSQLite data is persisted in the unimock-data volume (configured in docker-compose.yml).
- Go
1.22+(project currently uses Go1.26.xingo.mod) - Node.js
20+and npm (for the React UI)
cd ui
npm installnpm run buildThis creates ui/dist, which is embedded/served by the Go app.
From project root:
go run ./cmd/unimockThen open:
http://localhost:5100
By default, unimock uses file:unimock.db.
Set UNIMOCK_DB to change it:
UNIMOCK_DB=file:/absolute/path/unimock.db go run ./cmd/unimockFrom project root:
make ui-build
make go-build
make run
make test
make docker-build
make docker-up- Open admin UI at
:5100. - Create REST/gRPC mock definitions.
- Hit protocol endpoints on
:5101,:5102. - Watch live logs via the UI (SSE stream).
- Export/import full config with management actions.