Tania is an open-source farming management system that allows users to manage their farms and crops from a single platform. In this tutorial, we will show you how to install Tania on NixOS latest.
Before we proceed with the installation, ensure you have the following:
The first step is to update your system to ensure all packages are up-to-date. Run the following command:
sudo nixos-rebuild switch --upgrade
This command will download the latest version of Nixpkgs and update your system packages.
Tania requires PHP 7.3+, Composer, and MySQL as its dependencies. To install these dependencies, run the following command:
sudo nix-env -iA nixos.php \
nixos.composer \
nixos.mysql
This command will install PHP, Composer, and MySQL on your system.
To install Tania, you need to clone the repository from GitHub and pull the latest version. Run the following commands:
git clone https://github.com/Tanibox/tania-core.git
cd tania-core
sudo git pull
After pulling the latest version, run the following command to install the required dependencies:
sudo composer install
This command will install all the dependencies and required packages.
Next, you need to configure Tania by creating the .env
file. Copy the .env.sample
file and rename it to .env
. Run the following:
sudo cp .env.sample .env
Then, open the file with your preferred editor and modify the following values:
APP_NAME
APP_URL
DB_DATABASE
DB_USERNAME
DB_PASSWORD
Ensure you replace the default values with appropriate values for your server.
To create the Tania database, run the following command:
echo "CREATE DATABASE tania CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" | sudo mysql -uroot
This command will create a MySQL database named tania
.
Next, you need to execute the migration to set up the tables in the database. Run the following command:
sudo php artisan migrate
This command will create all the necessary tables in the database.
Finally, start the Tania server by running the following command:
sudo php artisan serve --host 0.0.0.0 --port 80
This command will start the Tania server and make it accessible via your server's IP address.
In this tutorial, we have shown you how to install Tania on NixOS. You can now access Tania's web interface and manage your farm operations.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!