as Alex has mentioned Betta's are best kept alone by themselves, and he is correct that others will say that they can get on ok in community tanks this is IMO true as well but REALLY depends on the other fish they need to be like the Betta as in not fast and boisterous, but slow and docile just plodding around, i have a Betta in one of my community tanks and he is doing ok but again there isn't too many other fish in that community and they are all current docile slow moving fish that don't bother the Betta or go near him.
i think Ive been lucky with this as there is the chance that he could be harassed a little by my cribs, they have had 2 spawning and when they are looking after their newborns the Betta has gone floating past them and the parents and they have not chased the Betta off (this is very very rare) the cribs have chased off other fish, i do wonder is giving of a sense of I'm no threat just floating around bimbling about don't need to worry about me.
the second i see them or any other fish give chase to the Betta if gets nr their territory hes going into a spare 60l tank which Ive already got the filter pads being prepped in the external filter for the community.
As Ive said you can get lucky but Betta's are a fish that like to be on their own.