Hey there! We just recently did this. Here is what we did, and it seemed to work for us. It was a little difficult because our boy was colicky, but this made the transition easier.
1. we set up an evening ritual: warm bath with aromatherapy baby wash at 6:30. get baby dressed and swaddled in warm room with dim lighting (so he knows it's sleepy time - we used a nightlight and space heater). Bottle of breastmilk and very gentle rocking to sleep in baby's room with the lights off and "white noise" in the background. Once baby is asleep we place him in the crib
2. How we have got him to stay in his crib: after we get him dressed and swaddled (we use a sleep sack and a light blankie), we do the above steps in his room. I then place him in his crib legs and feet first, then roll the rest of his body down into his wedge (baby positioner). Once he is in the crib I keep one hand under his head, and one on his body. I keep it there for a minute, then slowly take my hand from his head. I leave my hand on his chest for another minute or two until he is out. Then I slowly walk away and shut the door almost all the way.
3. It sounds gross, but I rubbed his "puddle pad" on my body to give his crib my smell. He is a very attached baby so this helped to fool him into thinking I am there. I have also secreted breast milk and rubbed it onto his blanket before. That helps also.
4. Try to keep the house quiet for the first few months while the baby is sleeping. Then you can slowly introduce a louder sleeping environment.
This has all worked for us. Hope it helps you! Good luck!