TorHost - Tor Hidden Service Setup Tool
One-command setup for Tor hidden services (onion services)
- 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
# 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 .pip3 install torhost-
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!
sudo torhost [OPTIONS]| Option | Description | Default |
|---|---|---|
--port PORT |
Local port to expose as onion service | 8080 |
--help |
Show help message | - |
If installed globally, use:
sudo torhost --port 3000If not installed, use:
sudo python3 -m torhost.cli --port 3000# Start a Python web server
python3 -m http.server 8000 &
# Create onion service for port 8000
sudo torhost --port 8000# Start Node.js app on port 3000
node app.js &
# Create onion service
sudo torhost --port 3000# Create onion service for SSH (port 22)
sudo torhost --port 22# 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# Always run with sudo
sudo torhost# Install Tor manually for your distribution
# Arch Linux
sudo pacman -S tor
# Fedora/RHEL
sudo dnf install tor
# OpenSUSE
sudo zypper install tor# 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- Ensure your local service is running
- Check firewall settings
- Verify the port is correct
- Test locally first:
curl http://localhost:PORT
- Tor logs:
/var/log/tor/logorjournalctl -u tor - Hidden service directory:
/var/lib/tor/hidden_service/ - Configuration file:
/etc/tor/torrc
Please report bugs and feature requests on the GitHub Issues page.
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Issues: Report bugs or request features
- Email: mrfidal@proton.me
- Documentation: Read the docs
- 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.