The short answer: a group, a cycled tank and smooth substrate
A corydoras needs a group of its own kind, a tank that has finished cycling, soft sand or smooth gravel, gentle water flow, and sinking food. For a small group of standard-size species, a tank of around 20 gallons is a common starting point, though the right size depends on the species and how many you keep.
Group and tank size
Corydoras are social fish and do best in groups. Most guides start at six. A cory kept alone or in a pair tends to hide more and seem nervous. In a group, they are more active and easier to enjoy, and they seem to settle better with company.
Standard-size species such as the bronze and peppered corydoras are commonly kept in a tank of about 20 gallons for a small group. A larger group needs more floor space. Corydoras are only part of your stocking plan, so check how many fish in 20 gallon tank works once other fish are added.
Pygmy corydoras are much smaller. Many guides suggest a group of eight to ten for them, in a tank of about 10 gallons or more.
Substrate
When people ask do corydoras need sand substrate, the honest answer is no, not strictly. Still, fine, smooth sand is the substrate most often recommended. Corydoras sift the floor with their barbels, and rough or sharp material can damage them. Rounded gravel is a lower-risk alternative. Sharp gravel, coarse sand, and dirty substrate are the main things to avoid.
Temperature and water
The right temperature depends on the species, but many common corydoras do well at roughly 72 to 78°F (22 to 26°C). Some species prefer a little warmer or cooler water, so check the one you are buying.
Most common species tolerate a fairly wide pH range, roughly 6 to 8. Keepers often ask what ph should freshwater fish tank be, and for corydoras the honest answer is a range rather than a single number. Stable water matters more than hitting an exact figure, so change water gradually and avoid large swings in temperature or pH.
Filtration and flow
Corydoras prefer calm water. A sponge filter or a gentle hang-on-back filter works well, with the outflow directed away from the floor. A strong current across the substrate makes it hard for them to rest and feed. The tank still needs clean, well-oxygenated water, so the filter should keep up with the waste even when the flow is gentle.
Hiding places and lighting
Corydoras need open floor space to sift and feed, plus some cover. Plants, a piece of driftwood, or a few rocks give them a place to feel safe. Dim lighting or floating plants help many fish settle.
Food
Corydoras are bottom feeders, so sinking food is the core of their diet. Sinking pellets or wafers, with occasional frozen or live treats, make up the usual base. When you ask what do corydoras eat, the short answer is sinking foods with a few treats. Give only what they finish within a few minutes.
Tankmates
Corydoras are peaceful and do best with calm community fish. Avoid large or aggressive fish that could harass them or take their food. If you are unsure, check what fish can live together in community tank before you mix species.
Cycle the tank first
Add corydoras only after the tank has cycled. Many keepers learn how to fishless cycle a tank before buying any fish, since a stable, cycled tank gives delicate bottom dwellers a better start.