universe

Universe
git clone https://git.dasho.dev/universe.git
Log | Files | Refs | Submodules | README

TOR_SETUP.md (4406B)


Tor Hidden Service Setup

This setup configures Tor hidden services for your chat application, with Tor running in each nginx container, making each chat instance accessible via its own .onion address.

What's Included

Files Added:

Architecture:

Features:

Usage

1. Build and Start Services:

docker-compose build
docker-compose up -d

2. Check Tor Status and Hostnames:

./check-tor.sh

3. View Generated Hostnames:

# Check all hostnames
./check-tor.sh

# Or check individual container hostnames
docker exec chatterbox cat /var/www/html/hostnames.txt
docker exec shitchat2 cat /var/www/html/hostnames.txt  
docker exec shitchat3 cat /var/www/html/hostnames.txt

# Hostnames are also saved to local files
cat chatterbox_hostname.txt
cat shitchat2_hostname.txt
cat shitchat3_hostname.txt

4. Access Your Chats via Tor:

Each chat instance has its own .onion address:

Use a Tor browser to access each chat using their respective .onion addresses.

Configuration

Tor Configuration (`torrc`):

Docker Volumes:

Container Architecture:

Environment Variables:

No additional environment variables needed for Tor - it uses default configuration.

Security Notes

  1. nginx-3 (shitchat3): Nginx + Tor with unique .onion address
  2. nginx-3 (shitchat3): Nginx + Tor with unique .onion address
  3. nginx-3 (shitchat3): Nginx + Tor with unique .onion address
  4. nginx-3 (shitchat3): Nginx + Tor with unique .onion address

Troubleshooting

Check if Tor is Running:

# Check Tor in specific containers
docker exec chatterbox ps aux | grep tor
docker exec shitchat2 ps aux | grep tor  
docker exec shitchat3 ps aux | grep tor

View Tor Logs:

docker-compose logs chatterbox | grep -i tor
docker-compose logs shitchat2 | grep -i tor
docker-compose logs shitchat3 | grep -i tor

Manually Check Hostname:

docker exec chatterbox cat /var/lib/tor/hidden_service/hostname
docker exec shitchat2 cat /var/lib/tor/hidden_service/hostname
docker exec shitchat3 cat /var/lib/tor/hidden_service/hostname

Restart Services:

docker-compose restart

Port Information

The .onion addresses will be automatically generated and saved to hostnames.txt when the containers start.