#best way to secure my bot's token

17 messages · Page 1 of 1 (latest)

pine geyser
#

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 ?

green groveBOT
#
  • What's your exact discord.js npm list discord.js and node node -v version?
  • Not a discord.js issue? Check out #1081585952654360687.
  • 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!
lament dawn
#

use .env files

pine geyser
#

My bot is running on a VPS and I'm using dotenv to store my token

lament dawn
#

and dont give anyone access to your vps

pine geyser
#

only that ?

lament dawn
#

yes

#

if you dont give anyone access to your server, no one should be able to steal your token

pine geyser
#

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

pine geyser
lament dawn
#

yes

wintry barn
pine geyser
wintry barn
#

Well, if you're worried about security you should be securing your root user first

#

It has complete all powerful access over your VPS

shadow narwhal
#

Make a separate regular user with only basic permissions