How do I use Remote Requests
FrankiMC last edited by
Hey I'm sorry if theres a Topic already made on this Topic but I am new to all this stuff and was wondering how to make a Remote Request thing to restart my server when I use the command /restart like how do I use curl to make the start.sh script to restart the server. I have looked all over the internet searching for like 3 days now but I have not found anything helpfull yet.
lukeberry99 last edited by lukeberry99
You'll need to go to your server, go to Remote Requests and then create a new OAuth Client
Make note of the secret key that you'll see at the top, as well as the server id you'll see on the Remote Requests page.
Unfortunately the API doesn't seem to support a
restartcommand, but I'll see if I can make a PR to implement one. In the meantime the following script is rather hacky but will stop and then restart the server.
You'll need to edit the script and add your IP address/domain (include http://), your server id from the Remote Requests page, your secret, and your client id.
You'll also a variable called
DELAY- this is how long the script will wait after sending the stop command before issuing the start command, 10 seconds works for on a relatively small PaperMC server but may need tinkering.
Let me know if this works for you, or if you need any help.