All media will suffer degradation over time. CDs last a long time before their metal layer starts to oxidize, but we are still only talking a couple of decade.
The best as I understand it is a hard drive. This can be external, but it has to be powered up on a regular basis. Doing this while attached to the computer helps to catch and fix errors as they occur and to fix them. It also means that the file can be kept backed up so that if a failure happens, it isn't an end of life situation for the file.