63 lines
2.6 KiB
Markdown
63 lines
2.6 KiB
Markdown
Minecraft Server Invites [mc.gmem.ca](https://mc.gmem.ca)
|
|
===
|
|
|
|
**Generate Discord-like invites for your Minecraft server**
|
|
|
|
**Demo: [mc.gmem.ca/invite/7BALG9qo](https://mc.gmem.ca/invite/7BALG9qo)**
|
|
|
|
![Homepage screenshot](homepage.png)
|
|
|
|
_Looking for the frontend? See here: [~gmem/minecraft-server-invites-frontend](https://git.sr.ht/~gmem/minecraft-server-invites-frontend)_
|
|
|
|
## About
|
|
|
|
Sometimes you want to allow people to play on your Minecraft server, but you don't necessarily want to
|
|
go through the whole process of asking for their username, then manually sending the command to add them
|
|
to the whitelist*. Instead, this application offers the ability to generate a short link that directs
|
|
a user through an OAuth flow to automatically fetch their Minecraft account (assuming the account has been
|
|
migrated - I have no plans at this time to support non-migrated accounts, despite how I may personally feel
|
|
about them) and send a command over RCON to your server to add them to the whitelist. It will then give them
|
|
the address to connect to the server.
|
|
|
|
This is currently hosted at [mc.gmem.ca](https://mc.gmem.ca) while being developed. It's free for the time being,
|
|
and while I do want to eventually monetize this hosted version, you are more than welcome to either use the hosted
|
|
version or host your own instance (this is actually recommended if you have the ability, since it allows you to
|
|
keep RCON private). I do happily [accept donations](https://www.buymeacoffee.com/gmem) to keep running the public
|
|
hosted version!
|
|
|
|
*while the term "whitelist" is by and large being replaced in places, this is still the term Minecraft servers
|
|
utilise, and is therefore the term used in this application. Should it be changed, use of the term here will
|
|
also be changed.
|
|
|
|
## Building
|
|
|
|
```shell
|
|
# Docker
|
|
docker build . -t whitelistmanager
|
|
# Non-docker
|
|
go build -o wlm -ldflags "-s -w" cmd/wlm/*.go
|
|
```
|
|
|
|
## Running
|
|
|
|
This project aims to be as dependency free as possible. The SQLite database will be automatically
|
|
created on first run.
|
|
|
|
[You will need to generate the keys for the Microsoft OAuth flow by following this guide](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app).
|
|
|
|
The keys can then be saved to environment variables as follows:
|
|
|
|
```shell
|
|
AZURE_OAUTH_CLIENT_ID=<client id>
|
|
AZURE_OAUTH_CLIENT_SECRET=<client secret>
|
|
AZURE_OAUTH_CLIENT_SECRET_ID=<client secret id> # technically unused at the moment
|
|
```
|
|
|
|
```shell
|
|
# Docker
|
|
docker run whitelistmanager
|
|
# Non-docker, built binary
|
|
./wlm
|
|
# Non-docker, non-built
|
|
go run ./...
|
|
``` |