I host Crafty Controller (docker) on my desktop, because it is faster than my server. However, I’d like it for a MC server to be always running, so I don’t need to power on my desktop for anyone to join.

Minecraft runs fine on the server, as long as there aren’t many people on, and aren’t exploring new chunks. Generating new chunks is very cpu intensive, but one person exploring can be fine and is acceptable. However, I want a way to switch the same server to run on my desktop, nice and fast.

So basically, it of the time I want MC running on my server, and then when multiple people are playing (including me) I want to be able to turn off the server, and then turn it back on at my desktop.

I use NPM for my domain and SSL, however it’d be fine if people access at serverIP:port and desktopIP:port. That is acceptable (doesn’t need to be mc.example.com, but would be nice)

Would Syncthing be the tool to use? I could use it to sync the folder of Crafty to each computer…

  • cerothem@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 个月前

    So, one thing that’s not clear here. Is the server and your desktop both at the same location? If they are I see no reason why you couldn’t just leave all the files on the server, have an NFS or Samba share then just stop it on the server and start it (over the network share) on your desktop. It would be functionally seamless, would require no effort to keep the files in sync, and would ensure your running things in the box you want.

  • LiveLM@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 个月前

    I’d love to see this seamless switching between hosts work reliably, but it seems a bit hard…
    Have you considered pre-generating the world chunks on your beefy desktop with a mod like Chunky then transferring the world over to the server?

    I’ve done this before and it works wonders on low-end devices, though it is a trade: you’re exchanging disk space for smoother performance.
    Finding the sweet spot can be a bit hard.

  • johntash@eviltoast.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 个月前

    Syncthing should work, just make sure you don’t run the server on both systems at the same time. Also make sure it finishes syncing.

    If your server is always on, you could also expose a network share and mount that on your desktop.

    For dns, you could make a simple script that changes what ip mc.domain points to. Just set the ttl to a low value to avoid waiting on dns cache to expire.