AMP Minecraft Sleep Mode and playit.gg

OS Name/Version: Debian 12

Product Name/Version: AMP Release “Phobos” v2.6.0.12, built 24/02/2025 17:12

Problem Description:

Just started using AMP to host a local Minecraft Java 1.21.4 Paper server (Docker enabled). My ISP puts me behind CGNAT so I can’t port forward. I’m using playit.gg with their full agent installed, not the server plugin. This works when the server is running, but when it goes into Sleep Mode players can’t wake it over the playit.gg connection. When I’m on the local network, it wakes up as expected. I acknowledge that this probably isn’t an issue with AMP itself. However, I’m just hoping to see if anyone has ideas or more details about how sleep mode works that might help troubleshoot. Ultimately it’s not a big deal to leave the server running, but it would be nice to save the resources when no one is playing.

Steps to reproduce:

  • Ensure playit is running
  • Put Minecraft Java Paper server into Sleep Mode
  • Attempt to connect and wake server via playit connection

Actions taken to resolve so far:

  • Restart everything
  • Set Sleep Mode to wake when pinged
  • I saw a post from @Ellectroid about restarting playit after the server goes to sleep, but that hasn’t worked for me.

Yeah, seen similar stuff from others. Seems that Playit’s tunnel just won’t pick it up properly.
If you’re able to port forward I’d suggest doing that and saving the headache you get from using playit.

Can’t port forward, stuck behind CGNAT unfortunately.

So I’ve been playing with it and have randomly gotten it to wake via playit.gg twice, but I have no clue why. One idea I have is to write a script that watches the playit log file and wake the server when it sees an attempted connection. A workaround for sure and the player wouldn’t get the nice “Server is waking…” message, but it would be functional at least. My question now is how to wake the server via CLI. The only thing I see in ampinstmgr is for starting the whole instance, not Minecraft specifically. I could just have it restart the whole instance, but I’d rather not. Is there some command or API that I’m not aware of to accomplish this?

Yeah AMP has a full-blown API that you can use to script all sorts of bits and bobs.
I have some of my own notes here:
https://github.com/p0t4t0sandwich/ampapi?tab=readme-ov-file#api-docs
Otherwise feel free to join the AMP discord and chat in the #development channel, there’s usually some nerd kicking around willing to bounce some ideas or lend a hand.

1 Like