XBackBone/README.md

108 lines
3.2 KiB
Markdown
Raw Normal View History

2018-07-23 09:01:08 +00:00
# XBackBone 📤 [![Build Status](https://travis-ci.org/SergiX44/XBackBone.svg?branch=master)](https://travis-ci.org/SergiX44/XBackBone)
2018-05-01 16:44:28 +00:00
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.
2018-04-28 12:20:07 +00:00
## Features
+ Supports every upload type from ShareX.
+ User management, multi user features.
+ 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-04-28 12:20:07 +00:00
## How to Install
2018-07-23 09:00:52 +00:00
XBackBone require PHP >= `7.1`, the composer package manager, writable storage path and PDO, with installed the needed extensions (ex. `php-sqlite3` for SQLite):
2018-04-28 12:20:07 +00:00
2018-05-01 12:54:09 +00:00
+ **[release, stable]** Download latest release from GitHub:
[https://github.com/SergiX44/XBackBone/releases/latest](https://github.com/SergiX44/XBackBone/releases/latest)
2018-06-02 20:38:51 +00:00
2018-04-28 12:20:07 +00:00
+ Setup the config file:
```sh
cp config.example.php config.php
```
By default, XBackBone will use Sqlite as DB engine, and a `storage` dir in the current 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 raccomanded).
```php
return [
'base_url' => 'https://myaswesomedomain.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
```sh
php bin/migrate --install
```
+ Now just login with `admin/admin`, **be sure to change these credentials after your first login**.
2018-10-13 22:34:49 +00:00
#### Changing themes
XBackBone supports all [bootswatch.com](https://bootswatch.com/) themes:
+ 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.
#### Docker deployment
+ [Docker container](https://hub.docker.com/r/pe46dro/xbackbone-docker)
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-04-28 12:20:07 +00:00
## 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
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;
}
}
```
2018-04-28 12:24:13 +00:00
## Built with
+ FlightPHP (http://flightphp.com/)
+ Bootstrap 4 (https://getbootstrap.com/)
+ Font Awesome 5 (http://fontawesome.com)
+ ClipboardJS (https://clipboardjs.com/)
+ HighlightJS (https://highlightjs.org/)
+ JQuery (https://jquery.com/)