TorHost - Tor Hidden Service Setup Tool
One-command setup for Tor hidden services (onion services)
Table of Contents
Features
- One-command setup - Create Tor hidden services instantly
- Automatic Tor installation - Detects and installs Tor if missing
- Custom port support - Expose any local port as an onion service
- Secure by default - Uses Tor v3 onion services (latest standard)
- Cross-distro support - Works on Debian, Ubuntu, Fedora, Arch, etc.
- Clean output - Minimal, professional interface
- Troubleshooting included - Helpful error messages and recovery steps
Installation
Method 1: Install from source (Recommended)
# Clone the repository
git clone https://github.com/bytebreach/torhost.git
cd torhost
# Install globally
sudo python3 setup.py install
# Or install in development mode
pip3 install -e .
Method 2: Install via pip
pip3 install torhost
Quick Start
-
Start a local service (e.g., web server on port 8080):
python3 -m http.server 8080 &
-
Create a Tor hidden service:
sudo torhost --port 8080
-
Access your onion service:
- Copy the onion address shown in the output
- Open it in Tor Browser
- Your local service is now accessible via Tor!
Usage
Basic Syntax
sudo torhost [OPTIONS]
Options
| Option | Description | Default |
|---|---|---|
--port PORT |
Local port to expose as onion service | 8080 |
--help |
Show help message | - |
Running as a Module
If installed globally, use:
sudo torhost --port 3000
If not installed, use:
sudo python3 -m torhost.cli --port 3000
Examples
Example 1: Expose a web server
# Start a Python web server
python3 -m http.server 8000 &
# Create onion service for port 8000
sudo torhost --port 8000
Example 2: Expose a Node.js application
# Start Node.js app on port 3000
node app.js &
# Create onion service
sudo torhost --port 3000
Example 3: Expose SSH server
# Create onion service for SSH (port 22)
sudo torhost --port 22
Testing Your Onion Service
# Test with curl (requires tor running)
curl --socks5-hostname localhost:9050 http://your-onion-address.onion
# Or use torsocks
torsocks curl http://your-onion-address.onion
Troubleshooting
Common Issues
1. "Root privileges required"
# Always run with sudo
sudo torhost
2. "Tor not found" on non-Debian systems
# Install Tor manually for your distribution
# Arch Linux
sudo pacman -S tor
# Fedora/RHEL
sudo dnf install tor
# OpenSUSE
sudo zypper install tor
3. Onion address not generating
# Check Tor logs
sudo journalctl -u tor -n 50
# Check hidden service directory
sudo ls -la /var/lib/tor/hidden_service/
# Verify Tor is running
sudo systemctl status tor
# Restart Tor manually
sudo systemctl restart tor
4. "Connection refused" when accessing onion
- Ensure your local service is running
- Check firewall settings
- Verify the port is correct
- Test locally first:
curl http://localhost:PORT
Log Files
- Tor logs:
/var/log/tor/logorjournalctl -u tor - Hidden service directory:
/var/lib/tor/hidden_service/ - Configuration file:
/etc/tor/torrc
Reporting Issues
Please report bugs and feature requests on the GitHub Issues page.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- GitHub Issues: Report bugs or request features
- Email: mrfidal@proton.me
- Documentation: Read the docs
Acknowledgments
- The Tor Project for making online privacy possible
- Contributors and testers who help improve this tool
- The open source community for inspiration and support
Made by ByteBreach
Use responsibly. Respect privacy.
Metadata
Release files for torhost 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torhost-0.0.1.tar.gz | 21.0 kB | Without provenance | Details for torhost-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torhost-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for torhost-0.0.1-py3-none-any.whl |
Total release size: 40.3 kB
Release files / torhost-0.0.1.tar.gz
| Download URL | torhost-0.0.1.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2044337192f575439fb7fc51de4b9ee2986d3ab7d83aa6194c505e69167986ea
|
|
BLAKE2b-256 checksum How to use checksums |
bd6a923654e02410866faf905cc75119ad0293d57100e338f592082e105fdb99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / torhost-0.0.1-py3-none-any.whl
| Download URL | torhost-0.0.1-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a2fe888ff5474df30a798863e73e87c2ece76b22f554272b6b9904a5c1af1d9
|
|
BLAKE2b-256 checksum How to use checksums |
b0625a66327f8df93e7fd4a21dd8ff0b67c6e9ea784a07e4923639d7d21845a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for torhost 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.