Fast and elegant file hosting service.
Go to file
AlphaNecron 1a1f23b848
💬 text(readme): indent json schema
2022-09-13 15:58:58 +07:00
.github/workflows 👷 ci(caching): hash yarn.lock instead of npm lock 2022-09-11 10:57:24 +07:00
.husky feature: improved components, (hopefully) finalized admin panel 2022-05-08 19:48:55 +07:00
.yarn feature(roles): basically finalized void's role system 2022-09-11 10:30:14 +07:00
prisma 🎨 codestyle(lint): linted the code 2022-09-11 16:18:36 +07:00
public feature(api, component): ratelimiting, files uploaded dialog 2022-07-02 18:32:24 +07:00
src 🩹 fix: handle callback instead of onDone 2022-09-12 19:30:12 +07:00
.czrc feature(component): new components, upload enhancements 2022-06-17 12:48:11 +07:00
.dockerignore feature(api, components): custom avatar, auth rewrite 2022-07-12 20:56:31 +07:00
.eslintrc.js 🎨 codestyle(lint): linted the code 2022-09-11 16:18:36 +07:00
.gitignore feature: improved components, (hopefully) finalized admin panel 2022-05-08 19:48:55 +07:00
.yarnrc.yml feature(roles): basically finalized void's role system 2022-09-11 10:30:14 +07:00
Dockerfile feature(roles): basically finalized void's role system 2022-09-11 10:30:14 +07:00
LICENSE chore: added LICENSE and readme 2021-09-20 20:38:30 +07:00
config.example.json 🔧 config(example): remove trailing comma 2022-09-13 15:41:48 +07:00
docker-compose.yml feature(roles): basically finalized void's role system 2022-09-11 10:30:14 +07:00
next-env.d.ts feat(void): experimental rewrite 2022-04-08 20:40:34 +07:00
next.config.js 🎨 codestyle(lint): linted the code 2022-09-11 16:18:36 +07:00
package.json 🐛 bugfix(upload): bug thrown when uploading non-convertible images 2022-09-12 14:08:09 +07:00
readme.md 💬 text(readme): indent json schema 2022-09-13 15:58:58 +07:00
tsconfig.json 🚧 wip(logger, neutron): initial neutron build, custom logger 2022-07-17 16:32:46 +07:00
void-env.d.ts 🎨 codestyle(lint): linted the code 2022-09-11 16:18:36 +07:00
yarn.lock 🎨 codestyle(lint): linted the code 2022-09-11 16:18:36 +07:00

readme.md

Banner

A feature-rich self-hosted file hosting service.

Build v1 Docker v1 Stars Version Last commit

⚠️ This is just a development branch, it should not be used for production.

Requirements

  • node >= 16
  • postgresql >= 14
  • yarn >= 3

Installation / Deployment

git clone https://github.com/AlphaNecron/Void.git --branch=v1
cd Void
yarn install # or npm install
cp config.example.json config.json
nano config.json # edit the config file
yarn prod # to build and start the production server
# or
yarn dev # to start the development server

Docker

git clone https://github.com/AlphaNecron/Void.git --branch=v1
cd Void
cp config.example.json config.json
nano config.json # edit the config file
docker pull alphanecron/void:v1
docker run -p 3000:3000 -v $PWD/config.json:/void/config.json -d alphanecron/void:v1

Docker compose

git clone https://github.com/AlphaNecron/Void.git --branch=v1
cd Void
cp config.example.json config.json
nano config.json # edit the config file
docker-compose up --build -d

Reverse proxy (with 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

{
  "void": {
    "useHttps": false,
    // Whether to enable HTTPS for URLs created returned by API.
    "host": "0.0.0.0",
    // The host Void should run on.
    "port": 3000,
    // The port Void should run on.
    "secret": "secretmin32characters",
    // The secret key used to hash cookies. (*)
    "rateLimit": 1200,
    // Rate limit for users per hour. (**)
    "defaultDomain": "http://localhost:3000",
    // The base domain used for multiple purposes.
    "databaseUrl": "postgres://postgres:postgres@postgres/postgres",
    // The Postgres database URL.
    "url": {
      "allowVanityUrl": true,
      // Whether to allow users to shorten with vanity URLs.
      "length": 6
      // The maximum length for URLs generated with shortener and uploader.
    },
    "discordProvider": {
      "clientId": "YOUR DISCORD CLIENT ID",
      // Discord client id, you can grab one in the Application dashboard.
      "clientSecret": "YOUR DISCORD CLIENT SECRET"
      // Discord client secret, you can grab one in the Application dashboard as well.
    },
    "upload": {
      "outputDirectory": "./uploads",
      // The directory to save upload files.
      "blacklistedExtensions": [
        ".zip",
        ".exe"
      ]
      // Prevent users from uploading files with certain extensions. (**)
    }
  },
  "neutron": {
    "enabled": false,
    // Whether to enable the Discord bot
    "token": "YOUR_DISCORD_BOT_TOKEN",
    // Your Discord bot token
    "clientId": "YOUR_DISCORD_APP_CLIENT_ID",
    // Your Discord bot client id
    "guildId": "YOUR_GUILD_ID",
    // The guild Neutron should be working on
  }
}

(*): If it is empty, a random key will be generated, otherwise, it must be at least 32 characters.
(**) Users with ADMINISTRATION permission or higher will not be affected by this.

Features

  • Configurable
  • Fast with eye-catching UI
  • Easy to install
  • Embed customization
  • Custom file viewer for texts, videos, images and audio files
  • Multiple URL charsets (alphanumeric, emoji and invisible)
  • Comes with prebuilt Docker images
  • Discord integration (Login with Discord)
  • Open registration with referral codes
  • Web upload with progress
  • Dedicated Discord bot, mobile application as well as desktop application (WIP).
    and more...

Techstack

Credits

  • v0 codebase from diced/zipline
  • Logo and favicon from icons8

Contributors

Contributors

Default credentials

  • Username: void
  • Password: voiduser