How do i setup a private hidden service on localhost My question is how do i setup a private hidden service that can not be accessed by rest of the Tor network i wish to run this hidden service on my computer my reason is i want to test a program i developed that connects to the TOR network and connects to my hidden service i don't want to setup a VPS since i only need the hidden service for a few hours at most
You have two options. You can either set up a V3 onion service. This will create a 56-character url which will be nearly impossible to find on Tor unless you know the address. Directions are here.
The other method is to create your own Tor network at home. This may be a lot more work than you are looking to do but it looks like you can set this up in Docker.