5 gals is a good size . Heat the tank to 27 degrees C minimum ( any lower and the fish can become rather lethargic ). They don't like much water movement, so a sponge filter is the easiest way to have suitable filtration. You will need an airpump to run one .
Bettas also like plenty of soft plants and resting places. If you go with fake plants, make sure they are silk so that the betta doesn't catch his delicate fins and tear them, which often happens with hard plastic plants.
Even better than silk are live plants. Easy to keep varieties include Cabomba, Elodia, Java moss, Aponogentons, Mossballs, Java Ferns and Amazon swords. Some surface plants like Water lettuce may also encourage your betta to make bubblenests, and the long trailing roots are equally as good as substrate rooted plants for soaking up any excess nitrate in the tankwater.
When you set the tank up, make sure you cycle the filter for 4 weeks before you add the fish. The easiest way to do that is to places the sponge filter in another established tank, switch it on and leave it alone for a month. If you don't have another tank or don't know anyone who does in order to cycle by that method, then I suggest you look at the stickied topics on Fishless cycling. They can be found in the "New to the Hobby" section of the forum, at the top of the page.