Cookie Consent

To make this website work properly, we sometimes place small data files called ‘cookies’ on your device. All Cookies are first-party cookies and are essential for the Site to run properly

Essential Data

The Essential Data is needed to run the Site you are visiting technically. You can not deactivate them.

In order to have Prvstorage application work as expected, there are needed steps to be taken before setting up this application. Below is a "to do" list that I hope you could complete before getting to setup the actual application.
If you completed the list above you may procede to setting up the Prvstorage application.
First of all you need to setup the root directory of the application.
  • Preparing application root/directory
    • 1. Open a terminal. Right click on your desktop, and click Open in terminal. If on server version of Ubuntu just go to the next step.
    • 2. Type the following command and hit ENTER to navigate to Ubuntu server root.
      $ cd /var/www
    • 4. Type the following command and hit ENTER to take ownership of html folder/directory.
      $ sudo chown YourUbuntuUserName html
      'yourusername' is your username on Ubuntu desktop.
  • Installing ffmpeg (needed for video preview) and exiftran (needed for picture orientation)
    • 1. Open a terminal. Right click on your desktop, and click Open in terminal. If on server version of Ubuntu just go to the next step.
    • 2. Type the following command and hit ENTER to install ffmpeg & exiftran.
      $ sudo apt install -y ffmpeg exiftran
Next, you need to get the application source code. Below are several options to get the application. I strongly recommand using GIT to get the application. The main advantage of using git is the convenience when it comes to update the application.
  • There are more options to get Prvstorage application.
  • Using Git, a free and open source distributed version control system. RECOMMANDED
  • Downloading it from github.com, for those familiar with that website.
  • Downloading it from here, stable version direct from github.com.
  • Getting Prvstorage app with GIT
    • 1. Open a terminal. Right click on your desktop, and click Open in terminal. If on server version of Ubuntu just go to the next step.
    • 2. Type the following command and hit ENTER to download package information from all configured sources. You may skip this step if recently done it.
      $ sudo apt update
    • 3. Type the following command and hit ENTER to install git.
      $ sudo apt install git
    • 1. Type the following command and hit ENTER to get to html folder/directory.
      $ cd /var/www/html
    • 2. Type the following command and hit ENTER to download prvstorage using git.
      $ git clone -b stable --single-branch https://github.com/nikistag/prvstorage.git prvstorage
    • 5. Type the following command and hit ENTER if you want to rename prvstorage app directory from its default name to a much personal name. I will use "mystorage" as the new name.
      $ mv prvstorage mystorage
      Then
      $ sudo chown -R YourUbuntuUserName mystorage
    • 6. Type the following command and hit ENTER to enter the application folder.
      $ cd mystorage
    • 6. Type the following commands, one at a time and hit ENTER to give read/write permissions to server.
      $ sudo chgrp -R www-data storage bootstrap/cache
      $ sudo chmod -R ug+rwx storage bootstrap/cache
      $ sudo usermod -a -G www-data YourUbuntuUserName
Next, you need to edit .env configuration file to make initial configuration of the application.
  • Edit .env
    • 1. Type the following command and hit ENTER to get to the application folder. If still there, skip this step.
      $ cd /var/www/html/mystorage
    • 2. Type the following command and hit ENTER to get to create a .env file, with your configuration.
      $ cp .env.example .env
    • 3. Type the following command and hit ENTER to get to open .env file for editing.
      $ nano .env
      Lines marked in red are mendatory.
      Lines marked in blue are optional. Still, you should assign a mail to the application so that Prvstorage can send you mails about new users registering to your private storage or, MORE IMPORTANTLY, for sending password reset mails.
      I recommand leaving variables APP_ENV=local & APP_DEBUG=true as they are. This way you can spot and report bugs on this website.
      APP_NAME=Prvstorage
      APP_ENV=local
      APP_KEY=
      APP_DEBUG=true
      APP_URL=http://localhost

      LOG_CHANNEL=stack
      LOG_LEVEL=debug

      DB_CONNECTION=mysql
      DB_HOST=127.0.0.1
      DB_PORT=3306
      DB_DATABASE=yourMysqlDatabase
      DB_USERNAME=yourMysqlUsername
      DB_PASSWORD=yourMysqlUserPassword

      BROADCAST_DRIVER=log
      CACHE_DRIVER=file
      FILESYSTEM_DRIVER=local
      QUEUE_CONNECTION=sync
      SESSION_DRIVER=file
      SESSION_LIFETIME=120

      MEMCACHED_HOST=127.0.0.1

      REDIS_HOST=127.0.0.1
      REDIS_PASSWORD=null
      REDIS_PORT=6379

      MAIL_CONFIGURATION=null
      MAIL_MAILER=smtp
      MAIL_HOST=mailhog
      MAIL_PORT=1025
      MAIL_USERNAME=null
      MAIL_PASSWORD=null
      MAIL_ENCRYPTION=null
      MAIL_FROM_ADDRESS=null
      MAIL_FROM_NAME="${APP_NAME}"

      AWS_ACCESS_KEY_ID=
      AWS_SECRET_ACCESS_KEY=
      AWS_DEFAULT_REGION=us-east-1
      AWS_BUCKET=
      AWS_USE_PATH_STYLE_ENDPOINT=false
      PUSHER_APP_ID=
      PUSHER_APP_KEY=
      PUSHER_APP_SECRET=
      PUSHER_APP_CLUSTER=mt1
      MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
      MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
      For the blue part, if you do configure mail on application, don't forget to change:
      MAIL_CONFIGURATION=null
      to
      MAIL_CONFIGURATION=true
      and modify variables acordingly.
      MAIL_CONFIGURATION=true
      MAIL_MAILER=smtp
      MAIL_HOST=mailhog
      MAIL_PORT=1025
      MAIL_USERNAME=null
      MAIL_PASSWORD=null
      MAIL_ENCRYPTION=null
      MAIL_FROM_ADDRESS=null
      MAIL_FROM_NAME="${APP_NAME}"

      Mail is needed for passwords resets.
    • 4. Save the file (Ctrl+s) and close editor (Ctrl_x).
    • 5. Type the following command and hit ENTER to generate new application key.
      $ php artisan key:generate
    • 6. Type the following command and hit ENTER to generate database tables for application.
      $ php artisan migrate
      If you were asked a yes/no question .... just type yes and hit ENTER.
    • 7. Type the following command and hit ENTER to create symlink to public folder.
      $ php artisan storage:link
  • Configure apache server to point to the application folder
    • 1. Type the fallowing command and hit ENTER to get to the apache configuration files location.
      $ cd /etc/apache2/sites-available
      Type the fallowing command and hit ENTER to identify apache configuration files.
      $ ls -l
      There ar two configuration files:
       1. 000-default.conf for basic server
       2. default-ssl.conf for encrypted communications
      We'll try having prvstorage app working and then you may go to the next lvl and encrypt communications. There are plenty of guides on how to use SSL on Apache server but now we have other priorities.
    • 2. Type the fallowing commands and hit ENTER to make a configuration file for your website then open configuration file for edit.
      $ sudo cp 000-default.conf prvstorage.conf
      $ sudo nano prvstorage.conf
      Change line
      DocumentRoot /var/www/html
      to
      DocumentRoot /var/www/html/mystorage/public
      Where mystorage should be replaced with the name of the folder/directory of your application.
      Hit Ctrl+s followed by Ctrl+x to save and exit editor.
    • 3. Type the following commands and hit ENTER to enable prvstorage site, disable 000-default site, and restart apache server, with new configuration.
      $ sudo a2dissite 000-default.conf
      $ sudo a2ensite prvstorage.conf
      $ sudo systemctl restart apache2
    • Now that everything is set up it is time to meet Prvstorage.