BERLIN — It will not be easy to run a national railroad on renewable energy like wind, hydro and solar power, but that is what Deutsche Bahn of Germany aims to do, for one simple reason: It is what consumers want.

Deutsche Bahn says it wants to raise the percentage of wind, hydro and solar energy used in powering its trains from 20 percent now to 28 percent in 2014 and to become carbon-free by 2050 — targets that exceed the German government’s already ambitious national goals.

“Consumers in Germany have made it clear they want us all to get away from nuclear energy and to more renewable energy,” said Hans-Jürgen Witschke, chief executive of Deutsche Bahn Energie, which supplies electricity for trains in Germany.

“It’s what customers want, and we’re making it happen,” Mr. Witschke said in an interview. “The demand for green electricity keeps rising each year, and that’ll continue.”