Is there a way to have a free forum?

Indeed, you can run on a Pi. But also you can run on any home computer or laptop - if it has suitable specs and you can make it reachable from the Internet, that’s enough. And in a sense, it’s free - the electricity would be the main cost, if you use hardware you already own and an internet connection you already have.

(There are various ways to make your home machine reachable - Cloudflare have a free offering.)

Oh, there is an unavoidable cash cost, I think, which is that you need a domain.