Installation
mockd is distributed as a single binary with no external dependencies. Choose the installation method that works best for your environment.
Binary Download
Section titled “Binary Download”Download the latest release for your platform:
curl -sSL https://github.com/getmockd/mockd/releases/latest/download/mockd-linux-amd64 -o mockdchmod +x mockdsudo mv mockd /usr/local/bin/curl -sSL https://github.com/getmockd/mockd/releases/latest/download/mockd-linux-arm64 -o mockdchmod +x mockdsudo mv mockd /usr/local/bin/curl -sSL https://github.com/getmockd/mockd/releases/latest/download/mockd-darwin-amd64 -o mockdchmod +x mockdsudo mv mockd /usr/local/bin/curl -sSL https://github.com/getmockd/mockd/releases/latest/download/mockd-darwin-arm64 -o mockdchmod +x mockdsudo mv mockd /usr/local/bin/# Download from GitHub releasesInvoke-WebRequest -Uri "https://github.com/getmockd/mockd/releases/latest/download/mockd-windows-amd64.exe" -OutFile "mockd.exe"
# Add to PATH or move to a directory in your PATHVerify the installation:
mockd --versionWindows
Section titled “Windows”Using Go Install
Section titled “Using Go Install”If you have Go 1.24+ installed:
go install github.com/getmockd/mockd/cmd/mockd@latestThis installs mockd to your $GOPATH/bin directory. Make sure it’s in your PATH.
Download Binary
Section titled “Download Binary”# Download latest releaseInvoke-WebRequest -Uri "https://github.com/getmockd/mockd/releases/latest/download/mockd_windows_amd64.zip" -OutFile "mockd.zip"
# ExtractExpand-Archive -Path "mockd.zip" -DestinationPath "."
# Add to PATH (current session)$env:PATH += ";$PWD"
# Or move to a directory in your PATHMove-Item mockd.exe C:\Users\YourName\bin\Using Scoop
Section titled “Using Scoop”If you have Scoop installed:
scoop install mockdVerify Installation
Section titled “Verify Installation”mockd --versionGo Install (Linux/macOS)
Section titled “Go Install (Linux/macOS)”If you have Go 1.24+ installed:
go install github.com/getmockd/mockd/cmd/mockd@latestThis installs mockd to your $GOPATH/bin directory. Make sure it’s in your PATH.
Docker
Section titled “Docker”Pull and run the official Docker image:
# Pull the latest imagedocker pull ghcr.io/getmockd/mockd:latest
# Run with a local mocks directorydocker run -p 4280:4280 -v $(pwd)/mocks:/mocks ghcr.io/getmockd/mockd
# Run with a specific config filedocker run -p 4280:4280 -v $(pwd)/mocks.json:/mocks.json ghcr.io/getmockd/mockd start --config /mocks.jsonDocker Compose
Section titled “Docker Compose”version: '3.8'services: mockd: image: ghcr.io/getmockd/mockd:latest ports: - "4280:4280" volumes: - ./mocks:/mocks command: start --config /mocks/config.jsonBuild from Source
Section titled “Build from Source”Clone and build the project:
git clone https://github.com/getmockd/mockd.gitcd mockdgo build -o mockd ./cmd/mockdVerify Installation
Section titled “Verify Installation”After installation, verify mockd is working:
# Check versionmockd --version
# Show helpmockd --help
# Start a simple mock server (creates default config if none exists)mockd startNext Steps
Section titled “Next Steps”- Quickstart - Create your first mock API
- Core Concepts - Learn how mockd works