Void/readme.md

139 lines
4.4 KiB
Markdown
Raw Permalink Normal View History

2021-09-20 13:38:30 +00:00
<div align="center">
2021-10-01 08:30:06 +00:00
<img src="https://raw.githubusercontent.com/AlphaNecron/Void/dev/public/banner.png" width="480" height="270"/>
2021-09-20 13:38:30 +00:00
2021-10-01 08:30:06 +00:00
A self-hosted file hosting service based on Zipline with many features.
![Build stable](https://img.shields.io/github/workflow/status/AlphaNecron/Void/CI:%20Build/v0?color=%2368D391&label=stable&logo=github&style=for-the-badge)
![Stars](https://img.shields.io/github/stars/AlphaNecron/Void?color=%23B794F4&logo=github&style=for-the-badge)
![Version](https://img.shields.io/github/package-json/v/AlphaNecron/Void/v0?color=%23B794F4&label=latest&logo=react&logoColor=ffffff&style=for-the-badge)
2021-10-01 08:31:40 +00:00
![Last commit](https://img.shields.io/github/last-commit/AlphaNecron/Void/dev?color=%234FD1C5&logo=github&style=for-the-badge)
2021-09-20 13:38:30 +00:00
</div>
>## I'm currently very busy so there's hardly any spare time for me to develop Void. As an alternative, try out [Zipline](https://github.com/diced/zipline), an actively developed file hosting service.
2021-09-20 13:38:30 +00:00
### Requirements
- `node` >= 14
2021-09-23 03:36:56 +00:00
- PostgreSQL
- Either `yarn` or `npm`
2021-09-20 13:38:30 +00:00
### Installation / Deployment
2021-09-23 03:36:56 +00:00
```sh
git clone https://github.com/AlphaNecron/Void.git
cd Void
2021-09-23 03:36:56 +00:00
yarn install # or npm install
cp config.example.toml config.toml
nano config.toml # edit the config file
yarn build # or npm run build
2021-09-23 03:36:56 +00:00
yarn start # or npm start
```
2021-09-20 13:38:30 +00:00
### Docker
```sh
git clone https://github.com/AlphaNecron/Void.git
cd Void
cp config.example.toml config.toml
nano config.toml # edit the config file
docker pull alphanecron/void:v0
2021-10-04 05:02:20 +00:00
docker run -p 3000:3000 -v $PWD/config.toml:/void/config.toml -d alphanecron/void:v0
```
### Docker compose
```sh
git clone https://github.com/AlphaNecron/Void.git
cd Void
cp config.example.toml config.toml
nano config.toml # edit the config file
docker-compose up --build -d
```
2021-09-20 13:38:30 +00:00
### Reverse proxy (nginx)
2021-09-23 03:36:56 +00:00
```nginx
server {
listen 443 ssl;
server_name your.domain;
ssl_certificate /path/to/cert;
ssl_certificate_key /path/to/key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
2021-09-23 10:25:15 +00:00
client_max_body_size 100M;
2021-09-23 03:36:56 +00:00
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
2021-09-20 13:38:30 +00:00
### Config schema
```toml
[core]
secure = false # Whether to use https or not
secret = 'supersecretpassphrase' # The secret used to sign cookie
host = '0.0.0.0' # The host Void should run on
port = 3000 # The port Void should run on
database_url = 'postgres://username:password@localhost:5432/db_name' # PostgreSQL database url
2021-09-25 12:35:49 +00:00
[bot]
enabled = false # Whether to enable the bot or not
prefix = '&' # Bot's prefix
token = '' # Bot's token
admin = [''] # Admin ids
log_channel = '' # The channel where logs are sent, leave blank to disable logging
default_uid = 1 # The default user id used to shorten and upload
hostname = 'example.com' # The hostname shortened urls should use in Twilight
[shortener]
allow_vanity = true # Whether to allow vanity urls or not
length = 6 # Slug length
route = '/go' # Route to serve shortened urls
2021-09-25 12:35:49 +00:00
[uploader]
raw_route = '/r' # Route to serve raw contents
length = 6 # Slug length
directory = './uploads' # The directory where images are stored
2021-10-15 06:34:03 +00:00
max_size = 104857600 # Max upload size (users only), in bytes
blacklisted = ['exe'] # Blacklisted file extensions (users only)
```
2021-09-20 13:38:30 +00:00
### Features
2021-09-23 03:36:56 +00:00
- Configurable
2021-10-04 09:23:20 +00:00
- Fast and reliable
- Elegant Web UI
2021-09-23 03:36:56 +00:00
- Built with Next.js & React
2021-10-04 09:23:20 +00:00
- Token-protected uploading
2021-09-23 03:36:56 +00:00
- Easy to setup
- Invisible URL
- Emoji URL
2021-09-23 10:25:15 +00:00
- Text previewing (with syntax highlighting)
2021-09-23 03:36:56 +00:00
- Video embed
- URL shortener
- Discord bot
- Docker support
2021-10-04 09:23:20 +00:00
- Password-protected URL
- Embed customization (with variables)
2021-09-23 03:36:56 +00:00
### Contribution
- All pull requests must be made in `dev` branch, pull requests in `v0` will be closed.
2021-09-20 13:38:30 +00:00
### Default credentials
- Username: `admin`
- Password: `voiduser`
### Bot permissions
2021-10-09 05:58:12 +00:00
#### These permissions are required for the bot to work properly (27712):
- Add reactions
- Read messages
- Send messages
- Manage messages
- Embed links
2021-09-20 13:38:30 +00:00
### Todo
2021-09-23 03:36:56 +00:00
- Discord integration
2021-10-13 03:54:36 +00:00
- Album / Bulk upload
### Credits
- Source code and API from `diced/zipline`
- Logo and favicon from `icons8`