Pact Stub Server

Pact Stub Server is a standalone server that generates mock responses from Pact contract files, implementing the V4 Pact specification.

  • Development
  • Tools & Utilities
Pact Stub Server is a standalone server that generates mock responses from Pact contract files, implementing the V4 Pact specification. It lets development and testing teams run and verify their applications against a simulated service without the real dependency being active.

Platform availability

Available on 0 of 10 platforms

  • Unraid (not listed)
  • TrueNAS (not listed)
  • Umbrel (not listed)
  • ZimaOS (not listed)
  • Proxmox (not listed)
  • Helm (not listed)
  • Mac (not listed)
  • Windows (not listed)
  • Linux (not listed)
  • Any server (not listed)

Health score?A 0-100 score computed nightly from four factors: maintained (40%: recent commits and steady activity), popular (25%: GitHub stars, log scale), easy to install (20%: platforms, install notes, setup guides, Docker image) and light to run (15%: minimum RAM, ARM support). When the source code has been checked, a fifth factor, security check (20%: automated scan for committed secrets, unsafe desktop-app settings, known-vulnerable dependencies and project hygiene; any serious finding caps it at 20), is added. Factors without data are left out and the rest are rescaled.

44/100 Fair

Maintained
70last commit 102 days ago
Popular
3880 GitHub stars
Easy to install
250 install platforms, install notes, Docker image
Light to run
No data
Security check
201 serious finding, 5 minor, CI, tests

Based on 4 of 5 factors.

GitHub stars
80
Open issues
6
Last commit
2026-08-10
Latest release
v0.7.1
License
MIT
Activity
stale

Checked 3 days ago - source: GitHub (pact-foundation/pact-stub-server)

Resources & Compatibility

ARM (e.g. Raspberry Pi) is supported.

Checked 54 days ago - source: Docker Hub image tags and published docs

First-install notes

  • Download the CLI tools for your machine Use the release commands to download the Linux Pact mock server and verifier binaries, then run the help command (--help) to confirm they work. If the tools are missing or the wrong type, the stub server won't start. source
  • Choose ports and file folders before running Use -o to pick where Pact files are saved, and use -p or --base-port to choose the network ports (numbered channels for traffic; the main server defaults to 8080). If ports are random or blocked, other apps won't reach the stub server. source
  • Create the stub from a pact file Use pact-mock-server create with -f pointing to your pact file, then write down the ID and port it prints. The port is where your test code calls the stub, and the ID is needed to stop that specific stub later. source

Fetched 53 days ago - each note links to its source

Alternatives

No alternatives collected yet.

Common questions

Why does the Pact stub server fail to start after installing it?

Download the correct Linux Pact mock server and verifier binaries for your machine and confirm they work by running --help. Missing or wrong-type tools can prevent the stub server from starting.

How do I choose the port and Pact file output location before running the stub?

Use -o to choose where Pact files are saved and use -p or --base-port to choose the network port. The main server defaults to port 8080, and blocked or random ports can stop other apps from reaching the stub.

Will the stub server respond if a request does not exactly match a pact interaction?

Yes, it will always try to return a response, even when there is not an exact match with the pact files.

Can I use it to stub backend servers while developing mobile apps?

Yes, the stub server was designed to support prototyping mobile applications by stubbing out backend servers.

Answers sourced from docs.pact.io, docs.pact.io, docs.pact.io

Community

Collected 48 days ago - public community threads