sunlight
When it comes to energy, ecosystems are not closed. They need constant inputs of energy. Most ecosystems get energy from sunlight. A small minority get energy from chemical compounds. Unlike energy, matter is not constantly added to ecosystems. Instead, it is recycled. Water and elements such as carbon and nitrogen are used over and over again.