Use good potting soil, a container with a drain hole, and provide plenty of light. Seed-planted onions need a longer period of development than with onion sets. Plant onion seeds a half-inch deep at a rate of one to five seeds per inch. Thin seedlings after they are established. Onions can be grown in almost any type of soil as long as it has good fertility, drainage, and tilth.
Onions respond to both compost and commercial fertilizers.
A good compost or organic fertilizer will also supply the needed nutrients for onions.