Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for installing TOB by inexperienced raspbian users #7

Closed
simonleventeattila opened this issue Mar 21, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@simonleventeattila
Copy link

commented Mar 21, 2016

Would it be possible to include into the read.me a short section on how to install this for the newcomer pi user.

I've installed all the additional libraries mentioned but have little clue about how to get TOB on my pi up and running.

Thanks for your work,
Levi

ps: first time using git too, not sure if this is the place to ask about such things :)

@ralphwetzel

This comment has been minimized.

Copy link
Owner

commented Mar 21, 2016

Hi Levi!

That's a good idea. I propose to do this together: We'll setup your Pi and i'll make a HowTo from our experiences later. OK?

  • I assume your Tor relay is already operative. If not, check the Tor Project site for this procedure.
  • I assume as well that you're logged in as user pi, operating on the X desktop. There is no need to run TheOnionBox as root!
  • Open Pi's webbrowser (called Epiphany) and go to the Releases page. From there, download the source code of the latest release. The file (e.g. theonionbox-2.1.1.zip) will be placed into /home/pi/Downloads.
  • Open the filemanager, go to /home/pi/Downloads, right click on the downloaded file and select Unzip here. This should create a new directory with a name equivalent to the downloaded zip file.
  • Change into that directory. There you'll find a directory named theonionbox. Copy that directory and all the content inside to /home/pi/. This should create /home/pi/theonionbox.
  • Change into /home/pi/theonionbox/config and open the configuration file theonionbox.cfg.
  • Verify that the port number defined in the line port is free to be used. Otherwise define an appropriate port number (e.g. port=8081). This will be the port number of the webserver of your OnionBox.
  • Verify that the port number defined in the line tor_control_port matches your control port setting (e.g. tor_control_port=9051). If not, alter the setting accordingly.
  • You may check the rest of the settings, but usually the defaults should be ok if you have a standard configuration.
  • Close & (if you changed settings) save theonionbox.cfg.
  • Ensure that you've as well followed the instructions given in the Readme concerning Installation and Configuration.
  • Open a console window and change to the directory where you stored the OnionBox files: cd /home/pi/theonionbox.
  • Run your box: python theonionbox.py. The Box will output some messages while launching. As long as no error occurs (which will lead to a termination of the Box) you'll finally get a line like Ready to listen on http://localhost:8081/. If so, you've almost made it!
  • Launch a webbrowser and go to localhost:8081. You should now see the login page of TheOnionBox.
  • Launch a webbrowser on your laptop or phone (connected to the same network as the Pi) and enter the ip address of your Pi, followed by the portnumber you've defined before: http://192.168.0.1:8081 Again, you should see the login page of your OnionBox.

Voilà!! Enter the password you've define for Tor and monitor your relay in operation!

Hopefully this was at least a starting point for your journey. Let me know if you need further explanations. I'm happy to support you!

Greetings, ralph

@github-user-1

This comment has been minimized.

Copy link

commented Jan 4, 2017

Many thanks for the instructions above - I got to the point where I need to log in to the webpage, however, don't have a "password you've define for Tor". Tor is setup to use cookies (as to be used with the arm-tool). How and where would I define a password (torrc just shows an option for a hased passwd?
Any comments and hints welcome...

@github-user-1

This comment has been minimized.

Copy link

commented Jan 4, 2017

I think I have found the solution myself: one needs to issue sudo tor --hash-password mypasswd and then to copy and paste the returned hash code into the torrc file:
HashedControlPassword 16:9080CE70...
followed by
sudo service tor reload

@AnanasPfirsichSaft

This comment has been minimized.

Copy link

commented Nov 24, 2017

I do not use rasbian, but bananian. It is based on Debian Jessie (and has been discontinued). Some packages must be installed and later upgraded to make theonionbox work. Currently I only tested python2 and the package manager takes care of any dependencies. I guess the successor Debian Stretch is nicer to us ;)

Install required packages. Requires root.

    apt install python-apscheduler python-bottle python-psutil python-pysocks python-stem python-six python-requests python-configparser python-dateutil python-tzlocal python-concurrent.futures python-pip 

I my case it looks like this.

    **dpkg -l 'python-*' | grep 'ii'**
    ii  python-apscheduler        2.1.2-2         all          In-process task scheduler with Cron-like capabilities
    ii  python-bottle             0.12.7-1+deb8u2 all          fast and simple WSGI-framework for Python
    ii  python-chardet            2.3.0-1         all          universal character encoding detector for Python2
    ii  python-colorama           0.3.2-1         all          Cross-platform colored terminal text in Python - Python 2.x
    ii  python-concurrent.futures 2.2.0-1         all          backport of concurrent.futures package from Python 3.2
    ii  python-configparser       3.3.0r2-2       all          backport of the enhanced config parser introduced in Python 3.2
    ii  python-dateutil           2.2-2           all          powerful extensions to the standard datetime module
    ii  python-distlib            0.1.9-1         all          low-level components of python distutils2/packaging
    ii  python-geoip              1.3.2-1         armhf        Python bindings for the GeoIP IP-to-country resolver library
    ii  python-html5lib           0.999-3         all          HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 2)
    ii  python-minimal            2.7.9-1         armhf        minimal subset of the Python language (default version)
    ii  python-pip                1.5.6-5         all          alternative Python package installer
    ii  python-pkg-resources      5.5.1-1         all          Package Discovery and Resource Access using pkg_resources
    ii  python-psutil             2.1.1-1+b1      armhf        module providing convenience functions for managing processes
    ii  python-pysocks            1.5.0-2         all          socket-like interface for tunneling through SOCKS - Python 2.x
    ii  python-requests           2.4.3-6         all          elegant and simple HTTP library for Python2, built for human beings
    ii  python-setuptools         5.5.1-1         all          Python Distutils Enhancements
    ii  python-six                1.8.0-1         all          Python 2 and 3 compatibility library (Python 2 interface)
    ii  python-stem               1.2.2-1.1       all          Tor control library for Python
    ii  python-torctl             20130920git-2   all          Tor control library for Python
    ii  python-tz                 2012c+dfsg-0.1  all          Python version of the Olson timezone database
    ii  python-urllib3            1.9.1-3         all          HTTP library with thread-safe connection pooling for Python

Then we use pip to upgrade some packages. Otherwise you get "ImportError: cannot import name str_type" due to outdated versions. Requires root.

    pip install --upgrade six
    pip install --upgrade bottle
    pip install --upgrade stem

I my case it looks like this.

    **pip list**
    APScheduler (2.1.2)
    argparse (1.2.1)
    bottle (0.12.13)
    chardet (2.3.0)
    colorama (0.3.2)
    configparser (3.3.0r2)
    futures (2.2.0)
    GeoIP (1.3.2)
    html5lib (0.999)
    pip (1.5.6)
    psutil (2.1.1)
    PySocks (1.5.0)
    python-dateutil (2.2)
    pytz (2012c)
    requests (2.4.3)
    setuptools (5.5.1)
    six (1.11.0)
    stem (1.6.0)
    tzlocal (1.4)
    urllib3 (1.9.1)
    wsgiref (0.1.2)

At least theonionbox (since commit from Nov 23 2017) runs and delivers a page. Of course, at the moment I cannot tell if everything will work fine. I going to complain, if not...

@ralphwetzel

This comment has been minimized.

Copy link
Owner

commented Aug 19, 2018

Some of the instructions are superseded meanwhile & the README set up to cover all those aspects.

You may give me a hint if you disagree with my opinion. Until then, I'm closing this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.