Uguu is an easy-to-use file hosting website that allows users to upload, share and download files. In this tutorial, we will show you how to install Uguu on NixOS latest.
Before you start, make sure you have these prerequisites:
To install Uguu on NixOS latest, follow the steps outlined below:
Open your terminal and log in as the root user.
Update the system:
$ nixos-rebuild switch --upgrade
Install the required dependencies:
$ nix-env -iA nixos.gcc nixos.git nixos.nginx nixos.php nixos.php-fpm nixos.mariadb
Download the Uguu repository by running the following command:
$ git clone https://github.com/nokonoko/Uguu.git
Once the repository is cloned, navigate to the Uguu
directory:
$ cd Uguu
Copy the config.inc.php.sample
file to config.inc.php
:
$ cp config.inc.php.sample config.inc.php
Edit the config.inc.php
file with your preferred settings:
$ nano config.inc.php
Create a new database for Uguu:
CREATE DATABASE uguu;
GRANT ALL privileges ON uguu.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Import the database schema:
$ mysql -u root -p uguu < sql/uguu.sql
Start the PHP FastCGI Process Manager (FPM) service:
$ systemctl start php-fpm
Edit the Nginx server configuration file:
$ nano /etc/nixos/nginx/nginx.conf
Add the following block inside the http
block:
server {
listen 80;
server_name uguu.se;
root /path/to/Uguu;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Restart the Nginx service to apply the changes:
$ systemctl restart nginx
The server should now be running. You can access it by navigating to http://your_domain_name/
.
That's it! You have successfully installed Uguu on NixOS latest. You can now upload, share and download files through your own file hosting website. Enjoy!
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!