"Hamburg" remained out of service into 1920; instability in Germany during and after the Revolution of 1918–1919 culminated in the Kapp Putsch of March 1920, after which the new German navy, the "Reichsmarine", began to recommission the old vessels that it was permitted to retain under the Versailles Treaty. "Hamburg" was among those vessels, and she was recommissioned on 7 September under the command of "FK" Bernhard Bobsien. She was assigned to the "Marinestation der Nordsee" (North Sea Naval Station), becoming the flagship of "Konteradmiral" ("KAdm"—Rear Admiral) Friedrich Richter, who fell ill in November and was temporarily replaced by "Kapitän zur See" ("KzS"—Captain at Sea) Walter Hildebrand. In addition to serving as the commander of the "Marinestation", Richter, and then Hildebrand, was also the commander of II, IV, and VI Flotillas, which were tasked with clearing the minefields that had been laid in the North Sea during the war. "KAdm" Konrad Mommsen took command of the units on 2 April 1921, keeping "Hamburg" as the flagship. The cruiser visited the Shetland Islands from 13 to 17 June, the first time since the end of the war that a German vessel visited a foreign port.