First off, make sure that he is not on the birth certificate so will have to go to court if he wants any parental rights. From everything I've read on MN this is really important as it doesn't stop you from claiming child support from him but at least in the early days will stop him or his family just swooping in and picking the baby up and not returning them for however long - you can tell the police that they have kidnapped your baby and they will have to get him back for you whereas if you have put the dad on the birth certificate then they will be able to take the baby and claim equal rights, and having possession the police won't be able to take them away and give them back to you. Likewise get the baby registered quickly if you have a name and make sure that you give them your surname rather than your ex's surname. Doesn't matter if he thinks it should have his name - you are the one with parental rights and chances you will be doing all the day to day stuff so the same surname will make life much easier.
Secondly if they contact you keep any messages as evidence that they are harassing you. Send one message to them to tell them to stop contacting you, that any further contact is harassment and you will report them to the police... and then just ignore them. However don't block them - let text messages arrive and ignore them, set your phone up so it blocks their calls (not sure if you can set them to count the number of calls though)) and if they use other phones then keep any messages or voice messages to use as evidence. Set your email up so any emails from your ex go into a folder that you check once a week so you don't constantly have to d deal with it - you can just go through the folder once a week or whatever you feel like doing and it will all be in one place for ease of giving evidence over if it's harrassing.
definitely don't let the grandparents get into any routine with your baby - while grandparents don't have any real rights per se, if they see a child a lot on a regular basis then sometimes they can argue that they are a regular part of the child's life and therefore should have some access.
on your pregnancy notes, make sure that you put a big note on it that you don't want any info passing out about you or the baby to [list of people] - and on that list put your ex, his parents, any of their siblings or friends that you know about. Don't put 'the baby's fater/GPs' on the off chance they try to use it as leverage at the time or further down the line.
Insist that you are going to breast feed the baby, even if you are not, on the basis it is best for the baby to be breast fed for the first two years of its life (according to the World Health Organisation) - because if they try to argue that they should have the baby then how can they when you are trying to feed it - because if they say no then it shows they don't have the baby's best interest at heart. Remember that it can take a while for bf to settle down and you might want to mix feed for a while, and this might be a great excuse for why you have bottles and milk gubbins at your house - but it's a great thing to be able to talk about in advance to set expectations and show that you have the baby's beset interests at heart (even if you are planning on bottle feeding - they don't have to know that!).
Talk to your midwife - they should be able to give you good advice and signpost you to appropriate services to help you deal with your ex too.
Good luck!