Fast and elegant file hosting service.
Go to file
Nguyen Thanh Quang 6f513265aa
fix(api): allow uploading without private token
2022-07-05 21:05:20 +07:00
.github/workflows ci: updated docker ci 2021-10-08 19:17:35 +07:00
.husky feat: initial 2021-09-16 12:40:46 +07:00
prisma revert(prisma): prisma schema 2021-10-15 14:56:12 +07:00
public refactor: renamed from 'draconic' to 'void' 2021-10-01 15:14:44 +07:00
scripts build: converted everything into typescript 2021-10-06 18:30:45 +07:00
src fix(api): allow uploading without private token 2022-07-05 21:05:20 +07:00
twilight refactor(lib): moved constant declarations into `constants.ts` 2021-10-15 14:52:11 +07:00
.dockerignore feat(docker): docker support 2021-10-04 10:56:00 +07:00
.eslintrc.js chore(api): use `authorization` instead of `token` for auth header 2021-10-02 11:43:24 +07:00
.gitignore refactor: renamed from 'draconic' to 'void' 2021-10-01 15:14:44 +07:00
Dockerfile fix(docker): push error 2021-10-15 13:40:27 +07:00
LICENSE chore: added LICENSE and readme 2021-09-20 20:38:30 +07:00
config.example.toml feat(api): url generator for shortener 2021-10-15 13:34:03 +07:00
docker-compose.yml fix(docker): add auto restart policy for postgres (#23) 2022-04-03 08:54:39 +07:00
next-env.d.ts feat: initial 2021-09-16 12:40:46 +07:00
next.config.js feat: initial 2021-09-16 12:40:46 +07:00
package.json fix: downgrade redux toolkit to 1.7.2, fix deprecated properties (#22) 2022-03-03 12:23:17 +07:00
readme.md fix(server): ignore queries and hashes on url 2021-10-22 17:34:35 +07:00
server.ts fix(server): fix the filename issue 2021-10-26 20:41:22 +07:00
tsconfig.json build: converted everything into typescript 2021-10-06 18:30:45 +07:00
void-env.d.ts build: converted everything into typescript 2021-10-06 18:30:45 +07:00
yarn.lock fix: downgrade redux toolkit to 1.7.2, fix deprecated properties (#22) 2022-03-03 12:23:17 +07:00

readme.md

A self-hosted file hosting service based on Zipline with many features.

Build stable Stars Version Last commit

Requirements

  • node >= 14
  • PostgreSQL
  • Either yarn or npm

Installation / Deployment

git clone https://github.com/AlphaNecron/Void.git
cd Void
yarn install # or npm install
cp config.example.toml config.toml
nano config.toml # edit the config file
yarn build # or npm run build
yarn start # or npm start

Docker

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
docker run -p 3000:3000 -v $PWD/config.toml:/void/config.toml -d alphanecron/void:v0

Docker compose

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

Reverse proxy (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;
    client_max_body_size 100M;
    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;
    }
}

Config schema

[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

[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

[uploader]
raw_route = '/r' # Route to serve raw contents
length = 6 # Slug length
directory = './uploads' # The directory where images are stored
max_size = 104857600 # Max upload size (users only), in bytes
blacklisted = ['exe'] # Blacklisted file extensions (users only)

Features

  • Configurable
  • Fast and reliable
  • Elegant Web UI
  • Built with Next.js & React
  • Token-protected uploading
  • Easy to setup
  • Invisible URL
  • Emoji URL
  • Text previewing (with syntax highlighting)
  • Video embed
  • URL shortener
  • Discord bot
  • Docker support
  • Password-protected URL
  • Embed customization (with variables)

Contribution

  • All pull requests must be made in dev branch, pull requests in v0 will be closed.

Bot permissions

These permissions are required for the bot to work properly (27712):

- Add reactions
- Read messages
- Send messages 
- Manage messages
- Embed links

Todo

  • Discord integration
  • Album / Bulk upload

Credits

  • Source code and API from diced/zipline
  • Logo and favicon from icons8