Skip to main content

A powerful tool to create Tor hidden services with one command

Project description

TorHost - Tor Hidden Service Setup Tool

Python Version License Platform Tor Service

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

  1. Start a local service (e.g., web server on port 8080):

    python3 -m http.server 8080 &
    
  2. Create a Tor hidden service:

    sudo torhost --port 8080
    
  3. 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/log or journalctl -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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torhost-0.0.1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torhost-0.0.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

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

Hashes for torhost-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2044337192f575439fb7fc51de4b9ee2986d3ab7d83aa6194c505e69167986ea
MD5 9b419a64dfe68d27dc48e42efea3466d
BLAKE2b-256 bd6a923654e02410866faf905cc75119ad0293d57100e338f592082e105fdb99

See more details on using hashes here.

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

Hashes for torhost-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2fe888ff5474df30a798863e73e87c2ece76b22f554272b6b9904a5c1af1d9
MD5 65873144e7bc6f8b34d29eb104b21630
BLAKE2b-256 b0625a66327f8df93e7fd4a21dd8ff0b67c6e9ea784a07e4923639d7d21845a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page