Archivebox might be something to look at. Open source, self hosted, made for archiving websites.
So it not only keeps track of your mass of links, you can also snapshot/archive them when you add them. So if they ever were to go down, you'd still have a copy yourself.
https://archivebox.io/
Though to be fair, I have not actually tried it out myself. I looked at it a few times but I don't personally have a need for it so. Worth taking a look at though.