How to Install Technic Solder and Use It Like a Pro!

The following is based on my experience in trying to follow the instructions at Docs.Solder.io and ultimately made concise for you. I take no responsibility for any damage or distress you might cause yourself or others while following this document.

  1. Make sure you are using a fresh clean installation of Ubuntu 14.04 server 32 or 64 bit version. It will come preinstalled with a LAMP stack which is what we want as a base.
  2. Log into your server as root and do the following
    cd /root
  3. First update you apt repository
    apt-get update
  4. The Apache part is garbage for us and we are going to use something else to manage it. So let’s get rid of Apache.
    apt-get remove --purge apache*
  5. Install nano as we are going to need it.
    apt-get install nano
  6. We are going to use Vesta CP a free control panel to setup the web server.
    wget http://vestacp.com/pub/vst-install.sh
  7. Now run it
    bash vst-install.sh
  8. This wil take about 15 minutes, when it is done at the bottom will be an address similar to https://your.domain.com:8083, a user name, and a temporary password.
    We can start by going to the address given, logging in and I suggest changing the password. Change nothing else!
  9. Become admin
    su admin
  10. Now goto the following as it is where your Technic Solder will live. Whenever I say hit tab key, that what I want you to do, actually hit it and then keep typing the other stuff.
    cd ~/web/hit tab key/public_html
  11. Next we have to get Composer by using *whenever you use sudo it’ll ask for the current users password.
    sudo wget https://getcomposer.org/installer
  12. Now you have to install composer by doing
    sudo php installer
  13. Now we need to update the composer
    sudo php composer.phar self-update
  14. With that out of the we will use git to get a copy of the official Technic Solder structure and support files.
    git clone https://github.com/TechnicPack/TechnicSolder.git
  15. Now enter the Technic Solder directory
    cd TechnicSolder
  16. This part used to be different and if you follow the Getting Started guide it’ll really mess you up. We need to edit the TechnicSolder config files first. So go to that folder now with
    cd app
  17. The config directory is not yet set up. Thankfully there is an example config directory that we will copy
    cp -r config-sample config
  18. Great job so far! Now do
    cd config
  19. This comes from the initial configuration at the bottom the file at Getting Started, first we need to edit the solder.php file
    nano solder.php
  20. Find the line that has and change it to your actual path of the for facing directory and change mirror_url to the name of your webserver
            'repo_location' => '/home/admin/web/your.domain.tld/public_html/TechnicSolder/public/',
    
            /**
             * Mirror Location
             *
             * This is where the launcher will be told to search for your files. If                                                                                                                                                              your
             * repo location is already a URL you can use the same location here.
             *
             **/
            'mirror_url' => 'http://your.domain.tld/',
    
    
  21. Now you want to save these changes
    ctrl+X, Y, enter
  22. Next we need to edit app.php
    nano app.php
  23. find the line that says ‘url’ and change it’s value to the same value you used for ‘mirror_url’ on the previous instruction
            /*
            |--------------------------------------------------------------------------
            | Application URL
            |--------------------------------------------------------------------------
            |
            | This URL is used by the console to properly generate URLs when using
            | the Artisan command line tool. You should set this to the root of
            | your application so that it is used when running Artisan tasks.
            |
            */
    
            'url' => 'http://your.domain.tld/TechnicSolder/public',
    
    
  24. Save it
    ctrl+X, Y, enter
  25. Go back to the TechnicSolder folder
    cd ../..
  26. Finally we get to install TechnicSolder, seriously. Yeah. Run the following twice, it trips out on the first run, so running it again makes everything happy.
    #run this twice!
    sudo php ../composer.phar install --no-dev --no-interaction
  27. We are not done, but we are very close! This part will set up the tables. Please do both commands in sequence. The first command may kick back with blocks of red hilited words, ignore it and its output if it happens.
    php artisan migrate::install; php artisan migrate
  28. answer yes when asked
  29. We are going to set the owners and permissions, please do both commands.
  30. cd ..
    sudo chown -R admin:admin .
  31. Let’s make some symbolic links in the /home/admin folder that will make our lives easier when we next join the server. Where I say hit tab key, hit the tab key
    cd ~
    mkdir web/hit tab key/public_html/TechnicSolder/public/mods
    mkdir web/hit tab key/public_html/TechnicSolder/public/temp
    ln -s web/hit tab key/public_html/TechnicSolder/public/mods solder
    ln -s web/hit tab key/public_html/TechnicSolder/public/temp temp
  32. Congratulations! You now have Technic Solder installed on your server. Now go to http://your.domain.tld/Technic/public/ in your browser and use the following credentials. Make sure to create a new admin user with a non-admin name and to delete the existing admin account. Then log back in with the new one.
    user: admin@admin.com
    pass: admin

At this point you can resume following instructions elsewhere, however, if you do life will suck for you as the maintainer! The reason is that Technic Solder has no web interface for inputting a mod. In other words, the web interface will not download a mod. You have to either download the mod to your computer and then upload it the server in to the correct directory under /var/www/html/TechnicSolder/public/mods and it must be uploaded as a zip and further the zip must contain a very explicit internal directory structure. You might be thinking, “Jesus Christ!” while you bash your head against your desk.

I have taken all this work and nightmare away from you.

  1. Log in to your server as admin and go to the mods folder
    cd solder
  2. We are going to create a new file, it is a script, and it will make our lives so much easier than any other Technic maintainer.
    nano mkArchive.sh
  3. paste all of the following into the editor and then save it.
    #!/bin/bash
    
    # Adjust the following variables as necessary
    TEMP="/var/www/html/TechnicSolder/public/temp"
    MODS="/var/www/html/TechnicSolder/public/mods"
    WWWUSER="www-data"
    
    function isYn {
     if [ ${#1} -gt 1 ]; then
     echo "I only need one character!"
     echo "y or n"
     echo "Exiting ..."
     echo
     exit
     fi
    }
    
    function exitIfNull {
     if [ "${1}" == "" ]; then
     echo "Null response detected."
     echo "Exiting ..."
     echo
     exit
     fi
    }
    
    re='^[0-9]+$'
    if [[ "${1}" -gt 0 ]]; then
     if ! [[ ${1} =~ $re ]] ; then
     clear
     echo "error: first argument is not a valid menu choice" >&2; exit 1
     echo
     fi
    fi
    if [[ "${1}" -lt 1 || "${1}" -gt 5 ]]; then
     echo "Pack Type:"
     echo
     echo "1. Standard Mod"
     echo "2. Lite Mod"
     echo "3. Config Pack"
     echo " - You must have uploaded all configs in"
     echo " the structure required by the mod to"
     echo " the TEMP path"
     echo "4. Forge Jar"
     echo "5. Minecraft Root"
     echo " - servers.dat, options.txt etc. ..."
     echo
     read -rp "CHOICE: " CHOICE
     if [[ $CHOICE -lt 1 || $CHOICE -gt 5 ]]; then
     echo "Invalid Choice!"
     echo "Please choose a number from 1-5"
     echo "Exiting ..."
     echo
     exit
     fi
    else
     # we received the menu entry at the command line
     CHOICE="${1}"
    fi
    case $CHOICE in
     1) STRUCTURE="mods"
     TARGET="mods"
     ;;
     2) STRUCTURE="mods/1.8"
     TARGET="mods"
     ;;
     3) STRUCTURE="config"
     TARGET="config"
     ;;
     4) STRUCTURE="bin"
     TARGET="bin"
     FILENAM="modpack.jar"
     ;;
     5) STRUCTURE=""
     TARGET="*"
     ;;
    esac
    
    if [ "${2}" == "" ]; then
     # modslug not given at command line, let's get it now
     read -rp "MODSLUG=" MODSLUG
     exitIfNull "${MODSLUG}"
    else
     #THE %/ is what removes the trailing slash
     MODSLUG="${2%/}"
    fi
    
    if [ "${3}" == "" ]; then
     read -rp "VERSION=" VERSION
     exitIfNull "${VERSION}"
    else
     VERSION="${3}"
    fi
    
    if [ "${4}" == "" ]; then
     read -rp "Is mod in temp? (y/n) " LOCATION
     exitIfNull "${LOCATION}"
     isYn "${LOCATION}"
     if [ "${LOCATION}" = "n" ]; then
     read -rp "MODLINK=" MODLINK
     exitIfNull "${MODLINK}"
    
     if [ "${FILENAM}" == "" ]; then
     read -rp "Generate filename? (y/n)" GENFILE
     exitIfNull "${GENFILE}"
     isYn "${GENFILE}"
     if [[ "${GENFILE}" =~ ^(y|Y)$ ]]; then
     FILENAM="${MODSLUG}-${VERSION}.jar"
     fi
     fi
     else
     LOCATION="TEMP"
     read -rp "Is there more than one part in Temp for ${MODSLUG}? (y/n) " CHOICE
     exitIfNull "${CHOICE}"
     isYn "${CHOICE}"
     if [[ "${CHOICE}" =~ ^(y|Y)$ ]]; then
     PAT="*"
     fi
     fi
    else
     MODLINK="${4}"
     if [ "${FILENAM}" == "" ]; then
     if [ "${5}" == "" ]; then
     # no filename on command line so gen one now
     # because if we are doing this many options via
     # cli then why not!?
     FILENAM="${MODSLUG}-${VERSION}.jar"
     fi
     fi
    fi
    
    if [ "${FILENAM}" = "" ]; then
     if [ "${5}" != "" ]; then
     FILENAM="${5}"
     fi
    fi
    
    if [ "${PAT}" == "" ]; then
     if [ "${FILENAM}" == "" ]; then
     read -rp "FILENAM=" FILENAM
     exitIfNull "${FILENAM}"
     fi
    fi
    
    MODPATH="${MODSLUG}/${STRUCTURE}"
    mkdir -p "${MODPATH}" # creates the entire directory path as needed; supresses standard errors
    
    cd "${MODPATH}"
    #the mods directory should actually be empty
    rm -f *
    if [ "${LOCATION}" = "TEMP" ]; then
     if [ "${STRUCTURE}" != "" ]; then #root archive if true, leave it in temp
     if [ "${PAT}" = "*" ]; then
     mv ${TEMP}/${PAT} .
     else
     if [ -e "${TEMP}/${FILENAM}" ]; then
     mv "${TEMP}/${FILENAM}" .
     else
     echo "Error locating ..."
     echo "${TEMP}/${FILENAM}"
     echo "Exiting ..."
     exit
     fi
     fi
     fi
    else
     wget "${MODLINK}" -O "${FILENAM}"
    fi
    
    cd "${MODS}/${MODSLUG}"
    
    ZIPFILE="${MODSLUG}-${VERSION}.zip"
    if [ -e "${ZIPFILE}" ]; then
     # prevent multiple copies of a same or similar mod
     # based on the mod you are zipping for in the event
     # you are remaking the mod archive with the same
     # ZIPFILE name
     clear
     echo "You are duplicating your efforts, ${ZIPFILE} already exists!!!"
     echo "I'm not doing this, if you insist on doing this, change the version number!"
     echo "Conversely you should probably take a break!"
     exit
    fi
    
    # Zip options:
    # -r recurse into directories
    # -m move file into zipfile
    if [ "${TARGET}" == "*" ]; then
     # this is a root archive operation
     # we'll be working from the master temp folder
     # and move the completed zipfile to its proper
     # home afterwords
     if [ "${STRUCTURE}" = "" ]; then # root archive
     cd "${TEMP}"
     zip -rm "${ZIPFILE}" *
     mv "${ZIPFILE}" "${MODS}/${MODSLUG}/"
     else
     zip -rm "${ZIPFILE}" *
     fi
    else
     zip -rm "${ZIPFILE}" "${TARGET}"
    fi
    
    cd "${MODS}"
    chown -R "${WWWUSER}:${WWWUSER}" "${MODSLUG}"
    
    clear
    echo "Modslug=${MODSLUG}"
    echo "Filename=${FILENAM}"
    echo "Version=${VERSION}"
    if [ "${MODLINK}" != "" ]; then
     echo "Modlink=${MODLINK}"
     echo
     echo "./newMod.sh ${MODLINK} ${FILENAM}"
     echo
    fi
    
  4. Make it executable
    chmod a+x mkArchive.sh
  5. Make sure you Zip installed
    #on deb/ubuntu based systems
    [sudo] apt-get install zip
    
    #on redhat based systems
    sudo yum install zip
  6. The script can be executed without arguments in which case it’ll prompt for each nitty gritty detail. However, you can execute all of the arguments in a single line in the same order they appear with the menu. A typical invocation might look like
    ./mkArchive 1 modslug-name "version" downloadlink
    
    *:quotes only needed if version has spaces
    **:this is your database, your modslug-name doesn't have to match the case or the name, but it should do so closely or else you'll have a problem when you return to this later
    
  7. Sometimes you get a mod that doesn’t have a link to give the script, instead it is downloaded on your computer, in this case you will ftp to your distribution server as root. Your remote folder will be /root and there is a temp folder shortcut we made earlier, double click that or enter it, and then upload the mod you downloaded to this directory and then you would use the script on the server as
    ./mkArchive.sh 1 modslug-name "version"
    
    and at this point it will ask you if the mod is in temp and you will say yes and then it will ask you if there is more than one part and I realized a couple of days ago that is stupid, so whether or not there is more than one file just answer 'Y' and hit enter.
    
    now copy this version number to the place in the Technic Solder app where it asks for the version number. And hit "add mod", it should be added to your mod database and now you can add it to your modpack.

Let’s talk about the script some more. The first argument which is a number corresponds to the first menu you encounter when you run the script without arguments. These control how the individual things you link in or upload are configured and packaged for distribution to your clients.

  echo "Pack Type:"
  echo
  echo "1. Standard Mod"
  echo "2. Lite Mod"
  echo "3. Config Pack"
  echo "   - You must have uploaded all configs in"
  echo "     the structure required by the mod to"
  echo "     the TEMP path"
  echo "4. Forge Jar"
  echo "5. Minecraft Root"
  echo "   - servers.dat, options.txt etc. ..."
  echo

As you can see the number ‘1’ means we are building a standard mod archive. You can see that the script also provides for the other types of files you might want the users of your modpack to have. In the case of a Config Pack you will have to upload the configs to the temp folder. Don’t upload the config folder itself from your Minecraft client but instead a sub-element such as a subfolder or file that is in the config folder. When it asks for a slug I would just go with “my-config” or something along that nature and use the version section for differentiation.

./mkArchive.sh 3 my-config-pack techno-magic-1.8.9-1.2

In this way you can have multiple config packs for the various mod packs and version of your mod packs.

That ends the introduction to the script I made for us. Next we shall take a small introduction to adding a mod to our database.

  1. Log on to your Technic Solder app
  2. click on “Mod Library” on the left.
    Dashboard TechnicSolder
  3. then click on “Add a Mod”
    Dashboard TechnicSolder
  4. this will take you to a screen where you filling in the details and generate the modslug-name that we will be using with the script above. Everything should be very self-explanatory at this point.
  5. A note on “Mod Website”, you can either enter the mod author’s website or mod landing page or forum home here or perhaps your own version of the page like I have done for almost all of the mods in my pack. Just make sure if you do it the way I have done that you do not hide any of the mod distribution links behind any ad or payment gateway. You don’t want to be violating licenses and you don’t want to be getting paid for work you do not own. Don’t be a jerk.
  6. So, that mod-slug that’s what you’ll use with the script. And on the next page that comes after you hit “Add Mod”
    Create Mod TechnicSolder
    is where you’ll be entering the version number given to you by the script.

Let’s talk about the script again. You will have noticed that it generates some interesting output. Namely there is a line that begins with ./newMod.sh, this is used by your actual Minecraft server if you have one that accompanies your pack and it will only be of use if you add it to your mods directory there.

  1. Log in to your game server and change to the mods folder and the create the file using your favorite editor. The filename should be called newMod.sh
    #!/bin/bash
    if [ "$#" -lt 2 ]; then
      echo "Usage: newMod.sh  "
      exit
    fi
    
    wget "${1}" -O "${2}"
    
  2. Since we are going to use my scripts on your game server we need some new folders, assuming we are still in the mods folder
    cd ..
  3. create these directories, just execute the commands already
    mkdir disabled
    mkdir forge
  4. We’re going to need gist as it is better than pastebin and free, if you are on Ubuntu 14.04 or newer the following will work fine, else you’ll have to figure it out.
    apt-get install gist
    
    or
    
    sudo apt-get install gist
  5. Go back to the mods directory, we got a few more scripts to make
    cd mods
  6. create the file disable.sh with your favorite text editor and save it with the following code
    #!/bin/bash
    if [ $# -lt 1 ]; then
     #no arguments given, show current directory
     ls --color=auto
    else
     mv "${1}" "../disabled/"
    fi
    
  7. create the file mkreport.sh with your text editor of choice and save it with the following content. This is one of the most useful scripts for helping you to report errors that occur during server runtime. The command aguments are
    ./mkreport.sh -no-log “message to author”  use when there is no crash report
    ./mkreport.sh path_to_crash_report -l
    use when you want to see the report
    ./mkreport.sh path_to_crash_report “message to author”
    standard use 
    #!/bin/bash
    
    #cat "${1}" | pastebincl -s text -n "${2}"
    #tail ../logs/fml-server-latest.log -n 400 | pastebincl -s text -n "last 400 lines of fml-server-latest.log in regards to '${2}'"
    if [ "${1}" == "-no-log" ]
     then
     echo "Issue: {$2}"
     echo
     gist "../logs/fml-server-latest.log"
     echo
     exit
    fi
    if [ "${2}" == "-l" ]
     then
     less "${1}"
     exit
    fi
    
    echo
    echo "Issue: ${2}"
    echo
    echo "crash report: "
    gist "${1}"
    echo
    echo "fml server latest: "
    gist "../logs/fml-server-latest.log"
    echo
  8. Do the same thing for the file enable.sh. The purpose of this script is to enable a previously disabled mod. Arguments are
    ./enable.sh with no arguments will show you all the disabled mods
    ./enable.sh <mod> will enable the mod you specified
    ./enable.sh -g <pattern> will generate a menu of mods matching pattern, you then select the number matching the mod you want to enable
  9. #!/bin/bash
    if [ $# -lt 1 ]; then
     #no arguments given show disabled files by default
     ls --color=auto "../disabled/"
    else
     if [ $# -eq 2 ]; then
     if [ "${1}" == "-g" ]; then
     #grep mode, generates a menu too!
     mods=( $( ls --color=auto "../disabled" | grep "${2}") )
     mods+=('exit')
     PS3="Enable which one? "
     select enableMod in "${mods[@]}"; do
     [[ $enableMod == exit ]] && exit
     mod=$enableMod && break
     done
     fi
     else
     mod="${1}"
     fi
     if [[ $mod = *[!\ ]* ]]; then
     #the value is sane, let's do the move
     mv "../disabled/${mod}" "."
     else
     echo "I don't know what you mean!"
     fi
    fi
    
  10. create the file rawStart.sh and save it with you know what
    #!/bin/bash
    cd ..
    . rawStart.sh
    cd mods
    
  11. Now create the file upgrade.sh and save it with these lines of code
    #!/bin/bash
    if [ "$#" -ne 3 ]; then
       echo "Usage: ./upgrade.sh   "
       exit
    fi
    
    if [ ! -d "../disabled/" ]; then
      mkdir -p "../disabled/"
    fi
    
    mv "${1}" "../disabled/"
    wget "${2}" -O "${3}"
    echo "${3}" >> upgrade.session
    
  12. Now go back up one directory to create even more scripts
    cd ..
  13. This script will help us install a new forge version when forge upgrades. I call this script newForge.sh
    #!/bin/bash
    if [ "$#" -ne 1 ]; then
      echo "Usage: ./newForge.sh "
      exit
    fi
    cd ./forge
    wget "${1}"
    cd ..
    FORGE=$(basename "${1}")
    cp "./forge/${FORGE}" forge.jar
    
  14. This next script is the companion script to rawStart.sh in the mods folder and is actually the script that is run. It’s name is also called rawStart.sh
    #!/bin/bash
    
    java -Xmx2G -Dfml.doNotBackup=true -Dfml.debugClassPatchManager=true -Dfml.debugRegistryEntries=true -Djava.net.preferIPv4Stack=true -Dfml.queryResult=confirm -jar forge.jar nogui
    
  15. This next script assume you have the screen program. If you are on ubuntu you can install it with “apt-get install screen”. The screen program allows you to run a program or script in another process without leaving your current process. And should you log out, that process will continue to run. you can see running processes with “screen -ls” and you can resume them by pid or name with “screen -r <pid|name>”. The lines you need to edit in this script are at the top, this script is a wrapper and you may or may not needed depending on how you are actually running your sever. Anyhow, call this script gameStart.sh
     #!/bin/bash
     # /etc/init.d/minecraft
     # version 0.3.9 2012-08-13 (YYYY-MM-DD)
    
     ### BEGIN INIT INFO
     # Provides:   minecraft
     # Required-Start: $local_fs $remote_fs screen-cleanup
     # Required-Stop:  $local_fs $remote_fs
     # Should-Start:   $network
     # Should-Stop:    $network
     # Default-Start:  2 3 4 5
     # Default-Stop:   0 1 6
     # Short-Description:    Minecraft server
     # Description:    Starts the minecraft server
     ### END INIT INFO
    
     #Settings
     SERVICE='forge.jar'
     OPTIONS='nogui'
     USERNAME='root'
     WORLD='world_folder_name'
     MCPATH='/path/to/your/game/server/'
     BACKUPPATH='/backup/path/server_name.backup'
     MAXHEAP=4
     MINHEAP=1024
     HISTORY=1024
     CPU_COUNT=1
     INVOCATION="java -XX:-UseGCOverheadLimit -Dfml.debugClassPatchManager=true -Dfml.debugRegistryEntries=true \
     -Dfml.doNotBackup=true \
     -Djava.net.preferIPv4Stack=true -Dfml.queryResult=confirm \
     -jar $SERVICE $OPTIONS"
    
     ME=`whoami`
     as_user() {
       if [ $ME == $USERNAME ] ; then
         bash -c "$1"
       else
         su - $USERNAME -c "$1"
       fi
     }
    
     mc_start() {
       if  pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "$SERVICE is already running!"
       else
         echo "Starting $SERVICE..."
         cd $MCPATH
         as_user "cd $MCPATH && screen -h $HISTORY -dmS extreme $INVOCATION"
         sleep 7
         if pgrep -u $USERNAME -f $SERVICE > /dev/null
         then
           echo "$SERVICE is now running."
         else
           echo "Error! Could not start $SERVICE!"
         fi
       fi
     }
    
     mc_saveoff() {
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "$SERVICE is running... suspending saves"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"say SERVER BACKUP STARTING. Server going readonly...\"\015'"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"save-off\"\015'"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"save-all\"\015'"
         sync
         sleep 10
       else
         echo "$SERVICE is not running. Not suspending saves."
       fi
     }
    
     mc_saveon() {
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "$SERVICE is running... re-enabling saves"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"save-on\"\015'"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"say SERVER BACKUP ENDED. Server going read-write...\"\015'"
       else
         echo "$SERVICE is not running. Not resuming saves."
       fi
     }
    
     mc_stop() {
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "Stopping $SERVICE"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"say SERVER SHUTTING DOWN IN 10 SECONDS. Saving map...\"\015'"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"save-all\"\015'"
         sleep 10
         as_user "screen -p 0 -S extreme -X eval 'stuff \"stop\"\015'"
         sleep 7
       else
         echo "$SERVICE was not running."
       fi
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "Error! $SERVICE could not be stopped."
       else
         echo "$SERVICE is stopped."
       fi
     }
    
     mc_update() {
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         echo "$SERVICE is running! Will not start update."
       else
         as_user "cd $MCPATH && wget -q -O $MCPATH/versions http://s3.amazonaws.com/Minecraft.Download/versions/versions.json"
            snap=`awk -v linenum=3 'NR == linenum {print; exit}' "$MCPATH/versions"`
            snapVersion=`echo $snap | awk -F'\"' '{print $4}'`
            re=`awk -v linenum=4 'NR == linenum {print; exit}' "$MCPATH/versions"`
            reVersion=`echo $re | awk -F'\"' '{print $4}'`
            as_user "rm $MCPATH/versions"
            if [ "$1" == "snapshot" ]; then
            MC_SERVER_URL=http://s3.amazonaws.com/Minecraft.Download/versions/$snapVersion/minecraft_server.$snapVersion.jar
            else
            MC_SERVER_URL=http://s3.amazonaws.com/Minecraft.Download/versions/$reVersion/minecraft_server.$reVersion.jar
            fi
         as_user "cd $MCPATH && wget -q -O $MCPATH/minecraft_server.jar.update $MC_SERVER_URL"
         if [ -f $MCPATH/minecraft_server.jar.update ]
         then
           if `diff $MCPATH/$SERVICE $MCPATH/minecraft_server.jar.update >/dev/null`
           then
             echo "You are already running the latest version of $SERVICE."
           else
             as_user "mv $MCPATH/minecraft_server.jar.update $MCPATH/$SERVICE"
             echo "Minecraft successfully updated."
           fi
         else
           echo "Minecraft update could not be downloaded."
         fi
       fi
     }
    
     mc_backup() {
        mc_saveoff
    
        NOW=`date "+%Y-%m-%d_%Hh%M"`
        BACKUP_FILE="$BACKUPPATH/${WORLD}_${NOW}.tar"
        echo "Backing up minecraft world..."
        #as_user "cd $MCPATH && cp -r $WORLD $BACKUPPATH/${WORLD}_`date "+%Y.%m.%d_%H.%M"`"
        as_user "tar -C \"$MCPATH\" -cf \"$BACKUP_FILE\" $WORLD"
    
        echo "Backing up $SERVICE"
        as_user "tar -C \"$MCPATH\" -rf \"$BACKUP_FILE\" $SERVICE"
        #as_user "cp \"$MCPATH/$SERVICE\" \"$BACKUPPATH/minecraft_server_${NOW}.jar\""
    
        mc_saveon
    
        echo "Compressing backup..."
        as_user "gzip -f \"$BACKUP_FILE\""
        echo "Done."
     }
    
     mc_command() {
       command="$1";
       if pgrep -u $USERNAME -f $SERVICE > /dev/null
       then
         pre_log_len=`wc -l "$MCPATH/logs/latest.log" | awk '{print $1}'`
         echo "$SERVICE is running... executing command"
         as_user "screen -p 0 -S extreme -X eval 'stuff \"$command\"\015'"
         sleep .1 # assumes that the command will run and print to the log file in less than .1 seconds
         # print output
         tail -n $[`wc -l "$MCPATH/logs/latest.log" | awk '{print $1}'`-$pre_log_len] "$MCPATH/logs/latest.log"
       fi
     }
    
     #Start-Stop here
     case "$1" in
       start)
         mc_start
         ;;
       stop)
         mc_stop
         ;;
       restart)
         sleepDelay=5
         sleepTime=300
         while [ "$sleepTime" -gt 60 ]; do
             as_user "screen -p 0 -S extreme -X eval 'stuff \"say SERVER REBOOTING IN $sleepDelay MINUTES!\"\015'"
             echo "SERVER REBOOTING IN $sleepDelay MINUTES!"
             sleep $sleepTime
             sleepDelay=$(( $sleepDelay - 1 ))
             sleepTime=$(( $sleepDelay * 60 ))
         done
         while [ "$sleepTime" -gt 10 ]; do
             as_user "screen -p 0 -S extreme -X eval 'stuff \"say SERVER REBOOTING IN $sleepTime SECONDS!\"\015'"
             echo "SERVER REBOOTING IN $sleepTime SECONDS!"
             sleep $sleepTime
             sleepTime=$(( $sleepTime - 15 ))
         done
         mc_stop
         mc_start
         ;;
       restartNow)
         mc_stop
         mc_start
         ;;
       update)
         mc_stop
         mc_backup
         mc_update $2
         mc_start
         ;;
       backup)
         mc_backup
         ;;
       status)
         if pgrep -u $USERNAME -f $SERVICE > /dev/null
         then
           echo "$SERVICE is running."
         else
           echo "$SERVICE is not running."
         fi
         ;;
       command)
         if [ $# -gt 1 ]; then
           shift
           mc_command "$*"
         else
           echo "Must specify server command (try 'help'?)"
         fi
         ;;
    
       *)
       echo "Usage: $0 {start|stop|update|backup|status|restart|restartNow|command \"server command\"}"
       exit 1
       ;;
     esac
    
     exit 0
    

Now you have all the scripts that I have.

My distribution server and my game server run on two different machines and that might help explain some of the verbiage below if it seems at all confusing, but it shouldn’t.

What do we do when we have the mod already listed in our database and the mod author just released a new version?  Simple, we just mkArchive again as if the mod never existed, however we use the modslug-name that does exist.

So, here is a scenario that is real.

I’m logged on to my Solder server in the folder where the mods are and Just Enough Items has come out with a new version. I already have Just Enough Items, but I don’t have that new version. While I’m in the mod folder, I know that this is a standard mod so I type

./mk[tab] 1 just[tab] "new version" <paste new download link>[enter]

This will create some output and I have that ./newMod.sh line again, but I already have the old JEI in my server, so I copy the rest of that line minus the ./newMod.sh part and then in my game servers mods folder I do

./upg[tab] just[tab] <paste what I copied>[enter]

That will move the old version of the mod to the ../disabled folder and bring in the new mod with the new version attached to it.

Hint: if you copy the newline you won’t have to hit [enter]

The enable.sh and disable.sh scripts are great for when you need to quickly disable a server mod and enable a server mod. With both commands if you don’t specify an argument they will list the entire contents of the ../disabled folder. This is useful when coupled with the grep filter like when you need to find all of the botany mods that you’ve disabled so you can enable a specify one

./enable.sh | grep botany

Then once you’ve found the right version you can copy it and then do

./enable.sh <mod you chose by copying pasted here>[enter]

And then there is the rawStart.sh command which is useful because it will run your game server in the foreground process so you can use the terminals full scroll back to examine STDERR output. Useful for when a mod crashes the server. I strongly you recommend you run it from within the mods folder.

./rawStart.sh

If there is no crash you can call the server good, zip it out and place it somewhere that your followers can get it. You might want to tell your Technic Platform where it is too.

But, let’s say, a mod crashed the server, well just scroll up the terminal until you reach the topmost error, not warning, it will be at most 500 lines back, and try to understand what you are looking, you are looking for the first occurrence of something that refers to a mod that you recognize as being the possible culprit. Now scroll back down and double click the line shows the path the crash report and type

./mkr[tab] <right click> "mod you think crashed your server and the tier of your server and the build of your server, be descriptive as you possibly can"[enter]

Some lines will generate and starting with the world Issue select all of it. Then go paste this on the mod authors page in their issues section, comments section or forum, or pm them with it, but only put it where they say they’ll respond to it.

In the mean time you can use the disable.sh command to offline the mod and you might want to disable it in you modpack in your Technic Pack too. The use enable.sh to enable a version that last worked for you and then do the same for your Technic Pack too.

Once you have a stable server and and hopefully you were building your Technic pack at the same time, you’ll need to publish the Technic Pack and then try it out yourself, if it doesn’t work you’ll need to create a new build and make the tweaks based on the errors you got. I suggest making a new build, because if you don’t your people will have download all of the mods once you’ve stabilized it, when you make a new build, your people will be forced to download the changes not the entire thing.

Back to our mkArchive.sh script, when you get a new forge version make sure you are using option 4

./mkArchive 4 your-forge-slug-name forge-version-I-use-the-build <paste the forge universal direct link>[enter]

You would use this version number on your Technic App’s modlist for the same mod-slug and update your client packs likewise. The script will have outputted a line that begins with modlink, double click the part after the = and in your game servers main directory above the mods folder do

./new[tab] <paste that mod link>[enter]

Ok, that ends it for me and I sincerely hope this helps someone get a foot hold in maintaining  a Technic Solder distribution.

This should explain what I am doing in the following video:

 

  • Potatoe_Farmer

    Following this tutorial you receive an API error when you include the trailing slash on “http://domain.tld/TechnicSolder/public/api/”

    It only works when its “http://domain.tld/TechnicSolder/public/api” which doesn’t work for the technic platform, any ideas?

    • Did you follow the tutorial to the T in that you are also now using the Vesta Control Panel?