"It was important to get a good start. I had to stay focused and try to stay aggressive on the return which isn't always easy," Federer said.
"It was a bit breezy and I had to be careful at times but it is good to get the first win."
Federer next plays Italy's Andreas Seppi, who beat him earlier this year at the Australian Open.
"It was a tough match. It slipped away from me," Federer said of the Australian Open loss.