{"id":17674909,"url":"https://github.com/arnav-kr/tor-tutorial","last_synced_at":"2025-07-27T23:33:13.447Z","repository":{"id":130682759,"uuid":"491567393","full_name":"arnav-kr/tor-tutorial","owner":"arnav-kr","description":"Create and Host a dark Web Site (Tor Hidden Service)","archived":false,"fork":false,"pushed_at":"2022-10-15T02:32:21.000Z","size":30,"stargazers_count":27,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T19:27:08.713Z","etag":null,"topics":["dark-web","hacktoberfest","learn","nodejs","replit","template","tor","tor-hidden-services","tutorial"],"latest_commit_sha":null,"homepage":"https://arnav-kr.github.io/tor-tutorial","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnav-kr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T15:21:40.000Z","updated_at":"2025-05-18T06:59:43.000Z","dependencies_parsed_at":"2023-03-23T12:48:41.911Z","dependency_job_id":null,"html_url":"https://github.com/arnav-kr/tor-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/arnav-kr/tor-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnav-kr%2Ftor-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnav-kr%2Ftor-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnav-kr%2Ftor-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnav-kr%2Ftor-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnav-kr","download_url":"https://codeload.github.com/arnav-kr/tor-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnav-kr%2Ftor-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267441165,"owners_count":24087771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-web","hacktoberfest","learn","nodejs","replit","template","tor","tor-hidden-services","tutorial"],"created_at":"2024-10-24T07:09:21.541Z","updated_at":"2025-07-27T23:33:13.405Z","avatar_url":"https://github.com/arnav-kr.png","language":"JavaScript","readme":"# Tutorial: Hosting a site on Dark Web (Tor Hidden Service)\n\n[![Run On Replit](https://replit.com/badge/github/arnav-kr/tor-tutorial)](https://replit.com/github/arnav-kr/tor-tutorial)\n\n## Introduction\n\nBefore starting, lets clear some questions that might come up in your mind:\n\n1. What dark web really is 🤔?\n2. How it is different from the normal web that we use 🤔?\n3. How will I access the Dark web 🤔?\n4. Is it safe to use Dark Web 🤔?\n5. Is it legal to use Dark Web 🤔?\n6. Is it legal to host stuff on Dark Web 🤔?\n7. Do I have to buy domains for Dark Web as we do in normal web 🤔?\n8. Will it cost money to deploy 🤔?\n\n**If you already know these stuff and ready to go then you can directly skip to [Procedure 🧪](#procedure)**\n\n### Answers\n\n1. The dark web is the World Wide Web content that exists on darknets: overlay networks that use the Internet but require specific software, configurations, or authorization to access. Through the dark web, private computer networks can communicate and conduct business anonymously without divulging identifying information, such as a user's location. The dark web forms a small part of the deep web, the part of the Web not indexed by web search engines, although sometimes the term deep web is mistakenly used to refer specifically to the dark web. [[WikiPedia]](https://en.wikipedia.org/wiki/Dark_web#:~:text=The%20dark%20web,7%5D%5B2%5D%5B8%5D) (Probably Wikipedia was one of the best places for quick reliable intro 🙃)\n\n2. Dark Web is part or division of the Deep web. Usually, the ordinary web is visible to search engines etc. But the deep web is the one that isn't visible to them. And in Dark Web All the data is encrypted and you need to use special software like [tor](https://www.torproject.org/) to access the Dark Web. Dark Web Highly Focus on the user **Anonymity**.\n\n3. To access Dark Web, as I already stated you need to use special Software, and one of the famous ones is [tor](https://www.torproject.org/) that I am going to cover in this tutorial. Tor Browser is available for **Windows**, **Linux**, **macOS** and **Android**. You can download it from the official [Download Page](https://www.torproject.org/download/)\n\n4. Accessing the content on the Dark web is relatively safe. Same as using a regular browser. Just like in the regular web, don't open links or download files from unknown sources and you would be pretty safe!\n\n5. Using Tor or visiting the Dark Web is not unlawful in itself. It is of course illegal to carry out illegal acts anonymously, such as accessing child abuse images, promoting terrorism, or selling illegal items such as weapons. So make sure you don't go into them and it will be totally legal.\n\n6. As using Dark Web itself isn't illegal until you don't do bad stuff. You can host your website on the dark Web.\n\n7. No, you don't have to buy a domain for Dark Web and most don't want an identifiable domain name either because it's made for Anonymity. You will get a randomly generated 56 digit domain with `.onion` at the end to host your website.\n\n8. No, it doesn't cost any money to host a Dark Web site on tor.\n\n## Procedure 🧪\n\nLets first summarize what we will be doing here:\n\n* Create Replit Account (if you don't have one)\n* Fork My Template for deploying Node.js project to Dark Web\n* Put Your Own Code in\n* And you would have a Dark Web site up and running 🚀\n\nTo deploy our Node.js App we will be using [Replit](https://replit.com). It is a simple yet powerful online IDE. You can do a bunch of stuff in it.\n\nAnd I have Already Created a [template](https://replit.com/@arnavkr/tor) in [Replit](https://replit.com) that you will be using to host your Node.js App.\n\nFirst things first if you don't have a [Replit](https://replit.com) Account just go to https://replit.com and create one. Just log in with your GitHub and it will not take more than a few seconds.\n\nNow that you have a [Replit](https://replit.com) Account, you can fork the following repl: [https://replit.com/@arnavkr/tor](https://replit.com/@arnavkr/tor) or use this repo as template.\n\n[![Run On Replit](https://replit.com/badge/github/arnav-kr/tor-tutorial)](https://replit.com/github/arnav-kr/tor-tutorial)\n\nOn Opening the Fork you will find many files here's the directory structure:\n```\n./\n├── domain.sh\n├── index.js\n├── .torrc\n├── .replit\n├── node_modules\n├── package.json\n├── package-lock.json\n├── public\n│   └── index.html\n├── README.md\n├── replit.nix\n├── run.sh\n└── tor\n    └── hidden_service\n        ├── authorized_clients\n        ├── hostname\n        ├── hs_ed25519_public_key\n        └── hs_ed25519_secret_key\n```\n\nYou will notice that there is already a Node.js Hello World Project setup. You just need to replace the `Node.js` Specific Files with your own code, Hit the `Run` Button and it will be deployed to the Tor. And you can access your website on `Tor Browser`.\n\nBut Before you close this article, you would be wondering \"I have deployed it. But how to access it?\".\n\nTo get the domain on which you can access your deployed site, you just have to run the `domain.sh` script \n```sh\nbash domain.sh\n```\n\nor if you don't want to do so, just head on to `/tor/hidden_service/hostname` file and you will see an onion domain. Just visit that domain in Tor Browser to View your site.\n\n### Understanding Files\n#### `index.js`\n\nThis file doesn't need an introduction. You all know what it is for i.e. the entry point for the nodejs project\n\n#### `node_modules/`\n\nThis is well known! and well blamed for eating storage too.\n\n#### `package.json`\n\nConfig File for nodejs project\n\n#### `package-lock.json`\n\nThis is automatically created when you install packages.\n\n#### `public/`\n\nThis is being setup as the static hosting directory for express.js\n\n#### `README.md`\n\nContains Some further explanations about the project\n\n#### `run.sh`\n\nThis is the `bash` script that runs on clicking the `Run Button` on top. this script setups all things so you don't have to do much. Still if needed you can modify it accordingly.\n\n#### `domain.sh`\n\nThe bash script to print the `.onion` domain on which the site can be accessed.\n\n#### `.torrc`\n\nThe configuration file for Tor you can modify it accordingly if you want\n\n#### `tor`\n\nThis directory contains all the files related to the tor\n\n\u003e **IMPORTATNT NOTE:**\n\u003e \n\u003e When you run the code for the first time a directory named `hidden_service` will be created in the `/tor` directory that contains metadata about your hosted site.\n\u003e \n\u003e There are 3 files named `hostname`, `hs_ed25519_public_key`, `hs_ed25519_secret_key` that you will find in the `/tor/hidden_service` directory.\n\u003e \n\u003e `hostname` contains the domain on which your site is hosted.\n\u003e \n\u003e `hs_ed25519_public_key` is the public key that the browser use internally.\n\u003e \n\u003e **And MOST IMPORTANT `hs_ed25519_secret_key`!**\n\u003e \n\u003e **Never Expose this file to public as the name suggests its your secret key it is not to be shared to others.**\n\u003e \n\u003e **In case someone gets your private key then they can host their own content on your domain and they would have control over it. You have to then delete the contents of your `hidden_service` file and rerun the code but then your site will be at different domain and the previous domain will still be in control of the attacker**\n\u003e \n\u003e **so never ever expose that to public**\n\n#### `.replit`\n\nConfiguration file for replit usually used to configure the behaviour of the run button\n\n#### `replit.nix`\n\nThis is the `nix` config file in replit. Used to manage packages. [More Info](https://docs.replit.com/programming-ide/getting-started-nix)\n\n### Live Example\n\nI have hosted the same template on replit.\nAnd here's the link to the working example: http://l63qzrvtgmie6msklerp32oiazya3lzxaev3v54cl5nl3ob4nayeu4ad.onion/\n\n\u003e Note: You can't open this is normal browser, you have to use Tor Browser to open this\n\n\n### End Notes\n\n\u003e By default repls in replit sleeps when there is not much traffic on site. to let it not sleep you can either buy a hacker plan to use \"always on\" or use UptimeRobot to keep pinging your repl to keep it online\n\nHope you got it working. \n\nCheck the [STRUCTURE.md](https://github.com./arnav-kr/tor-tutorial/blob/main/STRUCTURE.md) for more details about files\n\nIf you come up with any issues, just open an issue at this repo.\n\n## Author\n\n[arnav-kr](https://github.com/arnav-kr)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnav-kr%2Ftor-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnav-kr%2Ftor-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnav-kr%2Ftor-tutorial/lists"}