Germany moved last month to stage two of its three-tier emergency gas plan after Russia reduced deliveries via the Nord Stream 1 pipeline -- a step before the government rations fuel consumption.
The government is appealing to citizens and companies to cut energy consumption and help the country fill its gas storage capacity by winter but cities are also considering measures if gas runs out.
"In an acute gas shortage, warm water could only be made available at certain times of the day in an emergency," Hamburg Senator for the Environment Jens Kerstan was quoted as saying by Welt am Sonntag newspaper on Saturday.
Kerstan said the city could also consider a general reduction of the maximum room temperature in the district's heating network.
According to the federal emergency plan, households and critical institutions such as hospitals will be prioritised over industry in the third stage but that might not be possible everywhere in Hamburg for technical reasons.
"It will not be possible everywhere to differentiate between commercial and private customers in the event of a gas shortage," Kerstan added.
As Germany rushes to find alternative gas routes and supplies with LNG as a possibility, the senator warned that a temporary liquefied natural gas (LNG) terminal in Hamburg would not be operational until mid next year at the earliest.
"In the course of July we will know whether and at which location a temporary LNG terminal in Hamburg is feasible," he said.
Germany's first two temporary LNG terminals in Wilhelmshaven and Brunsbuettel should be put into operation at the end of this year, the newspaper reported, citing the economy ministry.