aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md28
-rw-r--r--babel.config.js2
-rw-r--r--chibisafe-sample.service14
-rwxr-xr-x[-rw-r--r--]docker/chibisafe.sh0
-rw-r--r--docker/chibisafe/Dockerfile2
-rw-r--r--docker/nginx/nginx.conf2
-rw-r--r--docs/docker.md8
-rw-r--r--docs/sites.md10
-rw-r--r--docs/systemd.md8
9 files changed, 36 insertions, 38 deletions
diff --git a/README.md b/README.md
index 5f16d13..0736f14 100644
--- a/README.md
+++ b/README.md
@@ -8,33 +8,35 @@
[![Support me](https://img.shields.io/badge/Support-Buy%20me%20a%20coffee-yellow.svg?style=flat-square)](https://www.buymeacoffee.com/kana)
### Attention
-If you are upgrading from v3 to v4 (current release) and you want to keep your files and relations please read the [migration guide](docs/migrating.md).
+If you are upgrading from `v3.x` to `v4.0.0` (lolisafe to chibisafe) and you want to keep your files and relations please read the [migration guide](docs/migrating.md). Keep in mind the migration is a best-effort script and it's recommended to start from scratch. That being said the migration does work but it's up to you to make a backup beforehand in case something goes wrong.
-### Attention (2)
-v4.0.1 changed the hashing algorithm for a better, faster one. So if you are currently running v4.0.0 and decide to update to v4.0.1+ it's in your best interest to rehash all the files your instance is serving. To do this go to the chibisafe root folder and run `node src/api/utils/rehashDatabase.js`. Depending on how many files you have it can take a few minutes or hours, there's a progress bar that will give you an idea.
+`v4.0.1` changed the hashing algorithm for a better, faster one. So if you are currently running v4.0.0 and decide to update to v4.0.1+ it's in your best interest to rehash all the files your instance is serving. To do this go to the chibisafe root folder and run `node src/api/utils/rehashDatabase.js`. Depending on how many files you have it can take a few minutes or hours, there's a progress bar that will give you an idea.
-### What is this?
+## What is Chibisafe?
Chibisafe is a file uploader service written in node that aims to to be easy to use and easy to set up. It's mainly intended for images and videos, but it accepts anything you throw at it.
- You can run it in public or private mode, making it so only people with user accounts can upload files as well as controlling if user signup is enabled or not.
-- Out of the box support for ShareX configuration letting you upload screenshots and screencaptures directly to your chibisafe instance.
-- Browser extension to be able to right click any image/video and upload it directly to your chibisafe instance.
+- Out of the box support for ShareX configuration letting you upload screenshots and screenrecordings directly to your chibisafe instance.
+- Browser extension to be able to right click any image/video from any website and upload it directly to your chibisafe instance.
- Chunk uploads enabled by default to be able to handle big boi files.
- API Key support so you can integrate the service with whatever you desire.
- Albums, tags and Discord-like search function
- User list and control panel
### Docker
-To avoid all of this and use docker [read the docs here](docs/docker.md)
+If you want to deploy a docker instance instead of manually setting the service up, you can use `docker-composer` with our scripts. [Please refer to the docs here](docs/docker.md)
### Pre-requisites
-This guide asumes a lot of things, including that you know your way around linux, nginx and internet in general.
+This guide asumes a whole lot of things, including that you know your way around linux, nginx and internet in general.
-- Decently updated version of linux
-- `node` version 12+
-- `build-essential` package installed to build dependencies
-- `ffmpeg` package installed if you want video thumbnails
+- Decently updated version of linux (we recommend Debian)
+- `node` version 12.18.2+ (we recommend using [volta.sh](https://volta.sh/) or [n](https://github.com/tj/n))
+- `build-essential` package installed in your system to build dependencies
+- `ffmpeg` package installed
- `pm2` globally installed (`npm i -g pm2`) to keep the service alive at all times.
-- A database, postgresql preferably. You can also fall back to sqlite3 which ships by default.
+ - Alternatively you can use tmux, forever, or whatever you are most familiar with
+- `nginx` installed and running
+
+> Note: while Chibisafe does work on Windows, setting it up is not covered in this readme. It's up to you to install the neccessary dependencies
### Installing
diff --git a/babel.config.js b/babel.config.js
index 1aa593c..b401fb7 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -2,7 +2,7 @@ function isBabelLoader(caller) {
return caller && caller.name === 'babel-loader';
}
-module.exports = function(api) {
+module.exports = api => {
if (api.env('test') && !api.caller(isBabelLoader)) {
return {
presets: [
diff --git a/chibisafe-sample.service b/chibisafe-sample.service
deleted file mode 100644
index f6c1ed3..0000000
--- a/chibisafe-sample.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=chibisafe, easy to use file uploader
-After=network.target
-
-[Service]
-Type=simple
-User=yourusername
-WorkingDirectory=/path/to/chibisafe
-EnvironmentFile=/path/to/chibisafe/.env
-ExecStart=/usr/bin/npm run start
-Restart=always
-
-[Install]
-WantedBy=multi-user.target
diff --git a/docker/chibisafe.sh b/docker/chibisafe.sh
index b6e2f44..b6e2f44 100644..100755
--- a/docker/chibisafe.sh
+++ b/docker/chibisafe.sh
diff --git a/docker/chibisafe/Dockerfile b/docker/chibisafe/Dockerfile
index 3c50116..94bc170 100644
--- a/docker/chibisafe/Dockerfile
+++ b/docker/chibisafe/Dockerfile
@@ -1,6 +1,6 @@
FROM jrottenberg/ffmpeg:4.3-alpine312 as ffmpeg
-FROM node:alpine3.12
+FROM node:14-alpine
WORKDIR /usr/chibisafe
COPY package.json package-lock.json ./
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf
index 06ec5f3..2e1569f 100644
--- a/docker/nginx/nginx.conf
+++ b/docker/nginx/nginx.conf
@@ -19,8 +19,6 @@ http {
server_tokens off;
log_not_found off;
types_hash_max_size 2048;
- client_max_body_size 90M;
- client_body_timeout 600s;
# MIME
include mime.types;
diff --git a/docs/docker.md b/docs/docker.md
index 0dd8bec..6354139 100644
--- a/docs/docker.md
+++ b/docs/docker.md
@@ -1,15 +1,15 @@
### Using Docker
-If you want to avoid all the hassle of installing the dependencies, configuring nginx and etc you can simply use our docker image which makes things way faster.
+If you want to avoid all the hassle of installing the dependencies, configuring nginx and so on you can try our docker image which makes things a bit simpler.
First make sure you have docker and docker composer installed, so please follow the install instructions for your OS/Distro:
- https://docs.docker.com/engine/install/debian/
- https://docs.docker.com/compose/install/
After that:
-- Copy the config file called `docker-compose.config.example.yml` to `docker-compose.config.yml` with the values you want. Those that are left commented will use the default values.
-- Copy either `chibisafe.moe.http.example.conf` or `chibisafe.moe.https.example.conf` to `chibisafe.moe.conf` for either HTTP or HTTPS
-- - If using HTTPS make sure to put your certs into the `ssl` folder and name them accordingly:
+- Copy the config file called `docker-compose.config.example.yml` and name it `docker-compose.config.yml` with the values you want. Those that are left commented will use the default values.
+- Copy either `chibisafe.moe.http.example.conf` or `chibisafe.moe.https.example.conf` and name it `chibisafe.moe.conf` for either HTTP or HTTPS
+- - If using HTTPS make sure to put your certificates into the `ssl` folder and name them accordingly:
- - - `chibisafe.moe.crt` for the certificate
- - - `chibisafe.moe.key` for the certificate key
diff --git a/docs/sites.md b/docs/sites.md
new file mode 100644
index 0000000..39156ac
--- /dev/null
+++ b/docs/sites.md
@@ -0,0 +1,10 @@
+### Sites using chibisafe
+
+As you are aware by now chibisafe is a project meant to be self-hosted and so we've compiled the list below of sites using it. Some of them are open for registration and some might even offer anonymous uploads.
+
+- [chibisafe.moe](https://chibisafe.moe): A small safe worth protecting.
+- [safe.fiery.me](https://safe.fiery.me): Just another clone. *(v3)*
+- [dmca.gripe](https://dmca.gripe): a dmca-resistant, permanent file hosting service. *(v3)*
+- [safe.succmy.wang](https://safe.succmy.wang): A private clone with a ~~funny~~ bad name
+- [discordjs.moe](https://discordjs.moe): A まじ卍 as fuck copy of lolisafe.moe
+- Feel free to make a PR to add your site here.
diff --git a/docs/systemd.md b/docs/systemd.md
index 8804573..7fe0004 100644
--- a/docs/systemd.md
+++ b/docs/systemd.md
@@ -1,5 +1,5 @@
### Service config for systemd
-The file chibisafe-example.service is to be moved to `/etc/systemd/system/chibisafe.service`
+If you want to keep Chibisafe running by using systemd you can copy the example code shown below and create the file `/etc/systemd/system/chibisafe.service` with it.
You will need to edit the parameters:
- `User` to be the username/uid of your chibisafe instance
@@ -12,7 +12,8 @@ You will need to edit the parameters:
Example below.
-```[Unit]
+```
+[Unit]
Description=chibisafe, easy to use file uploader
After=network.target
@@ -25,4 +26,5 @@ ExecStart=/usr/bin/npm run start
Restart=always
[Install]
-WantedBy=multi-user.target```
+WantedBy=multi-user.target
+```