In this installation tutorial, we will learn how setup Dropbox on the Linux server with the help of the command line. We are using CentOS 8 to install Dropbox.
Dropbox is one of the famous and most used file hosting services all over the world, Dropbox is referred to as a cloud storage service. User can save their personal and professional data on Dropbox. Dropbox offers a very secure platform for its users. Dropbox is one of the oldest cloud storage platforms. Nowadays, there are many alternatives are available such as Google Drive, OneDrive, etc.
- Linux based Server (CentOS, Ubuntu, Debian and Red hat).
- Root user or other User with sudo privileges.
Create Access on dropbox
- Login to the Dropbox apps from here.
Enter your login details.
- After login, click on the
App folderif you want to allow the user to access a particular directory, no other files and directories can be access by this user. To allow the user to access all the files and Directories in the Dropbox, then select the
- Create a name for you Dropbox app.
No Expirationoption in Access token expiration.
- Now click on Permissions to set the permission on the App user.
- Allow all the permission under the
Files and Folders.
Submit the button, And then move to the server’s terminal.
Configuration on server
- Update the server
yum update -y
- Install Git package.
yum install git -y
- Change your current working directory to root directory.
- Create clone with the Git command.
git clone https://github.com/andreafabrizi/Dropbox-Uploader.git
- Now change the current working directory to
- Allow execution permission
sudo chmod +x *.sh
- Run the script. It will ask for the
- Move to the Dropbox app section, copy App Key and paste the key on the terminal.
- Now enter the
- Click on on
show. Copy and paste the App secret code on the terminal.
- After entering the
App secretcode, you will receive a link. Copy the link and paste on the Browser. After pasting the URL in the browser, click on continue button.
- Click on
Allowbutton. Copy the access code and paste on the terminal.
- Now it will ask to confirm the Details. Type
Yand press Enter button.
We have successfully connected Dropbox with our server. Now we can easily upload or download data from Dropbox.
Read Also: Find and Replace in Vim Editor
Note :- If you want to configure the same Dropbox app on another server, then simply copy the content of
/root/.dropbox_uploader file and create the same file at the same path and with the same file name on the server. And, download and install the Dropbox package as mentioned above.
In this process, we did not require verifying the Dropbox package again from Dropbox.
Syntax of ./dropbox_uploader.sh
upload <LOCAL_FILE/DIR ...> <REMOTE_FILE/DIR> download <REMOTE_FILE/DIR> [LOCAL_FILE/DIR] delete <REMOTE_FILE/DIR> move <REMOTE_FILE/DIR> <REMOTE_FILE/DIR> copy <REMOTE_FILE/DIR> <REMOTE_FILE/DIR> mkdir <REMOTE_DIR> list [REMOTE_DIR] monitor [REMOTE_DIR] [TIMEOUT] share <REMOTE_FILE> saveurl <URL> <REMOTE_DIR> search <QUERY> info To check the information of the files or Directories space To check the space unlink To unlink the app
-f <FILENAME> Load the configuration file from a specific file -s Skip already existing files when download/upload. Default: Overwrite -d Enable DEBUG mode -q Quiet mode. Don't show messages -h Show file sizes in human readable format -p Show cURL progress meter -k Doesn't check for SSL certificates (insecure) -x Ignores/excludes directories or files from syncing. -x filename -x directoryname. example: -x .git
- To create the directory on the Dropbox, issue this below command.
./dropbox_uploader.sh mkdir Directory_Name
- To upload the file or directory on the Dropbox.
./dropbox_uploader.sh upload /Source/or/Directory /Destination/Path
In this setup Dropbox on the Linux server tutorial, we have learned how to set up Dropbox on the server with the command line. And learned how to download and upload data and directories on Dropbox.
While following the guide, if there is any problem while following the guide, just comment in the comment box below.