Homemade mooncakes can be kept sealed for about 20 days, because they do not put preservatives in the mooncakes, so the number of days of preservation is limited. If you don't seal it and leave it out, you can only keep it for 3 to 5 days, more days than that, don't eat it, it's not cost-effective to eat a bad stomach. You can buy packaging and sealing bag mouth machine on the Internet, buy a later can be used every year.
The picture below is a mooncake I made myself.