Believe it or not, but it's actually a complicated question.
First of all: the key issue is not EU, but Schengen. The EU is not a borderless area.
Schengen is THEORETICALLY borderless, but in practice it is -- not always. Some Schengen states now require non-EU citizens travelling on a yacht to check in and out even when coming from/going to another Schengen state. For example, the
Netherlands requires filing a written declaration, and when you do it, they actually come to the boat to visit you, check your passport, etc.
So what do you do when you sail to a non- port of entry? Heck if I know. I sailed to Makkum,
Netherlands from Cuxhaven,
Germany last August, and did nothing, as Makkum is not a port of entry. It's probably a violation.
Some French airports, like Nice Cote d Azure, now make you go through normal passport control even if you arrive from a Schengen country. This contradicts what is written on the EU official website.
According to this:
France —
France requires any boat arriving in a French port, even from another Schengen country, to report to immigration if there are any non-EU citizens on board.
This bit is generally relevant:
"Due to the current situation with regard to the number of migrants and refugees attempting to enter Europe, a number of Schengen Area countries have re-introduced border controls. Therefore, it is advisable that cruisers now check with the official authorities when entering or leaving a country."
I think that's the best general
advice.
Being on an EU-flagged yacht exempts you from any
customs clearance when travelling between EU countries. But immigration and
customs are entirely separate and unrelated things.