.data/ folder not disappearing when sharing


Hi! It is my understanding that anything I store in the .data/ folder won’t be seen when shared, but mine isn’t disappearing when I look at the link for sharing with non-contributors in incognito mode. It’s still there for an anonymous user.

Any idea what might going on?


The .data folder will be empty if someone remixes the project but is otherwise visible.
The .env file is the one you can use to share your projects while keeping ‘secrets’. Its contents are not visible to others.


It was said that:

Is that not still true?


Hmm. So it seems if you create a ‘hidden’ file it remains in the visible in the editor. Which kind of makes sense when you first create it…

However you can then create a .gitignore to hide what you’ve created…

Refresh the UI or wait a few moments…

Delete the .gitignore and the .data directory remains hidden, the file does not.

That kind of works around the issue, for now, wonder if the default behavior changed at some point and it wasn’t noticed til now - personally I always expect files I specifically create through the editor to remain visible.


To clarify, if the file was created in the editor and is in a directory starting with ‘.’, it will wait until the container sleeps and restarts before it becomes hidden. So that would happen if you close the browser window and wait 5 min for the container to sleep due to inactivity, but you can also force a refresh event by adding/editing a .gitignore, or calling the ‘refresh’ command from the console.

As shindakun says, .env is the only file that’s truly private and shows blank values on sharing. So it’s where we recommend storing sensitive credentials. Since multi-line env vars aren’t supported, a private key would have to be on a single line (which you can use new line characters to make happen). Anything in .data isn’t copied on remix though.