A septic tank should be a minimum of 10 feet in distance away from the house or building that will use the septic tank.
You can place it further than 10 feet but 10 feet is the minimum distance to place a septic tank away from the house.
The leech field of the septic tank should be at least 20 feet away from the house and the septic tank should be at least 100 feet away from any water wells to prevent contamination of the well water source.