best way to secure my bot's token
Hello! I want to add features that requires higher (dangerous) permission to my bot, but I'm afraid his token might be stolen by some weird guys.
I wanted to know if there is ways to store the token securely ?
12 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!use .env files
My bot is running on a VPS and I'm using dotenv to store my token
and dont give anyone access to your vps
only that ?
yes
if you dont give anyone access to your server, no one should be able to steal your token
I guess I have to work on the server access security
I connect with root user and I saw it is not the best option
and I'm using pm2 to monitor and restart my bot, is it fine ?
yes
Yeah this is the first change you should make
I dont know much about linux, whats the problem witht that?
Well, if you're worried about security you should be securing your root user first
It has complete all powerful access over your VPS
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View