- Download the plugin
- Upload the plugin to your Minecraft Server (make sure it has DiscordSRV)
- Make sure the port is open and not used
- Make sure the URL is valid
Everything is being done within Discord application's settings > OAuth2
Copy over the Client ID & Client Secret to the config. Then you would need to configure Redirects. It must be what you have in the config. An example is shown below
Note
Setting this up is optional, but recommended if you have a large player base
Tip
Having HTTPS removes the port from the URL
Some hosts already have this feature, search for "Reverse Proxy". Otherwise you would need to have a VPS/VDS or a Dedicated Server to do this. This tutorial is made for NGINX and assumes you have it installed
- Install certbot via
apt install -y certbot python3-certbot-nginx
- Make sure your domain points to the machine's IP
- Generate the certificate via
certbot certonly --nginx -d example.com
- Create a new file
/etc/nginx/sites-enabled/discordsrvoauth.conf
- Paste in the following replacing
<domain>
with your domain and<port>
with the port you are using
server {
listen 80;
server_name <domain>;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name <domain>;
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
location / {
proxy_pass http://localhost:<port>/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
- Reload NGINX via
nginx -s reload
And should be good to go, if you have any troubles make sure to join my Discord Server