It all comes down to providing them the right conditions for success. You must make sure that there are no predators in the tank. IE, worms, crabs, shrimp ETC... They need specific and stable water conditions. It is usually recommended that you have your tank up and running for at least 6 months. As stated before, some prefer to be on the rock, some on the sand. You need to decide what type you want and then research it. They do breed in captivity. They spew a large cloud that will make your whole tank cloudy. I have only heard of them spawning in large habitats.