Verification

How to Password Protect a Discord Server

Discord has no built-in server password: anyone with an invite can join. To password protect a Discord server, hide every channel from new members until they type a code. Security Bot's free Server Passcode verification does this. New members see only a Verify button until they enter a passcode you shared.

By Sina, Founder, Security BotUpdated 3 min read

Why Discord has no server password

Discord decides who can join with invites, not passwords. A bot can't block a join either. What a bot can control is what a new member sees. With Server Passcode, anyone without the code stays in one verification channel.

Invite settings still help. Give invites an expiry or a maximum number of uses, and delete old ones in Server Settings > Invites.

How Server Passcode works

  1. A new member joins and gets the Unverified role. They see only the verification channel.
  2. They press Verify, and a form asks for the passcode.
  3. A right code removes Unverified and adds your Verified role, if you set one.
  4. The code can also give its own role, such as Members or Guests.

Set it up in 6 steps

  1. Turn on verification

    Run it in your server as the owner or an Administrator ranked above Security Bot.

    Command: /verification enable

  2. Create the Unverified role

    Security Bot creates the role and hides every channel from it.

    Command: /verification setup_role

  3. Create the verification channel

    Only Unverified members can see it. Security Bot posts the Verify button there.

    Command: /verification setup_channel

  4. Switch the type to Server Passcode

    You can also pick the type on the dashboard's Verification page.

    Command: /verification type type:Server Passcode

  5. Add a passcode

    Codes are 6 to 64 characters. Optionally add a name, a role, an expiry, or a use limit. Write the code down first: it can't be shown again.

    Command: /verification passcode add code:your-code

  6. Share the code

    Post it only where the right people see it: a DM, a private group, or your website. Use one code per place, so you can remove one without changing the rest.

Passcode options

OptionWhat it does
NameOnly admins see it. Use it to note where you shared the code.
RoleGiven with the code. It can't be a role with moderation or admin permissions.
Expiry1 to 365 days, then the code stops working.
Use limit1 to 100,000 members, then the code stops working.

Each server can have up to 10 codes. Security Bot stores only a salted hash of each one, so nobody can read a code back, admins included.

Wrong codes and guessing

Codes ignore case and spaces at the ends, so nobody fails on a capital letter. Each wrong code is counted. After 5 failed tries in 10 minutes, the member has to wait, and your security log gets one entry.

Not a Discord password

A server passcode is a code you make up and share. Never ask members for their Discord password, and Security Bot never will.

Members who were already in the server

Turning on verification can hold back members who were there before. Run /verification verify_existing to mark everyone already in the server as verified, so only new members need the code. For one person, use /verification verify.

OptionBest forTrade-off
Server PasscodeClubs, classes, and groups that share a codeAnyone who learns the code gets in. Replace it if it leaks.
AllowlistGroups where you know every user ID (up to 5,000)Anyone not listed is removed when they join, after a DM with their user ID.
Limited invitesOne-off events and very small groupsNo check after the join.

Both Server Passcode and Allowlist are free verification types. For the full setup, see how to set up Discord verification.

Do this with Security Bot

Discord Verification Bot: Gate new members with Adaptive Verification, an image captcha, a no-click web check, one button, a passcode, or an allowlist.

Security Bot is a Discord verification bot that keeps new members behind an Unverified role until they pass. Adaptive Verification picks the check per member: low-risk accounts get straight in, others get an image captcha or a 5-second web check. When joins spike, it raises the bar on its own. Passing removes the role and can add your Verified role.

Frequently asked questions

Can you put a password on a Discord server?

Not with Discord's own settings. A bot can do it: Security Bot's Server Passcode hides every channel from new members until they type a code you share.

Is Server Passcode free?

Yes. It is one of Security Bot's six free verification types.

Can someone join without the passcode?

They can join, because Discord lets anyone with an invite in. They see only the verification channel until they enter a right code.

How many passcodes can I have?

Up to 10 per server. Each can give its own role and have its own expiry and use limit.

What if the passcode leaks?

Remove it with /verification passcode remove and add a new one. Members who already verified stay verified.

Can Security Bot see the passcode later?

No. It stores only a hash of each code, so the code can't be shown again after you add it. Keep your own copy.

How this guide was made: drafted with AI assistance, then checked against Security Bot's source code and Discord's official help articles. Spotted something out of date? Tell us in the support server.