In the Old Harbour of Bremerhaven the submarine Wilhelm Bauer (formerly U 2540) lies as a museum exhibit; the Verein Technikmuseum U-Boot Wilhelm Bauer cares for the boat in the immediate vicinity of the Deutsches Schifffahrtsmuseum.
The boat was built from 29 October 1944 at a shipyard in Hamburg, was launched on 13 January 1945 and commissioned on 24 February 1945. In April 1945 U 2540 was moved to Rønne on Bornholm for front-line training; after training was suspended due to fuel shortages it was relocated to Swinemünde and on 30 April made a westward return voyage. The planned scuttling on 3 May 1945 did not take place as intended: during an Allied air attack on an auxiliary vessel eight crew members were killed, while the submarine itself remained largely undamaged. On 4 May 1945 the passage continued via Rødbyhavn to Kiel and Flensburg; in the Flensburg Firth the boat was scuttled shortly after 10 a.m.
In 1957 the submarine was salvaged, made seaworthy and towed to a shipyard in Kiel. From November 1958 it served as a trials boat for the new Bundesmarine and received a twin diesel-electric propulsion system. The new diesel engines proved unsuitable because they required long preheating times; the conning tower casing was also modified. On 1 September 1960 the Bundesmarine took over the boat and named it Wilhelm Bauer. As a trials vessel (class 241) it remained in service until the end of August 1968. In 1970 it was returned to service with a civilian crew and used by the Bundesamt für Wehrtechnik und Beschaffung for tests of on-board technologies for class 206; the conning tower casing and equipment were altered again for this purpose. After an underwater collision in May 1980 the boat was taken out of service in 1980 and was permanently retired in 1982.
The Ministry of Defence put the boat up for sale; in 1983 a support committee of the Deutsches Schifffahrtsmuseum acquired the submarine, had it prepared and opened it on 27 April 1984 as a museum under the sponsorship of the Verein Technikmuseum Wilhelm Bauer. Since then the original condition of U 2540 has been largely reconstructed; the introductory exhibition was revised in 2011. Visitors enter the boat through a door cut into the hull and leave through a second door. Visible features include, among others, the folding bow planes; the original waterline is at the transition from the light to the dark grey paint, while today the boat sits higher out of the water due to the removal of the batteries. The conning tower has largely been returned to its original form; however the tower casing is a mock-up and the armament is only suggested. In the winter of 2020/21 the boat underwent a several-month shipyard stay for reconstruction and maintenance work; during this the conning tower was restored to its 1945 appearance. The work cost around €600,000.