Skip to content

TheGameSpider/TechnicSolder

Repository files navigation

TechnicSolder

License: MIT Latest Stable Version Latest Dev Version

TechnicSolder is an API that sits between a modpack repository and the Technic Launcher. It allows you to easily manage multiple modpacks in one single location.

Using Solder also means your packs will download each mod individually. This means the launcher can check MD5's against each version of a mod and if it hasn't changed, use the cached version of the mod instead. What does this mean? Small incremental updates to your modpack doesn't mean redownloading the whole thing every time!

Solder also interfaces with the Technic Platform using an API key you can generate through your account there. When Solder has this key it can directly interact with your Platform account. When creating new modpacks you will be able to import any packs you have registered in your Solder install. It will also create detailed mod lists on your Platform page! (assuming you have the respective data filled out in Solder) Neat huh?

-- Technic

TechnicSolder was originaly developed by Technic using the Laravel Framework. However, the application is difficult to install and use. Technic Solder - Solder.cf by TheGameSpider runs on pure PHP with zip and MySQL extensions and it's very easy to use. To install, you just need to install zip extension, setup MySQL database and download Solder to your server (No composer needed). And the usage is even easier! Just Drag n' Drop your mods.

Detailed Installation

Note: If you already have a working web server with mysql and zip extensions and enabled rewrite mod, you can skip to step 6.

1. Install Ubuntu Server (https://www.ubuntu.com/download/server)
2. Login to Ubuntu with credentials you set.
3. Become root Root is basically the "god account" that controls everything on the system. You should never, EVER use root to do simple tasks, unless you want your computer to be destroyed.

sudo su -

Web server installation and configuration

4. Install Prerequisites
This command installs what's known as a LAMP Stack, which includes Apache2, MariaDB, and PHP. Very useful!

apt update
apt -y install apache2 php7.2 libapache2-mod-php mariadb-server php7.2-mysql php7.2-dev zlib1g-dev libzip4 libzip-dev php7.2-zip

The above command can take a while to complete. Once done, restart apache.

service apache2 restart

We're now going to test that Apache and PHP are working together. Open up a blank file:

nano /var/www/html/index.php

and put the following text, inside:

<?php
phpinfo();

When you are finished, save and close the file. (Ctrl-X, y, Enter)
Now we can test whether our web server can correctly display content generated by a PHP script. To try this out, we just have to visit this page in our web browser. You'll need your server's public IP address. If you haven't already, and need to, remember to port forward port 80 (TCP).

curl http://icanhazip.com

Open in your web browser: http://your_server_IP_address
This page basically gives you information about your PHP Compiler. It is useful for debugging and to ensure that your settings are being applied correctly.

You probably want to remove this file after this test because it could actually give information about your server to unauthorized users. To do this, you can type

rm /var/www/html/index.php

5. Enable RewriteEngine and Configure Apache

a2enmod rewrite
cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/TechnicSolder.conf
a2ensite TechnicSolder
nano /etc/apache2/sites-enabled/TechnicSolder.conf

Add the following above the DocumentRoot line:

ServerName <yourSolderDomainHere>

Change the DocumentRoot line to:

DocumentRoot /var/www/TechnicSolder

Add this before </VirtualHost> close tag:

    DirectoryIndex index.php index.html
    <Directory /var/www/TechnicSolder>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

Save and close the file and restart Apache:

service apache2 restart

Cloning TechnicSolder repository

6. Clone TechnicSolder repository

cd /var/www/
git clone https://github.com/TheGameSpider/TechnicSolder.git TechnicSolder

Installation is complete. Now you need to configure TechnicSolder before using it.

If you are using nginx:
here is an example for nginx configuration

	location / {
        try_files   $uri $uri/ /index.php?$query_string;
        }

	location /api/ {
        try_files   $uri $uri/ /api/index.php?$query_string;
        }

    location ~* \.php$ {
            fastcgi_pass                    unix:/run/php/php7.2-fpm.sock;
            fastcgi_index                   index.php;
            fastcgi_split_path_info         ^(.+\.php)(.*)$;
            include                         fcgi.conf;
            fastcgi_param PATH_INFO         $fastcgi_path_info;
            fastcgi_param SCRIPT_FILENAME   $document_root$fastcgi_script_name;
    }

    location ~ /\.ht {
            deny all;
    }

    location ~ .*/\. {
            return 403;
    }

    error_page 403 /403.html;
    
    location ~* \.(?:ico|css|js|jpe?g|JPG|png|svg|woff)$ {
            expires 365d;
	}

Configuration

Configure MySQL

mysql

Login with your password you set earlier.
Create new user

CREATE USER 'solder'@'localhost' IDENTIFIED BY 'secret';

NOTE: By writing IDENTIFIED BY 'secret' you set your password. Dont use secret


Create database solder and grant user solder access to it.

CREATE DATABASE solder;
GRANT ALL ON solder.* TO 'solder'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Configure TechnicSolder

chown -R www-data TechnicSolder

Go to http://your_server_IP_address and fill out the form. If you followed these instructions, database name and username is solder

The final step is to set your Solder URL in Solder Configuration (In your https://technicpack.net profile)

That's it. You have successfully installed and configured TechnicSolder. It's ready to use!