How to Install Cloudbox on FreeBSD Latest

Cloudbox is a self-hosted cloud media server that allows you to store and stream your media library to all your devices. In this tutorial, we will guide you through the process of installing Cloudbox on FreeBSD Latest using the command line.

Prerequisites

Before we begin, it is important to note that this tutorial assumes you have already set up a FreeBSD Latest machine with a user with sudo privileges. If you haven't, follow our FreeBSD Latest installation guide.

Step 1: Install Required Dependencies

The first step is to install the required dependencies for Cloudbox. We will start by updating the package database and upgrading the system:

sudo pkg update && sudo pkg upgrade

Next, we need to install the Apache web server, PHP and the required PHP modules, ffmpeg and mediainfo:

sudo pkg install apache24 php74 php74-extensions php74-mysqli php74-curl php74-json ffmpeg mediainfo

Step 2: Install Cloudbox

Now that we have the dependencies installed, we can proceed with the Cloudbox installation. Start by cloning the Cloudbox repository:

git clone https://github.com/cloudbox/cloudbox

Once you have cloned the repository, navigate to the Cloudbox directory and run the Cloudbox installation script:

cd cloudbox
sudo ./cloudbox setup

The installation script will ask you to enter some information, such as your preferred domain name and path, the root path where you want all your media stored, and the username and password you want to use to access your cloud media server. Follow the prompts and provide the required information to complete the installation.

Step 3: Configure Apache

After the Cloudbox installation is complete, we need to configure Apache to serve the Cloudbox files. Start by creating a new Apache configuration file for Cloudbox:

sudo nano /usr/local/etc/apache24/Includes/cloudbox.conf

Add the following lines to the file:

<VirtualHost *:80>
    ServerName your_cloudbox_domain_name
    DocumentRoot /usr/local/www/cloudbox/public
    <Directory /usr/local/www/cloudbox/public>
        AllowOverride All
        Require all granted
    </Directory>
    ErrorLog "/var/log/cloudbox-error.log"
    CustomLog "/var/log/cloudbox-access.log" combined
</VirtualHost>

Make sure to replace your_cloudbox_domain_name with your own domain name. Save and exit the file.

Next, we need to enable Apache modules and restart the Apache service:

sudo echo "LoadModule rewrite_module libexec/apache24/mod_rewrite.so" >> /usr/local/etc/apache24/httpd.conf
sudo echo "LoadModule php7_module        libexec/apache24/libphp7.so" >> /usr/local/etc/apache24/httpd.conf
sudo service apache24 restart

Step 4: Test Cloudbox

With the Apache configuration complete, we are ready to test our Cloudbox installation. Open your web browser and navigate to your Cloudbox domain name. You should see the Cloudbox login page.

Enter the username and password you created during the Cloudbox installation, and you should be able to access your media library.

Conclusion

Congratulations! You have successfully installed Cloudbox on FreeBSD Latest. You can now start adding your media to your library and enjoy streaming it to all your devices.

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!