Remove the front rail assembly from the crib. Insert the Allen key into each of the four bolts and turn counter-clockwise to loosen the bolts. Because you will be re-installing the crib legs, you do not need to fully remove the bolts from the side panels.
Use the Allen key to remove the legs from the front rail assembly. Each leg is held in place by one bolt along the top rail and another near the bottom of the rail assembly.
Remove the metal stabilizer pins that connected the front rail to the legs. These will be easy to remove if you grab them with a pliers and gently pull them out.
Install the legs to the side rails of the crib. Line up the metal pins to the holes in the side rail and gently push on the legs to hold them in place. Tighten the Allen bolts by turning the Allen key clockwise.