2018-10-13 22:24:28 +00:00
2019-11-19 13:57:49 +00:00
# XBackBone 📤 [![Weblate](https://hosted.weblate.org/widgets/xbackbone/-/xbackbone/svg-badge.svg)](https://hosted.weblate.org/engage/xbackbone/?utm_source=widget) <a href="https://codeclimate.com/github/SergiX44/XBackBone/maintainability"><img src="https://api.codeclimate.com/v1/badges/bf8ee4a8df9c9f0dfa08/maintainability" /></a> [![Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6RXF8ZGCZBL68&item_name=Support+the+XBackBone+Development¤cy_code=EUR&source=url)
2019-11-14 13:34:07 +00:00
2019-09-16 07:50:51 +00:00
XBackBone is a simple, self-hosted, lightweight PHP file manager that support the instant sharing tool ShareX and *NIX systems. It supports uploading and displaying images, GIF, video, code, formatted text, and file downloading and uploading. Also have a web UI with multi user management, past uploads history and search support.
2018-04-28 12:20:07 +00:00
## Features
+ Supports every upload type from ShareX.
2019-09-03 19:53:12 +00:00
+ Low memory footprint.
2019-09-16 07:50:51 +00:00
+ Multiple backends support: Local storage, AWS S3, Google Cloud, Dropbox, FTP(s).
2018-10-14 12:15:34 +00:00
+ Code uploads syntax highlighting.
2019-09-06 12:55:42 +00:00
+ Video and audio uploads webplayer.
2019-09-03 19:53:12 +00:00
+ Files preview page.
2019-09-06 12:55:42 +00:00
+ Bootswatch themes support.
+ Responsive theme.
2018-11-19 18:10:04 +00:00
+ Multi language support.
2018-10-14 12:15:34 +00:00
+ User management, multi user features and roles.
2018-04-28 12:20:07 +00:00
+ Public and private uploads.
+ Web UI for each user.
+ Logging system.
2018-05-01 12:54:09 +00:00
+ Auto config generator for ShareX.
2018-10-14 12:15:34 +00:00
+ Share to Telegram.
2019-09-16 07:50:51 +00:00
+ Linux supported via a per-user custom generated script.
2019-09-03 19:53:12 +00:00
+ Direct downloads using curl or wget commands.
2019-09-06 12:55:42 +00:00
+ Direct images links support on Discord, Telegram, Facebook, etc.
2018-04-28 12:20:07 +00:00
## How to Install
2019-09-16 07:50:51 +00:00
#### Prerequisites
XBackBone require PHP >= `7.1` , with installed the required extensions:
2019-09-06 12:55:42 +00:00
+ `php-sqlite3` for SQLite.
+ `php-mysql` for MariaDB/MySQL.
+ `php-gd` image manipualtion library.
+ `php-json` json file support.
2019-09-16 07:50:51 +00:00
+ `php-intl` internationalization functions.
2018-04-28 12:20:07 +00:00
2018-11-13 17:56:28 +00:00
### Web installation
2018-10-13 23:27:34 +00:00
+ ** [release, stable]** Download latest release from GitHub: [Latest Release ](https://github.com/SergiX44/XBackBone/releases/latest )
2018-10-13 23:28:06 +00:00
+ Extract the release zip to your document root.
2018-11-13 17:56:28 +00:00
+ Navigate to the webspace root (ex. `http://example.com/xbackbone` , this should auto redirect your browser to the install page `http://example.com/xbackbone/install/` )
+ Follow the instructions.
### Manual installation
+ ** [release, stable]** Download latest release from GitHub: [Latest Release ](https://github.com/SergiX44/XBackBone/releases/latest )
+ Extract the release zip to your document root.
+ Copy and edit the config file:
2018-04-28 12:20:07 +00:00
```sh
2018-11-13 17:56:28 +00:00
cp config.example.php config.php & & nano config.php
2018-04-28 12:20:07 +00:00
```
2018-10-14 12:17:25 +00:00
By default, XBackBone will use Sqlite3 as DB engine, and a `storage` dir in the main directory. You can leave these settings unchanged for a simple personal installation.
2019-11-18 10:42:42 +00:00
You must set the `base_url` , or remove it for get dynamically the url from request (not recommended).
2018-04-28 12:20:07 +00:00
```php
return [
2019-11-18 10:42:42 +00:00
'base_url' => 'https://example.com', // no trailing slash
2019-08-20 21:00:33 +00:00
'storage' => [
'driver' => 'local',
'path' => 'storage',
],
2018-04-28 12:20:07 +00:00
'db' => [
2019-08-20 21:00:33 +00:00
'connection' => 'sqlite', // current support for sqlite and mysql
2018-04-28 12:20:07 +00:00
'dsn' => 'resources/database/xbackbone.db',
'username' => null, // username and password not needed for sqlite
'password' => null,
]
];
```
+ Finally, run the migrate script to setup the database
```sh
php bin/migrate --install
```
2019-09-03 19:53:12 +00:00
+ Delete the `/install` directory.
2018-04-28 12:20:07 +00:00
+ Now just login with `admin/admin` , **be sure to change these credentials after your first login** .
2019-07-29 17:35:18 +00:00
## How to update
Self-update (since v2.5) ** [BETA]**:
+ Navigate to the system page as admin.
+ Click the check for update button, and finally the upgrade button.
+ Wait until the browser redirect to the install page.
+ Click the update button.
+ Done.
Manual update:
+ Download and extract the release zip to your document root, overwriting any file.
+ Navigate to the `/install` path (es: `http://example.com/` -> `http://example.com/install/` )
+ Click the update button.
+ Done.
#### Docker deployment
+ [Docker container ](https://hub.docker.com/r/pe46dro/xbackbone-docker )
## Translations
2019-08-18 13:58:29 +00:00
You can help translating the project on [Weblate ](https://hosted.weblate.org/projects/xbackbone/xbackbone/ ).
2019-07-29 17:35:18 +00:00
2019-08-18 14:16:16 +00:00
< a href = "https://hosted.weblate.org/engage/xbackbone/?utm_source=widget" >
< img src = "https://hosted.weblate.org/widgets/xbackbone/-/xbackbone/multi-auto.svg" alt = "Stato traduzione" / >
< / a >
2019-07-29 17:35:18 +00:00
## Changing themes
2018-11-13 17:56:28 +00:00
XBackBone supports all [bootswatch.com ](https://bootswatch.com/ ) themes.
From the web UI:
+ Navigate to the web interface as admin -> System Menu -> Choose a theme from the dropdown.
From the CLI:
2018-10-13 23:30:53 +00:00
+ Run the command `php bin/theme` to see the available themes.
+ Use the same command with the argument name (`php bin/theme < THEME-NAME > `) to choose a theme.
+ If you want to revert back to the original bootstrap theme, run the command `php bin/theme default` .
2018-10-13 22:34:49 +00:00
2018-11-17 22:35:58 +00:00
*Clear the browser cache once you have applied.*
2019-07-29 17:35:18 +00:00
### Change app install name
2018-11-17 22:35:58 +00:00
Add to the `config.php` file an array element like this:
```php
return array(
'app_name' => 'This line will overwrite "XBackBone"',
...
);
```
2018-05-01 12:29:59 +00:00
## ShareX Configuration
Once you are logged in, just go in your profile settings and download the ShareX config file for your account.
2018-11-30 18:36:51 +00:00
## Linux Support
Since ShareX does not support Linux, XBackBone can generate a script that allows you to share an item from any tool:
+ Login into your account
+ Navigate to your profile and download the Linux script for your account.
+ Place the script where you want (ex. in your user home: `/home/<username>` ).
+ Add execution permissions (`chmod +x xbackbone_uploader_XXX.sh`)
+ Run the script for the first time to create the desktop entry: `./xbackbone_uploader_XXX.sh -desktop-entry` .
Now, to upload a media, just use the right click on the file > "Open with ..." > search XBackBone Uploader (XXX) in the app list.
You can use this feature in combination with tools like [Flameshot ](https://github.com/lupoDharkael/flameshot ), just use the "Open with ..." button once you have done the screenshot.
2018-11-30 18:44:05 +00:00
The script requires `xclip` , `curl` , and `notify-send` .
2018-11-30 18:36:51 +00:00
*Note: XXX is the username of your XBackBone account.*
2019-02-06 21:34:56 +00:00
## Web server configuration notes
2018-04-28 12:24:13 +00:00
If you do not use Apache, or the Apache `.htaccess` is not enabled, set your web server so that the `static/` folder is the only one accessible from the outside, otherwise even private uploads and logs will be accessible!
2018-05-01 15:44:45 +00:00
2019-02-07 16:34:19 +00:00
You can find an example configuration `nginx.conf` in the project repository.
## Maintenance Mode
Maintenance mode is automatically enabled during an upgrade using the upgrade manager. You can activate it manually by adding in the configuration file this:
```php
return array(
...
'maintenance' => true,
);
```
## Animated Demo
![img ](https://i.imgur.com/iV8Rirn.gif )
2018-04-28 12:24:13 +00:00
2019-01-30 22:19:33 +00:00
## License
This software is licensed under the < a href = "https://choosealicense.com/licenses/agpl-3.0/" > GNU Affero General Public License v3.0< / a > , available in this repository.
As a "copyright notice" it is sufficient to keep the small footer at the bottom of the page, also to help other people to learn about this project!
2018-04-28 12:24:13 +00:00
## Built with
2019-01-30 22:19:33 +00:00
+ Slim 3, since `v2.0` (https://www.slimframework.com/) and some great PHP packages (Flysystem, Intervention Image, Twig, etc)
2018-11-19 18:10:04 +00:00
+ FlightPHP, up to `v1.x` (http://flightphp.com/)
2018-04-28 12:24:13 +00:00
+ Bootstrap 4 (https://getbootstrap.com/)
+ Font Awesome 5 (http://fontawesome.com)
+ ClipboardJS (https://clipboardjs.com/)
+ HighlightJS (https://highlightjs.org/)
+ JQuery (https://jquery.com/)
2019-01-30 22:19:33 +00:00
+ video.js (https://videojs.com/)