Obtain pots with drainage holes and trays. If you are using pots without holes, make several holes in the bottom. Place a paper towel or coffee filter over the holes.
Fill the pots with a potting soil with time-released fertilizer or add one-half tablespoon of time-released fertilizer, such as 10-10-10 or 20-20-20, for each gallon of potting soil. Leave a space of about 1 inch from the top of the pots.
Bury the onion sets 1 to 2 inches deep for every inch for green onions or space the sets 2 to 3 inches apart for dry onion bulbs. An onion set is an onion seed that was planted the previous year.
Water the planted onion sets well settling them in place. Remove any water remaining in the drainage tray.
Place the pots in a location with six or more hours of sunlight, such as near a south-facing window or glass door. Onions harvested early as green onions grow in partial shade, but short-day dry onion bulbs varieties need 12 hours of lighting while long-day varieties require 14 to 16 hours of lighting. Use grow lights to supplement lighting, if needed.
Supply water to onions as needed maintaining evenly moist but not soggy soil. Allow the soil to dry slightly for dry onion bulbs when plants start to mature.
Add water soluble fertilizer, such as 10-20-10 or 8-16-8, diluted to half strength when new growth is seen on the onion plants. Continue feeding onions once or twice a month until harvested.
Harvest green onions at any time and dry onion bulbs after the leaves have dried and fallen.