Skip to content

Server Setup

Install and Setup Crafty Controller 4 (on Proxmox LXC)

  1. My Server runs on a Proxmox Ubuntu LXC Container

  2. Install Crafty Controller 4 according to the official Guide

Here is the TLDR Version of this Guide

  • Automated Install Script (Quick)

    Please ensure your distro's packages are up-to-date and Git is present before installing Crafty:

    sudo apt update && sudo apt upgrade && sudo apt install git
    

    One line installer

    git clone https://gitlab.com/crafty-controller/crafty-installer-4.0.git && \ 
    cd crafty-installer-4.0 && \ 
    sudo ./install_crafty.sh
    

    Once installation is complete to run Crafty manually run the following. Note that if you used a directory other then the default to install Crafty you will need to cd into that directory.

    sudo su crafty
    
    cd /var/opt/minecraft/crafty
    
    ./run_crafty.sh
    

    Info

    If you said yes to adding a service file you may run the following to start Crafty

    sudo systemctl start crafty`
    

    If you added a service file and want to have Crafty start automatically on system boot please run the following:

    sudo systemctl enable crafty`
    
  • now you should be able to access the Crafty Controller via https://YOUR_SERVER_IP:8443

    Default Login

    Username: admin
    Password: crafty

Create your Servers in Crafty Controller 4

  • I used this Guide to create my Better MineCraft 4 Server

    • Basically it is this
      • Create a Forge Server
    • Fill out all the necessary details
    • mc_server_create_new_server.png
      • Modded
      • forge
      • Server Version (Check the one needed from you Modpack)
      • Set the Memory (4/16 seems to work just fine)
      • Set the Server Port
      • Build Server!
    • Download the Modpack you want from Curse-Forge make sure download the Server Pack, not the regular one download_serverpack.png
    • Upload the ZIP File * mc_server_upload_zip.png

      Tip

      you might run in to the issue that it isnt uploading, that means you need to adjust the streamsize in here to 10GB or 100GB (if it is bigger the 1GB):

      location of config.json
      sudo nano /var/opt/minecraft/crafty/crafty-4/app/config/config.json
      

      Alt text

      If it didn't work

      If this didn't worked you can also use WinSCP.
      For this to work, you need to be able to login as crafty user, otherwise the permissions don't work
      Login via SSH as root, then type:

          sudo passwd crafty
      
      set a new password and use this to login to WinSCP Alt text After this, you can just add the unzipped files from the downloaded server .zip file to the server directly
      (not the .zip folder, just the files in the folder)
      If it askes you if it should override the data, you can say yes

    • when it autorefreshed and for that matter uploaded, Rightclick to extract

    • Adjust the server.properties, whitelist.json and ops.json (or do it ingame afterwords)
    server.properties
    #Minecraft server properties
    #Tue Dec 12 03:04:02 CET 2023
    allow-flight=false
    allow-nether=true
    broadcast-console-to-ops=false
    broadcast-rcon-to-ops=false
    difficulty=normal
    enable-command-block=false
    enable-jmx-monitoring=false
    enable-query=false
    enable-rcon=false
    enable-status=true
    enforce-secure-profile=true
    enforce-whitelist=true
    entity-broadcast-range-percentage=100
    force-gamemode=false
    function-permission-level=2
    gamemode=survival
    generate-structures=true
    generator-settings={}
    hardcore=false
    hide-online-players=false
    initial-disabled-packs=
    initial-enabled-packs=vanilla
    level-name=world
    level-seed=
    level-type=minecraft\:normal
    max-chained-neighbor-updates=1000000
    max-players=4
    max-tick-time=60000
    max-world-size=29999984
    motd=-\=GSB Better Minecraft 4 Server\=-
    network-compression-threshold=256
    online-mode=true
    op-permission-level=4
    player-idle-timeout=0
    prevent-proxy-connections=false
    pvp=false
    query.port=25565
    rate-limit=0
    rcon.password=
    rcon.port=25575
    require-resource-pack=false
    resource-pack=
    resource-pack-prompt=
    resource-pack-sha1=
    server-ip=192.168.1.114
    server-port=25567
    simulation-distance=15
    spawn-animals=true
    spawn-monsters=true
    spawn-npcs=true
    spawn-protection=0
    sync-chunk-writes=true
    text-filtering-config=
    use-native-transport=true
    view-distance=15
    white-list=true
    
    • Adjust the configs with the right
    • IP
    • Port
    • Autostart
    • Crash Detection and
    • Show on Public Status Page toggle mc_server_config

    • Go to Backups and set, how the Server gets backed up and how many Backups it keeps

      mc_server_backup_settings.png

    • and then Sheduale a Backup (i also added some Warning Messages before)

      schedule_mc_server_backup.png

    Warning

    Make sure you have the proper server.properties ( Link) added before you start your server.
    If the IP in this file (most of the times it should be server-ip=192.168.X.X) is not set correctly definied, it throws an error and won't start the server.

    • Now go to the Terminal in Crafty Control, add your player to the whitelist with whitelist add <Playername> and Start the Server

Make Server Accessible from outside

  • Cloudflare DDNS Updater (Docker)

    My current docker-compose.yaml
    version: "3"
    services:
    cloudflare-ddns-updater:
        image: favonia/cloudflare-ddns:latest
        network_mode: host
        cap_add:
        - SETUID # Leave this alone, as is
        - SETGID # Leave this alone, as is
        cap_drop:
        - all
        read_only: true
        security_opt:
        - no-new-privileges:true
        environment:
        - PUID=1000
        - PGID=1000
        - CF_API_TOKEN=${CF_API_TOKEN} # (1)!
        - DOMAINS=${DOMAINS} # (2)!
        - PROXIED=true
        - IP6_PROVIDER=none
        restart: unless-stopped
    

    1. The value of CF_API_TOKEN should be an API token (not an API key), which can be obtained from the API Tokens page.
      Use the Edit zone DNS template to create and copy a token into the environment file.
      (The less secure API key authentication is deliberately not supported.)
    2. Example:
      yourdomain.com, *.yourdomain.com`   
      
      or in the .env file
      DOMAINS=yourdomain.com, *.yourdomain.com
      
  • This will then create the A-Record for you and keeps it up to date Alt text

  • CNAME bmc (Proxied) Alt text

  • SRV Alt text