A lightweight file manager with full ShareX support and more
Go to file
2018-11-30 19:36:51 +01:00
app Merge remote-tracking branch 'origin/master' 2018-11-30 19:17:00 +01:00
bin Bug fixes 2018-11-13 18:05:17 +01:00
bootstrap Improved user gallery 2018-11-28 14:57:04 +01:00
install Added warn when try do download an invalid config 2018-11-15 17:10:43 +01:00
logs Initial commit 2018-04-28 14:20:07 +02:00
resources Documented linux support 2018-11-30 19:36:51 +01:00
src Improved user gallery 2018-11-28 14:57:04 +01:00
.gitignore Fix & improvements (#2) 2018-06-02 22:32:14 +02:00
.htaccess Initial commit 2018-04-28 14:20:07 +02:00
.travis.yml Docker container (#9) 2018-10-14 00:24:28 +02:00
CHANGELOG.md Added linux script 2018-11-29 10:10:59 +01:00
composer.json Improved user gallery 2018-11-20 18:46:39 +01:00
composer.lock Improved user gallery 2018-11-28 14:57:04 +01:00
config.example.php Initial commit 2018-04-28 14:20:07 +02:00
Gruntfile.js Merge branch 'master' of C:\Users\Sergio\Documents\GitHub\XBackBone with conflicts. 2018-11-25 16:16:43 +01:00
index.php Working on install wizard 2018-11-11 19:18:27 +01:00
LICENSE Initial commit 2018-04-28 14:16:47 +02:00
package.json Updated dependencies 2018-11-19 19:07:36 +01:00
README.md Documented linux support 2018-11-30 19:36:51 +01:00
yarn.lock Fix & improvements (#2) 2018-06-02 22:32:14 +02:00

XBackBone 📤 Build Status

XBackBone is a simple, self-hosted, lightweight PHP backend for the instant sharing tool ShareX. 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 and past uploads history.

Features

  • Supports every upload type from ShareX.
  • Code uploads syntax highlighting.
  • Video uploads player.
  • Files upload download page.
  • Multi language support.
  • User management, multi user features and roles.
  • Public and private uploads.
  • Web UI for each user.
  • Logging system.
  • Auto config generator for ShareX.
  • Share to Telegram.

How to Install

XBackBone require PHP >= 7.1, writable storage path and PDO, with installed the required extensions (ex. php-sqlite3 for SQLite, php-gd and php-json).

Web installation

  • [release, stable] Download latest release from GitHub: Latest Release
  • Extract the release zip to your document root.
  • 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
  • Extract the release zip to your document root.
  • Copy and edit the config file:
cp config.example.php config.php && nano config.php

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. You must set the base_url, or remove it for get dynamically the url from request (not recommended).

return [
	'base_url' => 'https://example.com', // no trailing slash
	'storage_dir' => 'storage',
	'db' => [
		'connection' => 'sqlite',
		'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
php bin/migrate --install
  • Now just login with admin/admin, be sure to change these credentials after your first login.

Changing themes

XBackBone supports all 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:

  • 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.

Clear the browser cache once you have applied.

Change app install name

Add to the config.php file an array element like this:

return array(
    'app_name' => 'This line will overwrite "XBackBone"',
    ...
);

How to 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

ShareX Configuration

Once you are logged in, just go in your profile settings and download the ShareX config file for your account.

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, just use the "Open with ..." button once you have done the screenshot.

Note: XXX is the username of your XBackBone account.

Notes

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! The NGINX configuration should be something like this:

# nginx configuration

location /app {
  return 403;
}

location /bin {
  return 403;
}

location /bootstrap {
  return 403;
}

location /resources {
  return 403;
}

location /storage {
  return 403;
}

location /vendor {
  return 403;
}

location /logs {
  return 403;
}

autoindex off;

location / {
  if (!-e $request_filename){
    rewrite ^(.*)$ /index.php break;
  }
}

Screenshots

Built with