hgweb.exe

Mercurial HgWeb Server (hgweb.exe)

CPU Usage
N/A
Memory
N/A
Location
N/A
Publisher
N/A

Notes
This HGWeb documentation provides targeted details about hgweb.exe behavior and troubleshooting, focusing on Windows deployments and repository serving scenarios.

What is hgweb.exe?

hgweb.exe is the Windows executable that runs Mercurial's built-in web interface, hgweb. It enables HTTP access to Mercurial repositories, allowing users to browse changesets, read repository data, and perform operations via a browser or API client. This component is part of Mercurial installations and can be run standalone or behind a reverse proxy for remote access.

hgweb.exe hosts the hgweb application by loading Mercurial libraries into a lightweight Python-based HTTP server. It uses hgweb.config to locate repositories, apply permissions, set hooks, and define ports, then serves content to clients through HTTP(S) requests.

Is hgweb-exe Safe?

hgweb.exe is safe when obtained from official Mercurial distributions and executed within a trusted, controlled Windows environment. It operates within the Mercurial installation folder, accesses only configured repository paths, and relies on standard Windows security mechanisms. If the binary originates from the official Mercurial project and matches expected hashes, it represents a legitimate component of the Mercurial web interface.

Is hgweb-exe a Virus?

In legitimate Mercurial deployments, hgweb.exe is not a virus. However, an executable named hgweb.exe that is downloaded from an untrusted source or appears in an unexpected directory could be malicious. Always verify provenance, signatures, and integrity before allowing network exposure of this binary.

How to Verify Legitimacy

  1. Check File Location: Confirm hgweb.exe resides in a trusted Mercurial installation directory such as C:\Program Files\Mercurial\ or C:\Mercurial\ and not in a temporary or user-writable folder.
  2. Verify Digital Signature: Open Properties for hgweb.exe and view the Digital Signatures tab; signatures should come from Mercurial Project or the official distributor.
  3. Check File Hash: Compute SHA256: certutil -hashfile "C:\Program Files\Mercurial\hgweb.exe" SHA256 and compare with the published hash from the Mercurial release notes.
  4. Scan for Malware: Run a malware scan with Windows Defender or your enterprise AV to ensure the binary is clean.

Red Flags: If hgweb.exe is located in a temporary folder, lacks a valid digital signature, or differs from the hash in official Mercurial releases, treat as suspicious and isolate the host until provenance is confirmed.

Why is it Running?

Reasons it's running:

Can I Disable or Remove It?

Common Problems

Common Causes & Solutions

Frequently Asked Questions

What is hgweb.exe?

hgweb.exe is the Windows executable that runs Mercurial's built-in web interface (hgweb) to serve repositories over HTTP.

Is hgweb.exe safe to run on my PC?

Yes, when sourced from official Mercurial packages and run in a trusted environment. Verify signature and path to avoid rouge binaries.

How do I stop hgweb.exe without breaking Mercurial?

You can stop the process via Task Manager or stop the hgweb-related Windows service. If you use a reverse proxy, disable that proxy temporarily as needed.

What port does hgweb.exe use by default?

By default hgweb may bind to port 8000 unless configured otherwise in hgweb.config or startup options.

How can I secure hgweb.exe with TLS?

Use a reverse proxy (Nginx, IIS, or Apache) with TLS termination in front of hgweb to encrypt traffic to clients.

Why is hgweb.exe consuming high CPU?

High load from many concurrent requests or heavy repository operations can cause CPU spikes. Distribute load, tune timeouts, or optimize proxy settings.

Related Processes