PicoShare is a self-hosted file sharing platform that allows you to easily share files with other users. In this tutorial, we will guide you through the process of installing PicoShare on Ubuntu Server Latest using a few easy steps.
Before we start with the installation, make sure that you have the following prerequisites installed on your Ubuntu Server:
First, we need to make sure that Ubuntu Server is up to date by running the following commands:
sudo apt update
sudo apt upgrade
Now, we will install the required dependencies for PicoShare to work:
sudo apt install -y curl nginx mariadb-server php-fpm php-mysql unzip
Next, we will create a new database using MariaDB for PicoShare:
sudo mysql -u root -p
Enter your MariaDB root password when prompted, and then run the following commands to create a new database, user, and grant permissions:
CREATE DATABASE picoshare;
CREATE USER 'picoshare'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON picoshare.* TO 'picoshare'@'localhost';
FLUSH PRIVILEGES;
QUIT;
Make sure to replace password
with a strong password of your choice.
Download the latest version of PicoShare on your Ubuntu Server:
curl -o picoshare.zip https://downloads.pico.rocks/latest.zip
unzip picoshare.zip
sudo mv picoshare/* /var/www/html/
sudo chown -R www-data: /var/www/html/
Now, we need to configure the NGINX web server to serve PicoShare. Create a new NGINX configuration file for PicoShare:
sudo nano /etc/nginx/sites-available/picoshare
Add the following configuration:
server {
listen 80;
server_name example.com;
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.php$ {
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Make sure to replace example.com
with your domain name or IP address.
Save the file, and then create a symbolic link to enable the configuration:
sudo ln -s /etc/nginx/sites-available/picoshare /etc/nginx/sites-enabled/picoshare
Finally, restart NGINX to apply the changes:
sudo systemctl restart nginx
Next, we will configure PicoShare by editing the config.php
file:
sudo nano /var/www/html/config.php
Change the following settings:
DB_USER
: Set this to picoshare
.DB_PASSWORD
: Set this to the password you chose for the picoshare
MariaDB user in Step 3.UPLOAD_DIR
: Set this to the absolute path of the directory where you want uploaded files to be stored. For example, /var/www/html/uploads
.PICO_URL
: Set this to the URL where you will access PicoShare. For example, http://example.com
.Save the file, and then restart NGINX again:
sudo systemctl restart nginx
Now that PicoShare is installed and configured, you can access it by going to the URL you set in PICO_URL
. You can create an account, upload files, and share them with others. Congratulations, you have successfully installed PicoShare!
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!