A powerful tool to create Tor hidden services with one command
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torhost-0.0.1.tar.gz.
File metadata
- Download URL: torhost-0.0.1.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2044337192f575439fb7fc51de4b9ee2986d3ab7d83aa6194c505e69167986ea
|
|
| MD5 |
9b419a64dfe68d27dc48e42efea3466d
|
|
| BLAKE2b-256 |
bd6a923654e02410866faf905cc75119ad0293d57100e338f592082e105fdb99
|
File details
Details for the file torhost-0.0.1-py3-none-any.whl.
File metadata
- Download URL: torhost-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a2fe888ff5474df30a798863e73e87c2ece76b22f554272b6b9904a5c1af1d9
|
|
| MD5 |
65873144e7bc6f8b34d29eb104b21630
|
|
| BLAKE2b-256 |
b0625a66327f8df93e7fd4a21dd8ff0b67c6e9ea784a07e4923639d7d21845a8
|