... or "Onion (Hidden) Service". Onser is a simple Docker image allowing you to very quickly create an Onion hidden service for the TOR network. Based on NGINX and latest Tor.
- Get Docker
- Get Tor Browser via torproject.org, via email, via twitter
git clone https://github.com/KeyWeeUsr/Onser
- Put your files into the
www
folder - Run the
run.bat
(Windows) orsource run.sh
(MacOS or GNU/Linux) - Get your .onion address:
docker exec -it $(docker ps -q) cat www/hostname
- Navigate to the .onion address in the Tor Browser
- Enjoy
You can use docker-compose.yml
to run multiple separate onion services with
multiple www
folders set via build argument www_folder
(similarly
nginx_conf
). See the default compose file.
To build and run the services you need just a single command:
docker-compose up -d
which will build the images and run the containers.
To get the .onion URLs use:
docker-compose exec one cat www/hostname
docker-compose exec two cat www/hostname
docker-compose exec three cat www/hostname
Each service has a separate volume specified in the compose file thus holds
a unique private_key
for the service.
To remove containers, volumes, images, networks use:
docker-compose down --volumes --rmi all
By default the permissions will be changed during the Docker image build this way:
-
www
folder permissions to0700
(user: rwx, group: ---, others: ---) -
the contents of the
www
folder to0644
(user: rw-, group: r--, others: r--).
To modify the permissions to your liking you can use this example:
FROM keyweeusr/onser:<tag>
USER root
# folder
RUN chmod 0123 /home/onser/www
# folder + files
RUN chmod -R 0123 /home/onser/www
USER onser
Sometimes building the Docker image fails due to importing the gpg
keys.
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: Cannot assign requested address
Made for educational purposes, in my free time, unrelated to any institution/company/subject/... I was or am in contact with.
Please do not use it for nasty crap and/or don't connect me with it if you do anyway.