How to run your Minus server as a Tor Onion Service
- Create a new, empty folder called
onion-service
. - 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.
- Inside the Tor Browser folder is a folder called
Browser
. Inside theBrowser
folder is a folder calledTorBrowser
. Inside theTorBrowser
folder is a folder calledTor
. Copy (do not move, but copy) theTor
folder to your newonion-service
folder. - Save the two scripts below to the
onion-service
folder, and mark them executable withchmod
or your graphical file manager. - Run
start-service.sh
. New folders and files will be created in youronion-service
folder. The new file calledhostname
contains the name of your new Tor Onion Service. This will be a domain name that ends with.onion
. My domain name is7hinc6ucgvwbcjjoe44lhzzxyjptb3da6tzl33oe7ezl2qgwlrkfe6yd.onion
so the URL of my Minus server isminus://7hinc6ucgvwbcjjoe44lhzzxyjptb3da6tzl33oe7ezl2qgwlrkfe6yd.onion/
. Apart from reading thehostname
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