As long as you keep the sauerkraut in a tightly sealed container in the refrigerator it will last up to 6 months and sometimes longer.
Canned sauerkraut may only last 1 or 3 months in the refrigerator and if you do not use the sauerkraut within 3 months you should freeze it as it will keep longer although freezing the sauerkraut kills the good bacteria that makes it much healthier.
I usually use the canned sauerkraut within the same day or two so it's never a problem although I've kept a can of sauerkraut for a couple months before and although it wasn't as fresh it was still safe to eat.
Canned sauerkraut usually doesn't keep as long as jarred sauerkraut does or homemade sauerkraut so you can put the canned sauerkraut into a jar with a tightly sealed lid and it should keep up to 6 months or sometimes longer in the refrigerator.