API Reference
API Reference

Technic Solder is a server-side PHP application based on the Laravel Framework. Its main goal is to provide differential updates for the Technic Launcher to process. This can include any type of file. Another goal is to process file check-sums to ensure the receiver is obtaining unaltered files.

❗️

Warning:

This application is intended for experienced system administrators and is not intended to be setup on a local home computer.

📘

If you run into any issues during the setup process, check the FAQ page

Need help with Technic Solder? Pop into our Technic Development Discord chat channel!

Before You Begin

You will need to setup your server with a proper software stack. Technic recommends a LEMP stack. This stands for Linux OS, (E)Nginx web server, MySQL database server, and PHP. Here are some great guides from Digital Ocean:

🚧

No Windows Support:

Running Solder on Windows is not supported and no help will be provided. You can try, but you're on your own.

Requirements

  • Git
  • PHP >= 8.1 (8.2 recommended)
  • Unzip utility
  • Composer - https://getcomposer.org/
  • BCMath PHP extension
  • cURL PHP extension
  • Ctype PHP extension
  • Fileinfo PHP extension
  • JSON PHP extension
  • Mbstring PHP extension
  • OpenSSL PHP extension
  • PDO PHP extension
  • Redis PHP extension
  • Tokenizer PHP extension
  • XML PHP extension
  • ZIP PHP extension
  • A MySQL/MariaDB or PostgreSQL database
# This command uses the Ubuntu PHP PPA: https://launchpad.net/~ondrej/+archive/ubuntu/php
# If you're using Postgres, you'll want to replace php8.2-mysql with php8.2-pgsql
sudo apt install git unzip php8.2 php8.2-bcmath php8.2-cli php8.2-curl php8.2-fpm php8.2-mbstring php8.2-mysql php8.2-redis php8.2-xml php8.2-zip

Composer

Solder uses Composer. Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.

📘

Note:

When using the following guides, do not create your own composer.json file, or perform composer install or php composer.phar install commands. These are handled later in this Getting Started guide.

📘

Note:

Installing the program globally is recommended to ensure proper execution.

Before using Composer make sure to check for updates.

  • If you installed Composer locally:
sudo php composer.phar self-update
  • If you installed it globally:
sudo composer self-update

General Setup

You can setup Solder by cloning the GitHub repository and running a Composer command. Cloning the GitHub repository will create a folder called "TechnicSolder" in the directory where you ran the command.

🚧

Please make sure you are running the git clone command where you want to Solder directory to be located. Copying the folder can break the GitHub link that provides Solder's ability to update

git clone https://github.com/TechnicPack/TechnicSolder.git

📘

Note:

If you prefer the cloned directory to be named differently, append the name to the git command. (ex. git clone https://github.com/TechnicPack/TechnicSolder.git <folder-name>)

📘

Note:

If you prefer to test dev changes, add -b dev to the clone command. This will clone the development branch instead of the master branch.

Now, change into the TechnicSolder folder, and install the application from the root of the solder folder.

  • If you installed Composer locally:
php composer.phar install --no-dev --no-interaction
  • If you installed it globally:
composer install --no-dev --no-interaction

📘

Note:

If you cloned the development branch, you can remove the --no-dev argument to install development tools.

Configuring Solder

Now, we need to configure Solder. For that, Solder uses a .env file, which specifies your environment configuration variables. Let's create one for us:

cp .env.example .env

Open the .env file we just created in your favorite text editor.

Inside, there's a bunch of variables, some of which we'll need to change.

Variables are 1 per each line, and they have the format name=value.

Look at the table below and change the variables to configure your Solder. You should leave any variables that aren't in this table with the values they already have.

Variable nameDescription
APP_URLThe URL where Solder will be at (like https://solder.technicpack.net)
DB_CONNECTIONThe type of database you're using. For MySQL, this is "mysql". For PostgreSQL, this is "pgsql"
DB_HOSTThe IP of your database server. This is 127.0.0.1 if you're running it on the same server.
DB_PORTYour database server port. 3306 for MySQL, 5432 for PostgreSQL.
DB_DATABASEThe name of your database.
DB_USERNAMEThe username to access your database.
DB_PASSWORDThe password to access your database.
CACHE_DRIVERWhere Solder will store temporary stuff. This can be "file", and it will store stuff as files, but "redis" (and having a Redis server) is recommended.
SESSION_DRIVERSame as CACHE_DRIVER, except for PHP sessions.
REDIS_HOSTIf you're using Redis, the IP of your Redis.
REDIS_PASSWORDThe password to your Redis, if one is set.
REDIS_PORTIf you're using Redis, your Redis port.
SOLDER_REPO_LOCATIONYour Solder repo location (see below)
SOLDER_MIRROR_URLYour Solder mirror URL (see below)
SOLDER_MD5_CONNECT_TIMEOUTThe remote MD5 timeout (see below)
  • Repo location: This points to the location of your repo files either locally or remotely. If your Solder install is on the same box as your mod repository, you can fill in the absolute path to those files. This will greatly increase the speed in which md5's are calculated for your database. If your mod repository is hosted elsewhere, you can simply put the web accessible URL in for this value. Make sure to include a trailing slash in both cases.
  • Mirror URL: The mirror url is the web accessible url to your mod repository. If you are using a URL for your repo location you can just fill in the same value here.
  • Remote MD5 timeout: This is the amount of time Solder will wait before giving up trying to calculate the MD5 checksum on a remote repo location.

Your Solder needs to have an application encryption key set so it can properly function. To do this, use the following command, which will automatically set generate a key for you and set it in .env (under APP_KEY):

php artisan key:generate

Platform API Keys are now handled through the application itself. See "Configure Solder -> API Key Management"

Database Configuration

You must create a database for Solder. The default name is "solder".

Instructions for setting up a database server and creating a database aren't provided in this guide, as they vary depending on which database server you're using.

Once your database connection is setup and working, Solder has a built in migration tool that creates all of the required tables and data required to get Solder up and running.

As Solder updates and changes, you will use this command to pull in any changes made to Solder tables/data structure. You must run this command now to set up the database.

📘

"Application In Production!"

When running this command you will probably get a "Do you really wish to run this command?" prompt, because Solder is running in production mode. It's perfectly safe to answer "yes".

php artisan migrate

Web Server Configuration

Your final step is to make sure your web server is configured properly to handle traffic to Solder and its PHP files.

You should have already setup nginx (or Apache) and PHP following the guides provided above.

See the Example Web Server Configs page for examples in configuring your web server for Solder: Example Web Server configs

🚧

File Permissions

Your web server requires read access to the entire Solder folder. It also requires read & write access to the following directories:

  • "/storage"

Make sure you have the proper permissions set when before attempting to access Solder.

Reference: https://www.digitalocean.com/community/tutorials/an-introduction-to-linux-permissions

If you use HTTPS, read this

❗️

About HTTPS and load balancers

If you're using HTTPS, you'll want to make sure you set your URL in APP_URL to start with https://.

If your Solder instance is behind a load balancer that terminates TLS/SSL connections (like Cloudflare), then you will need to specify protected $proxies = '*'; in your app/Http/Middleware/TrustProxies.php file. Unfortunately, this is the only fix available since otherwise your web server won't know the request should be HTTPS and will generate mixed content issues such as Solder/Laravel generating HTTP URLs for resources.

Default Credentials

Once you have Solder configured, just access it at the URL you set it up on and log in.

The default user information is:

📘

Credentials

Email: [email protected]
Password: admin

Change this information as soon as you log in!