Fill a container of your choice to within ½ inch from the top with a equal mixture of compost and potting soil. Drag a line across the soil running the length of the planter with a hand trowel to make a 1-inch deep trench. In wide planters, drag a row every 6 inches.
Press the wide end of each individual onion set into the trench spaced about 3 inches apart so the sets are halfway into the soil and halfway exposed. Continue until all of your sets are planted or the rows are filled. Large storage onions should be spaced 5 inches apart, while onions you will harvest as green onions can be planted as close as every inch.
Push the soil from the sides of your rows over onto the top half of the sets to cover them. Do not pack the soil in around the sets. Move the planter to an area where the onions will be exposed to six to eight hours of direct sunlight daily.
Dampen the soil around the onions evenly with water. Only water enough to make the soil moist; never use so much that the planter is pouring water from the bottom or the soil is soggy around your sets.
Harvest green onions when the stalks are approximately ½ inch in diameter. Allow onions you want to grow for the bulbs to grow undisturbed for two to three months until you see flower heads forming at the tip of the stalks. Bend the stalks over (without breaking them) 6 inches above the soil level. Harvest the mature bulbs about a month later.