Installation
mockd is distributed as a single binary with no external dependencies. Choose the installation method that works best for your environment.
Quick Install (Recommended)
Section titled “Quick Install (Recommended)”The fastest way to install mockd on Linux or macOS:
curl -sSL https://get.mockd.io | shThis detects your OS and architecture automatically and installs the latest release.
Homebrew (macOS / Linux)
Section titled “Homebrew (macOS / Linux)”brew install getmockd/tap/mockdBinary 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.25+ 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.25+ 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:
Port 4280 serves mock traffic. Port 4290 is the Admin API for managing mocks at runtime.
# Pull the latest imagedocker pull ghcr.io/getmockd/mockd:latest
# Run with both mock and admin ports exposeddocker run -p 4280:4280 -p 4290:4290 ghcr.io/getmockd/mockd
# Run with a local config filedocker run -p 4280:4280 -p 4290:4290 -v $(pwd)/mockd.yaml:/mockd.yaml ghcr.io/getmockd/mockd serve --config /mockd.yamlDocker Compose
Section titled “Docker Compose”services: mockd: image: ghcr.io/getmockd/mockd:latest ports: - "4280:4280" # Mock server - "4290:4290" # Admin API volumes: - ./mockd.yaml:/mockd.yaml command: serve --config /mockd.yamlBuild 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