I built this so anyone can clone,
run, and chat over Tor with persistent
identity and chat history.
- Invite-code based encrypted chat over Tor hidden services.
- Persistent onion address on every run (same address is reused).
- Persistent chat history per room (encrypted at rest).
- Local backups are created automatically at startup.
- Cross-platform launch scripts:
- Linux/macOS:
run.sh - Windows:
run.bat
- Linux/macOS:
- Separate Windows desktop package with bundled Tor and a GUI launcher:
windows_gui/ - Master passphrase protection for local room keys.
- The app writes only inside the project folder (
data/,.venv/). - No destructive system commands are used.
- No admin/system files are modified.
- No global services are overwritten.
- Python 3.10+
- Tor executable available on PATH
- Clone the repo.
- Open terminal in project root.
- Run:
Linux/macOS:
./run.shWindows (Command Prompt or PowerShell):
run.bat- Enter your master passphrase when prompted (first run creates it).
- Open:
http://127.0.0.1:5000If you want a traditional Windows app experience instead of terminal launch:
- use the packaged desktop build under
windows_gui/ - the desktop package bundles Tor
- the user can launch it from a shortcut and does not need to open terminal
- the launcher shows the local URL and onion URL
Current Windows package outputs:
windows_gui/dist/TOR Messenger Desktop.exewindows_gui/tor-messenger-desktop-windows.zip
- Click Generate Code to create a room and invite code.
- Share that code with the other person securely.
- They paste it in Join With Code.
- Both sides send messages and sync.
- I set my alias once per room.
- After first message, alias is saved and locked for that room.
- On future opens, my alias loads automatically from backup.
The app keeps data locally and reuses it every run:
- Chat database:
data/chat.db - Encrypted logs:
data/logs/<room_id>.log - Onion identity keys:
data/tor/hidden_service/ - Auto startup backups:
data/backups/startup-*/
Because data/tor/hidden_service/ is persistent, my onion address remains the same across runs.
To restore on another machine, copy:
data/chat.dbdata/logs/data/tor/hidden_service/
Then run the app there with the same project structure.
If sync says peer onion is unreachable:
- Keep both apps running.
- Wait for Tor bootstrap to complete.
- Check
data/tor/tor.logforBootstrapped 100%. - Press Sync again.
- Launcher:
launcher.py - Linux/macOS runner:
run.sh - Windows runner:
run.bat - Windows desktop package:
windows_gui/ - Backend:
tor_messenger/app.py - Frontend:
web/index.html,web/styles.css,web/app.js
