Ask coding questions

← Back to all posts
How to make a private folder
Thanatos31005 (1)

hello I'm creating a discord bot and I need my json files to be private how can I do that without upgrading

19wintersp (1142)

You have very basic options for this. The Hacker Plan's private repls are the best solution, but if you are unwilling, there are two main options:

  1. Store the data in your ".env" file
  2. Encrypt the data and store the key in your ".env" file
19wintersp (1142)

@Thanatos31005 It will depend on the programming language you're using. NodeJS has the built-in crypto library, you can use the cryptography library in Python. Both of these have encryption methods.

19wintersp (1142)

@Thanatos31005 Look into the cryptography library, and specifically the fernet module. They have code examples in their documentation.

HardikKumar1 (0)

Did you get a way out for this? @Thanatos31005


You can try encrypting the file, but I would just use an external editor

Coder100 (18118)

you cannot. The only files that are private are .env files.
To learn how to use them:

note: you cannot just rename files to .env and expect it to work!

caaaaaaaaaallum (0)

@Coder100 what would you do if replit does not allow you to use a .env file anymore