Absolutely the most important aspect here is happiness in my opinion. Even as manager of you I wouldn't prefer you to be loyal. If you after many years loyal service find something better which is closer to your home and pays higher, you should try to get a contract offer. When you hold the contract in your hands, tell your old employer about the situation openly, smile at them and tell them that it was always nice to feel loyal for so many years but that you found something better you would like to follow. You have meny good reasons that every good manager will understand. In case they do not understand: it's not your problem, and it probably only is show to make you stay. You will see your managers' true self in that sitation, test him/her. Do not blame yourself for bad decisions of your former managers. It is not your fault that they waited so long to find backups for your knowhow. In the end, they might fire you if a little project is failing or some customers go down. That what counts is that you contribute to a good business case that ensures your furture income.