Depends. If m1>>m2, then the acceleration of m1 is negligible, and we can use it as an inertial frame of reference. Or vice versa. But if m1 and m2 are comparable, you are right, and we have to use center-of-mass coordinates. In that case, r is the distance from center of mass, and either m1 or m2 is the reduced mass.
The idea behind reduced mass is that with central potential, which gravity happens to be, instead of looking at two bodies orbiting each other, you can consider bodies one at a time, and treat them as if each orbits the center-of-mass point as if it was immovable point with gravitational attraction. The strength of attraction is determined by reduced mass, which you compute to be sufficient to generate same force as in the original setup.
It's a bit messy, but for two bodies it works fine. Throw in a third body, and it goes from messy to near-impossible.
P.S. Gravitational potential works out to be exactly the same, by the way, so it doesn't matter.