Skip to content

Installation

mockd is distributed as a single binary with no external dependencies. Choose the installation method that works best for your environment.

Download the latest release for your platform:

Terminal window
curl -sSL https://github.com/getmockd/mockd/releases/latest/download/mockd-linux-amd64 -o mockd
chmod +x mockd
sudo mv mockd /usr/local/bin/

Verify the installation:

Terminal window
mockd --version

If you have Go 1.24+ installed:

Terminal window
go install github.com/getmockd/mockd/cmd/mockd@latest

This installs mockd to your $GOPATH/bin directory. Make sure it’s in your PATH.

Terminal window
# Download latest release
Invoke-WebRequest -Uri "https://github.com/getmockd/mockd/releases/latest/download/mockd_windows_amd64.zip" -OutFile "mockd.zip"
# Extract
Expand-Archive -Path "mockd.zip" -DestinationPath "."
# Add to PATH (current session)
$env:PATH += ";$PWD"
# Or move to a directory in your PATH
Move-Item mockd.exe C:\Users\YourName\bin\

If you have Scoop installed:

Terminal window
scoop install mockd
Terminal window
mockd --version

If you have Go 1.24+ installed:

Terminal window
go install github.com/getmockd/mockd/cmd/mockd@latest

This installs mockd to your $GOPATH/bin directory. Make sure it’s in your PATH.

Pull and run the official Docker image:

Terminal window
# Pull the latest image
docker pull ghcr.io/getmockd/mockd:latest
# Run with a local mocks directory
docker run -p 4280:4280 -v $(pwd)/mocks:/mocks ghcr.io/getmockd/mockd
# Run with a specific config file
docker run -p 4280:4280 -v $(pwd)/mocks.json:/mocks.json ghcr.io/getmockd/mockd start --config /mocks.json
version: '3.8'
services:
mockd:
image: ghcr.io/getmockd/mockd:latest
ports:
- "4280:4280"
volumes:
- ./mocks:/mocks
command: start --config /mocks/config.json

Clone and build the project:

Terminal window
git clone https://github.com/getmockd/mockd.git
cd mockd
go build -o mockd ./cmd/mockd

After installation, verify mockd is working:

Terminal window
# Check version
mockd --version
# Show help
mockd --help
# Start a simple mock server (creates default config if none exists)
mockd start