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
d.js toolkit
d.js toolkit6mo ago
- 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!
treble/luna
treble/luna6mo ago
use .env files
Cykz
CykzOP6mo ago
My bot is running on a VPS and I'm using dotenv to store my token
treble/luna
treble/luna6mo ago
and dont give anyone access to your vps
Cykz
CykzOP6mo ago
only that ?
treble/luna
treble/luna6mo ago
yes if you dont give anyone access to your server, no one should be able to steal your token
Cykz
CykzOP6mo ago
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 ?
treble/luna
treble/luna6mo ago
yes
monbrey
monbrey6mo ago
Yeah this is the first change you should make
Cykz
CykzOP6mo ago
I dont know much about linux, whats the problem witht that?
monbrey
monbrey6mo ago
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
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server