3.3 KiB
WebConsole
WebConsole is a Spigot plugin for Minecraft 1.14 that enables you to view your server console and manage your server from anywhere. It creates a WebSocket server in the background used by the web interface to send commands, receive your console log and manage your server.
Dont worry about privacy: all data is stored in your browser offline and your PC will connect directly to your minecraft server. No intermediary web servers, just you and your server.
Plugin installation
- Plugin download
- Filling config.yml. Port and password configuration
- SSL config If generated with keytool -genkey -keyalg RSA -validity 3650 -keystore "keystore.jks" -storepass "storepassword" -keypass "keypassword" -alias "default" -dname "CN=127.0.0.1, OU=MyOrgUnit, O=MyOrg, L=MyCity, S=MyRegion, C=MyCountry" then need to https://localhost:8080/ If generated with letsencrypt https://gist.github.com/xkr47/920ffe94f6a4c171ee59
input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with
the "auth" aka "certonly" subcommand
convert certificate chain + private key to the PKCS#12 file format
este comando pide una pass para exportar, es la storepassword
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem
convert PKCS#12 file into Java keystore format
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks
don't need the PKCS#12 file anymore
rm keystore.pkcs12
Now use "keystore.jks" as keystore in jetty with the keystore password you specfied when you ran
the "keytool" command
How it works
- How to install web interface / connect to github pages
- How to add servers
Technical information
WebSocket commands
The following tables represent how server communicates with the client(s), something like a language between them.
Websocket Server -> Client
Server communicate with all connected clients using JSON. The following table shows all possible JSON variables.
Variable | Meaning |
---|---|
status | Status code (as integer), representing response type. See listing below* |
statusDescription | Status description (as String) describing status code |
respondsTo | (Optional) Original command sent by client which triggered this response |
message | Response content |
*Status codes are listed below:
- 010: Console output.
- 200: Ok/Processed.
- 400: Unknown command.
- 401: Login required/Not logged in.
- 403: Forbidden/Unauthorised (Probably not logged in).
Client -> Websocket Server
Clients can communicate with server using commands. The following table shows existing commands.
Code | Meaning | Extra info |
---|---|---|
LOGIN (password) | Login to start communication with server | |
EXEC (command) | Run desired command in Minecraft Server | Login required |