You may ask for up to 4 weeks bond and no more than 2 weeks of rent in advance.
I would recommend a tenancy agreement though with flatmate you probably don't have to. Having a contract that you draw up with your flatmate(s) is ideal to avoid future possible agreements (e.g. power bill, phone bill, damage to your house / properties etc.). Otherwise, you may use the standard form(s) or agreement(s) from the Department of Building & Housing (DBH).
Make sure you will issue written receipt(s) to your flatmate(s) when you receive any CASH payment(s) including bond. This is very IMPORTANT!! We have learned this in a hard way from an dispute with our previous tenants.
Check out the Deparment of Building & Housing website for landlords below: