The flag was raised on the clock tower in a pared-back ceremony, with the square in front of the castle nearly empty as Poland battles a coronavirus epidemic.
The ceremony was also attended by Polish Defence Minister Mariusz Błaszczak.
Poland's Flag Day is a relatively new tradition - it was established in 2004.
People across the country were being encouraged to display a flag in front of their home, on a balcony or in their workplace, take a photo and share it on social media along with the hashtag #mojaflaga (#myflag).
In a message on Facebook, Duda said: “Let's hang out red-and-white flags, let them be an expression of our patriotism, a sense of national community… Let's be proud of our national colours. Let's be proud that we are Poles.”
As well as Flag Day, Saturday is the Day of Poles Abroad, and Polish Foreign Minister Jacek Czaputowicz has sent his best wishes to his countrymen living in other countries.
(pk)
Source: PAP