Replit not saving changes to files after run

Is there a way to make my changes to file save during run time. I am making a game. It uses an sqlite file for saving your account. I found that the replit db was rather limited, but now regular users can’t crate account and save across runs because it doesn’t even save. I can’t even save it creating a file after the stop button is pressed. Is there anyway to get about this issue?

Repl link:


It should save across runs but not multiple Replit accounts. Is this not happening?

no, I dont think so. If a non-author runs the program it creates and adds to the database, no errors, but then after clicking stop, but files are reverted

1 Like

Where are you checking these files? It sounds like expected behavior. Is this what you’re doing?:

  1. Switch to an account without edit permissions
  2. Running the program, which adds things to the database
  3. Stopping the program
  4. Clicking <>
  5. Checking the database files

If so, then this is just how Replit works. Unless you make your Repl a website (which requires modifying your code a lot) or using Repl Identity (which is insecure because Replit is doing nothing about it), there is no way to have a secure DB. [1]

  1. But why? When you run a (non-website) Repl you don’t own from the cover page, Replit will automatically fork the Repl (this is known as a ghost fork). And when a Repl is forked by a user who doesn’t have edit permissions, all Secrets’ values are lost and any changes to files do not save to the original Repl. ↩︎

dang, that really sucks, if I revert it back to a replit db, will it save across runs? And does the replit db store BLOBs?

Hi @beget !
Unfortunately, ReplitDB works the same way, so all data is lost.

shoot. well then- I guess Ill try to figure out something else. Do you think that if I use an external database, it will work fine?

Depends what database you’re going to use. By the way, please mark the post you found the most helpful as the solution.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.