Yes, I normally call them “jinja”, but I couldn’t resist the alliteration.
It seems that the old Imperial Japanese Navy had a custom of installing jinja on its ships. This was not just a kamidana, but rather a full jinja, with the kami brought from a jinja that had some connection to the ship. The Navy, and the modern Maritime Self-Defense Forces (MSDF — which are definitely not a navy), had a practice of naming ships after geographical features of Japan, which meant that a jinja connected with that feature was the normal choice. There is a group of people who are working on this connection to perform ceremonies at those jinja in memory of the people killed on the ship (because virtually every ship in the Imperial Navy had been sunk by the end of the war), and their activities are often reported in Jinja Shinpō. In the October 12th issue, however, there was a slightly unusual report.
It concerned the Yahagi, a “protected cruiser” that was launched in 1911 and came into service in 1912. It saw active service in World War I (when Japan was allied to Britain and the US), but it was decommissioned before World War II really got started. This means that it was not sunk in battle.
The memorial matsuri in this case is quite different. The crew of the Yahagi became infected with influenza during the 1918 pandemic, and the ship had to make an emergency stop in Manila harbour. There, 300 of the crew of 400 or so were bed-ridden with the disease, and 48 died. The shipboard jinja was established a couple of years later, in 1920, partly in memory of this event, and the kami was brought from Yahagi Jinja, which is on the river that the ship was named after. This appears to have been the beginning of the custom of shipboard jinja, which then spread through the fleet. (It never seems to have been official, and not all ships had a jinja. It also seems that the custom is maintained today by the MSDF.)
A special matsuri was performed this year at Yahagi Jinja to remember the sailors who died on the ship, and mark 100 years since the kami was enshrined on the ship. This was attended by the head of the group that organises these matsuri in general, and an artist who specialises in photorealistic pencil drawings of warships offered a drawing of the ship to the jinja. (He has done this for quite a lot of ships in the context of these ceremonies.)
Military connections are not uncommon in the activities of the Shinto establishment, even today. This one was particularly interesting because it is, ultimately, much more about the pandemic than it is about war.