A fully statically linked Tor build for Windows — no external DLLs, no dependencies, no setup hassle.
Built with MSYS2 + MinGW64, this binary runs completely standalone on Windows.
⚠️ Note: This project is not affiliated with or endorsed by the Tor Project.
It’s a community-built version meant for educational and convenience purposes only.
Always verify any binary you download.
If you’ve ever tried compiling Tor on Windows… you know.
Static linking is possible — but painful. Dependency hell, path quirks, library conflicts, and random build errors that make you question life choices.
So, I decided to go through that pain once, get it working cleanly, and share both:
- A ready-to-use static build (
tor.exe) - A step-by-step guide on how to build it yourself
This static build was produced using:
- Windows 10/11 (x64)
- MSYS2 (MINGW64 shell)
- gcc (MinGW-w64)
- OpenSSL, libevent, and zlib — statically linked
- No shared
.dlldependencies
You can verify that by running:
ldd tor.exeIf you see “not a dynamic executable”, it’s fully static.
If you want to recreate it (or just trust your own binary), here’s how I did it.
Grab it from https://www.msys2.org Open MSYS2 MINGW64 terminal after installing.
pacman -Syu
pacman -S git make autoconf automake libtool mingw-w64-x86_64-gcc \
mingw-w64-x86_64-openssl mingw-w64-x86_64-zlib \
mingw-w64-x86_64-libevent pkg-configgit clone https://git.torproject.org/tor.git
cd tor
./autogen.sh
./configure --enable-static-tor --disable-asciidoc \
--disable-system-torrc \
--with-libevent-dir=/mingw64 \
--with-openssl-dir=/mingw64 \
--with-zlib-dir=/mingw64 \
LDFLAGS="-static"make -j$(nproc)If you get a /tmp/tor_lib_combining error, rebuild single-threaded:
make clean && make -j1Output will be at:
src/app/tor.exe
To copy it to your desktop:
cp src/app/tor.exe /c/Users/$(whoami)/Desktop/Check version:
tor.exe --versionCheck static linking:
ldd tor.exeIt should respond:
not a dynamic executable
You can also upload it to VirusTotal — static Tor binaries often trigger false positives (because of network behavior and static linking), but they’re harmless if built from source.
- Tor is licensed under BSD-3-Clause — original source: https://git.torproject.org/tor.git
- This repository’s scripts and instructions are under GPL-3.0
- Built and maintained by [YourNameHere]
This repo includes:
/build/tor.exe— prebuilt static binary/docs/BUILD.md— this guide/scripts/— build scripts used in the process
If you want to rebuild, you can simply rerun the commands or use the build_static_tor.sh script.
| Step | Command | Description |
|---|---|---|
| Install deps | pacman -S ... |
Get everything you need |
| Clone source | git clone https://git.torproject.org/tor.git |
Get Tor code |
| Configure | ./configure ... LDFLAGS="-static" |
Enable static build |
| Build | make -j$(nproc) |
Compile it |
| Verify | ldd tor.exe |
Confirm static linking |
Because nobody deserves to lose a weekend fighting MinGW just to build one static binary. If this saves someone a few hours (or gray hairs), it was worth it.
Give it a star on GitHub or contribute improvements — let’s make Tor easier for Windows users.