30 gallons is a bit small. If you can, try for at least 40 or 50 (bigger tanks mean more stable tanks). And as others have said, the lighting is VERY important. The tank will also need vigorous filtration and circulation. A good suggestion is 1-2 pounds of live rock per gallon of tank capacity. A good rule of thumb for filtration is that you want to be able to turn over your entire volume at least 5-10 times per hour.
If this is your first marine tank, I'd suggest not adding coral or invertebrates just yet and get comfortable with a fish-only system.
Devin