My doctor prescribed nortriptyline for insomnia starting at 50mg and max dose of 150 mg at bed. I have a history of dep. And suicidal thoughts. Ok to take?

As above. If u have suicidal ideation this is serious . And u need to discuss this with u provider.
Ask yoru doc. What may or may not be safe depends on your medical condition, medical history and other medication you may be taking. If one is depressed and has suicidal thoughts, one might be on other antidepressant medicaitons, and nortiptyline is also an anitidepressant. Your history should be discussed with the prescribing doc & suggests follow up w psychiatry and clinical psychology for therapy.