Yes, it is possible to self-publish an ebook for free. There are several platforms that allow authors to upload and distribute their ebooks without any upfront costs, including:
Amazon Kindle Direct Publishing (KDP)
Smashwords
Barnes & Noble Press
Google Play Books Partner Program
Apple Books