The biggest issue a ceiling fan presents occurs with tall people or high-standing beds. No one wants to hit their head on the fan. You typically place the ceiling fan at the center of a room. However, odd- shaped rooms or odd layouts change your options for the location. The best location will be centered on the bed at the foot of the bed. The location provides air flow for sleeping while producing air flow for the remainder of the room. For high beds, such as a canopy or bunk bed, center the ceiling fan on a path around the bed while keeping the blades an arm's length from the top of the bed. Most ceiling fans have the option to use a drop-down neck to lower the fan or to mount it flush with the ceiling. Mount your ceiling fans flush with the ceiling to increase head room.
Ceiling mounting requires you to use an electrical box. You have two main options; metal and plastic boxes that mount directly to the stud with nails or screws and hanging boxes that mount between studs. Hanging boxes use a metal bar that bolts to or screws into two adjacent studs. The electrical box is bolted directly to the hanging bar and comes as an adjustable sliding hanger where the box slides along the bar or a stationary hanger (centered between the studs). Use the adjustable hanging box if the location you chose for the ceiling fan falls between studs.
Placing a heavy-duty bar hanger with a bolt-on box in the ceiling provides greater stability for the fan. Most hanging boxes or stud mounted boxes flex, causing the ceiling fan to appear to bounce when operating. A heavy-duty bar hanger acts like a stud allowing for less flexing. Use a metal box that bolts to the hanger for increased stability.