How to run your Minus server as a Tor Onion Service

  1. Create a new, empty folder called onion-service.
  2. Find your Tor Browser folder. If you have no Tor Browser folder, download https://www.torproject.org/dist/torbrowser/11.0.14/tor-browser-linux64-11.0.14_en-US.tar.xz and then unpack it. Locate the folder you just created.
  3. Inside the Tor Browser folder is a folder called Browser. Inside the Browser folder is a folder called TorBrowser. Inside the TorBrowser folder is a folder called Tor. Copy (do not move, but copy) the Tor folder to your new onion-service folder.
  4. Save the two scripts below to the onion-service folder, and mark them executable with chmod or your graphical file manager.
  5. Run start-service.sh. New folders and files will be created in your onion-service folder. The new file called hostname contains the name of your new Tor Onion Service. This will be a domain name that ends with .onion. My domain name is 7hinc6ucgvwbcjjoe44lhzzxyjptb3da6tzl33oe7ezl2qgwlrkfe6yd.onion so the URL of my Minus server is minus://7hinc6ucgvwbcjjoe44lhzzxyjptb3da6tzl33oe7ezl2qgwlrkfe6yd.onion/. Apart from reading the hostname file, you should leave these newly-created files and folders alone.

Here are the two scripts mentioned in number 4 above.

start-service.sh
````
#!/bin/sh

thisfile=readlink -e "${0}"
thisdir=dirname "${thisfile}"

chmod 700 "${thisdir}" # If this is not the permission, Tor will not run.

"${thisdir}/stop-service.sh"

printf "%s\n%s\n%s\n%s\n%s\n%s\n%s\n" "SocksPort 0" "RunAsDaemon 1" "AvoidDiskWrites 1" "DataDirectory ${thisdir}" "HiddenServiceDir ${thisdir}" "PidFile ${thisdir}/tor.pid" "HiddenServicePort 1990 127.0.0.1:1990" > "${thisdir}/torrc"
chmod 600 "${thisdir}/torrc"

env LD_LIBRARY_PATH="${thisdir}/Tor" "${thisdir}/Tor/tor" -f "${thisdir}/torrc" # start Tor

exit 0
````

stop-service.sh
````
#!/bin/sh

thisfile=readlink -e "${0}"
thisdir=dirname "${thisfile}"

if test -f "${thisdir}/tor.pid"
then
theID=cat "${thisdir}/tor.pid"
if ps ${theID} | grep "${thisdir}/Tor/tor" > /dev/null
then
kill ${theID}
fi
rm -f "${thisdir}/tor.pid"
fi

exit 0
````

Please tell me about your new Minus servers. I want to keep and publish a list of all known public Minus servers and publish it on my Minus server.

#internet #protocol #tcp #file-server #hypertext #minus #minus-protocol #tor #onion-service #minus-server

There are no comments yet.