How to start a video sharing site like YouTube with ClipBucket

ClipBucket is an open source and freely downloadable PHP script that lets you easily start your own video sharing website. It’s the fastest growing video script with the most advanced video sharing and social features. You can let users create groups, playlists, collections, and much more — very similar to how YouTube does. Your users can also send friend requests and private messages to each other.

This open source video solution is most commonly used for fully dedicated video sharing websites. However, it can also be used for a photo sharing website like Flickr or a website that combines video and image sharing.

With ClipBucket, you can choose from a collection of free themes. You can also pay for a custom theme. Many of the plugins and themes come with a small charge, but the script itself remains free.

Prerequisites

I’ll walk you through how to install the software listed below. Just make sure you have an Ubuntu 16.04 droplet with a sufficient amount of RAM. (You can get a powerful and affordable VPS server with Ubuntu 16.04 installed on it through Digital Ocean.)

  • Ubuntu 16.04 droplet with sufficient RAM (5GB or greater recommended) and sudo privileges
  • PHP 5.2.x & MySql 5.x.x
  • PHP with background processing and exec enabled
  • GD Library for captchas and other image manipulation
  • FFmpeg, FLVTOOL2, MP4Box

Step 1 — Update your server

Before installing the software needed for ClipBucket, connect to your server using root or a sudo-privileged user. Then, update your system with the following command:

$ sudo apt-get update -y

Once your system is updated with latest updates and security patches, we’ll install Apache, MySQL/Maria-DB, PHP, FFmpeg, ImageMagic, and FLVTool before installing ClipBucket.

Step 2 — Install Apache, MySQL and PHP

ClipBucket is a web-based application. So, in order to access it on the web, we need to install a web server (Apache) with a backend database (MySQL and PHP) to create dynamic web page content or dynamic images used on websites.

Run the following command to install Apache and the MySQL MariaDB server:

$ sudo apt-get install apache2 mariadb-server

When you’re asked if you wish to continue, type ‘Y’ for yes to install packages on the system.

After that, use the commands below to install PHP version 5.6 along with its required libraries.

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt install php5.6 libapache2-mod-php5.6 php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-mysql ruby

Step 3 — Install FFmpeg

ClipBucket uses FFmpeg for video conversion and thumbnail generation.

To install FFmpeg along with some other required dependencies for ClipBucket, run the following command.

$ sudo apt-get install ffmpeg gpac mediainfo imagemagick php5.6-imagick

Enter ‘Y’ to continue installing packages along with required dependencies.

Step 4 — Install FLVTool2

FLVTool2 is a manipulation tool for Macromedia Flash Video files (FLV). It calculates various metadata and inserts an onMetaData tag in the video. It also cuts FLV files and adds cue points (onCuePoint).

Run the command below to install this package using “gem.” The gem command allows you to interact with RubyGems.

$ sudo gem install flvtool2

The gem install command downloads and installs the mentioned package along with any necessary dependencies.

Step 5 — Set up MySQL

To set up the database for ClipBucket, run the command below to secure your database server by setting its password and removing the test database as shown.

$ sudo mysql_secure_installation

Enter your current password for root, or leave empty and enter “Y” if you haven’t configured it yet. If you do the latter, enter your new root password.

After this, you’ll be asked to remove anonymous users and test databases. To do this, enter “Y” for increased security.

After making the recommended changes, you’ll be asked to reload privilege tables. Do this by entering “Y”.

Now, you need to create a database and a database user with all the necessary privileges after connecting to the MySQL console. Enter the following commands, in order.

$ sudo mysql -u root -p
> create database cb;

In this case, cb stands for ClipBucket.

> grant all on cb.* to 'cb'@'localhost' identified by 'passw0rd';

Replace localhost with your username and passw0rd with a unique password.

> \q

Step 6 — Download ClipBucket

You can download the latest stable release of ClipBucket here or use the following command to download the package using wget.

$ sudo cd /var/www/html
$ sudo wget https://github.com/arslancb/clipbucket/archive/4476.zip

Now extract the package and rename the folder to something more simple.

$ sudo unzip 4476.zip
$ sudo mv clipbucket-4476/ clipbucket

After this, change the ownership and permissions of the directory. This way it will be accessible to web browsers (people visiting your site).

$ sudo chown -R www-data:www-data clipbucket/
$ sudo chmod 777 /var/www/html/clipbucket

Step 7 — Install ClipBucket with the installation wizard

First you’ll want to restart Apache and confirm that it is active and running.

$ sudo systemctl restart apache2
$ sudo systemctl status apache2

To confirm that Apache is running, look for Active: active (running) in the output. It will be above the Docs: and Process: lines.

Now open your favorite web browser (Chrome, Firefox, etc).

In the address bar, enter your server’s IP address and the ClipBucket installation path. It should look like this: https://111.111.111.111/clipbucket

You should arrive at a page that looks like this:

Screenshot of the index folder for ClipBucket install

Click the upload/ link and accept the License agreement that appears. Then, confirm the settings on the Prechecking page and click to “Continue To Next Step.”

On the next page, check all the file and directory permissions as ClipBucket needs these permissions to store files properly.

Screenshot of checking files and directories permissions in ClipBucket

When all permissions are checked, move to the next step to configure your database by providing all the required information about your database name, user, host, and password that we created in the earlier step.

Screenshot of database settings page in ClipBucket

Next, on the “Admin Settings” page, enter a username and password for your admin account. Then click “Save and Continue.”

On the “Site Settings” page, create a name of your website, give it a slogan, and customize its URL if required.

The default URL is visible in the image below, but it’s better to use the document root directory http://yourdomain.com/clipbucket/. For production, if you are using your domain particularly for ClipBucket, you should use your main domain’s web root http://myclipbucket.com/.

After customizing these values, click “Save and Continue”.

Screenshot of website basic configurations page in ClipBucket

Next, move to the “Register” page. Registering ClipBucket is option but there are several reasons why the ClipBucket team recommends it. You can see these reasons listed on the page. Based on your preference, either click “Skip & Finish” or “Register & Finish”.

At this point ClipBucket has been installed successfully.

On the next page, click “Continue to Admin Area.” When you get the login page, use your admin account credentials to access the ClipBucket admin page.

Step 8 — View the ClipBucket dashboard

The ClipBucket dashboard lets you to manage your videos and photos. You can also view user stats.

If you see a server configuration error notification in your dashboard, update your server configurations as per recommendations by opening the file below using vim.

$ sudo vim /etc/php/5.6/apache2/php.ini
max_execution_time = 7500
post_max_size = 100M
upload_max_size = 100M
Memory_limit = 100M

Save and close the configuration file and restart Apache (like we did in Step 7). After this, refresh the ClipBucket dashboard web page.

Now you should see your ClipBucket dashboard without any problem.

Screenshot of ClipBucket dashboard

Step 9 — Upload your first video

To upload your first video, click “Videos” in the sidebar and then “Upload” in the top right corner of your browser. Browse your computer for a video you want to upload, and then initiate the upload.

When your video is uploaded, click “Submit Now”. You can always upload more videos and photos by creating multiple channels and categories.

Conclusion

In this article we have successfully installed and configured one of the most popular open source video sharing tools for Ubuntu 16.04. But remember, ClipBucket is not limited to just videos. It can also be used as a complete multimedia management tool for managing images and audio together on one platform.

While you’re growing your own video sharing site, you can hone the craft of creating and sharing videos on YouTube. By learning how to do this, you’ll know how to attract the audience you need to grow your new site. There’s a good book called How to Make Money with YouTube that teaches you how to do this.