German forces captured Lorient on June 21, 1940. The Germans needed those French bases for the ongoing Battle of the Atlantic and Kptlt. Lemp's U-30 was the first German U-boat to take use of the Lorient base on July 7, 1940. This was also the first replenishing from any French base.
At the beginning of 1943 Lorient was at its peak of its activity and there were as many as 28 U-boats at the base at the same time. As late as 1944 not everything had been completed as planned but Lorient was without doubt the largest and more intricate of all the U-boat bases in France. Of the 1,149 major U-boat overhauls in the French bases during the war, 492 were carried out in the Lorient dockyard.
Admiral Karl Dönitz and his BdU staff had moved his HQ to Paris is September, 1940. It was then moved to Lorient in November and into a requisitioned house at Kernevel, facing the Keroman bunkers. After the commando raid at Saint-Nazaire in 1942 the location was believed to be too exposed and it was moved to Paris in March 1942. Today the mansion is used by the Commanding French Admiral of the harbour Lorient.
The Keroman bunkers
Read about the very impressive Keroman bunkers in Lorient.
The importance of Lorient caused it to be heavily defended, with a large number of Flak positions and the base was declared 'Festung Lorient' (Fortress). After the allied invasion of Normany in June 1944 they spread into France and the first American forces, elements of the 4th Armoured Division, entered fighting for the outskirts of the town of Lorient on 7 August, 1944. Most of the U-boats left the Lorient base during the first 2 weeks of August with the last one to leave being U-155 on 5th September. However, the allied advance bypassed Lorient for the most past and the fortified and surroundered Lorient 15,000 man strong garrison held out under the command of General Wilhelm Fahrmbacher until May 8, 1945 when all German forces surrendered.
The 2nd flotilla was transferred to Norway but the 10th flotilla was disbanded in October when all U-boat activity ceased at Lorient. Two U-boats were found at Lorient when the base had surrendered, U-129 which had been scuttled in front of Keroman III on August 18, 1944 and U-123 inside Pen K3. The badly damaged U-129 was raised and scrapped, U-123 however was in good shape and was commissioned into the French Navy in 1947 as S-10 Blaison.
After the war
Many of the facilities at Lorient are still in use by the French Navy, including the Kernevel mansion and Keroman bunkers.
Apparently the Keroman base will be preserved as a museum. For a while it looked like it was going to be sold and scrapped but that does not seem to be the case now.