zipline/README.md

178 lines
8 KiB
Markdown
Raw Permalink Normal View History

2024-12-18 23:08:18 -05:00
> [!NOTE]
> This is a fork of Zipline created by the GitHub user known as [Danejur](https://github.com/danejur), which adds the function to enable OpenID Connect method for authentication. This helps Zipline meet the requirements for SudoVanilla's on-premise policy.
> [!NOTE]
2024-12-19 16:28:02 -05:00
> In order for this fork to work nicely with SudoVanilla Gateway, more specifically LogTo, during registration it'll use your email instead of a username for your Zipline username. This is because for whatever reason, the registration during the Gateway sign-up, a username option was not given. This means your username would of been "undefined" with the original fork. So, SudoVanilla made changes to make the registration use your `email` instead of the `preferred_username`, [see here](https://ark.sudovanilla.org/Infrastructure/zipline/src/branch/feature/oauth-authentik/src/pages/api/auth/oauth/authentik.ts#L69)
> [!NOTE]
> Other changes made were to only allow users to login or register via the SudoVanilla Gateway. The login page was modified to remove the entire login form and show only the SudoVanilla Gateway button. View commit history since December 18th to see all further changes made.
2024-12-18 23:08:18 -05:00
2021-09-04 17:01:08 -05:00
<div align="center">
<img src="https://raw.githubusercontent.com/diced/zipline/trunk/public/zipline_small.png"/>
2022-06-25 23:41:42 -05:00
A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
2022-06-25 23:41:42 -05:00
![Stars](https://img.shields.io/github/stars/diced/zipline?logo=github&style=flat)
![Version](https://img.shields.io/github/package-json/v/diced/zipline?logo=git&logoColor=white&style=flat)
![GitHub last commit (branch)](https://img.shields.io/github/last-commit/diced/zipline/trunk?logo=git&logoColor=white&style=flat)
[![Discord](https://img.shields.io/discord/729771078196527176?color=%23777ed3&label=discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/EAhCRfGxCF)
2022-10-02 18:01:05 -05:00
2022-12-15 21:02:10 -05:00
![Build](https://img.shields.io/github/actions/workflow/status/diced/zipline/build.yml?logo=github&style=flat&branch=trunk)
[![Docker Image (trunk)](https://img.shields.io/github/actions/workflow/status/diced/zipline/docker.yml?label=Docker%20%28trunk%29&logo=github&style=flat&branch=trunk)](https://github.com/diced/zipline/pkgs/container/zipline/?tag=trunk)
[![Docker Image (release)](https://img.shields.io/github/actions/workflow/status/diced/zipline/docker-release.yml?label=Docker%20%28release%29&logo=github&style=flat&branch=trunk)](https://github.com/diced/zipline/pkgs/container/zipline/?tag=latest)
2022-06-25 23:41:42 -05:00
2021-09-04 17:01:08 -05:00
</div>
2021-06-23 13:20:20 -05:00
2021-09-04 17:01:08 -05:00
## Features
2021-06-23 13:20:20 -05:00
- Configurable
- Fast
- Built with Next.js & React
- Token protected uploading
2022-02-21 01:01:31 -05:00
- Image uploading
2022-08-16 17:25:44 -05:00
- Image compression
- Password Protected Uploads
2022-02-21 01:01:31 -05:00
- URL shortening
- Text uploading
2023-03-18 23:52:14 -05:00
- URL Formats (uuid, dates, random alphanumeric, original name, zws, gfycat -> [animals](https://assets.gfycat.com/animals) [adjectives](https://assets.gfycat.com/adjectives))
2022-02-21 12:26:26 -05:00
- Discord embeds (OG metadata)
- Gallery viewer, and multiple file format support
2022-06-20 17:07:15 -05:00
- Code highlighting
2022-08-24 22:37:57 -05:00
- Fully customizable Discord webhook notifications
2022-10-19 00:26:20 -05:00
- OAuth2 registration (Discord and GitHub)
2022-11-26 17:33:42 -05:00
- Two-Factor authentication with Google Authenticator, Authy, etc (totp services).
2022-10-02 18:01:05 -05:00
- User invites
2022-10-27 23:26:54 -05:00
- File Chunking (for large files)
- File deletion once it reaches a certain amount of views
- Easy setup instructions on [docs](https://zipl.vercel.app/) (One command install `docker compose up -d`)
2021-06-23 13:20:20 -05:00
2023-03-18 23:52:14 -05:00
<details>
<summary>View upstream documentation</summary>
The website below provides documentation for more up-to-date features with the upstream branch. The normal documentation is for the latest release and is not updated unless a new release is made.
[https://trunk.zipline.diced.tech/](https://trunk.zipline.diced.tech/)
</details>
2022-10-27 23:53:12 -05:00
<details>
<summary><h2>Screenshots (click)</h2></summary>
View full album at [imgur](https://imgur.com/a/GzyowZ7)
![Login Page](https://i.imgur.com/14Er7qt.png)
![Dashboard](https://i.imgur.com/3JK5bp6.png)
![Files Page](https://i.imgur.com/grIaDs8.png)
</details>
2022-06-20 17:07:15 -05:00
# Usage
2021-09-04 17:01:08 -05:00
2022-06-20 17:07:15 -05:00
## Install & run with Docker
This section requires [Docker](https://docs.docker.com/get-docker/) and [docker compose](https://docs.docker.com/compose/install/).
2021-06-23 13:20:20 -05:00
2022-06-20 17:07:15 -05:00
```shell
git clone https://github.com/diced/zipline
cd zipline
docker compose up -d
2022-06-20 17:07:15 -05:00
```
### After installing
2022-06-20 17:07:15 -05:00
After installing, please edit the `docker-compose.yml` file and find the line that says `SECRET=changethis` and replace `changethis` with a random string.
Ways you could generate the string could be from a password managers generator, or you could just slam your keyboard and hope for the best.
## Building & running from source
2022-06-20 17:07:15 -05:00
This section requires [nodejs](https://nodejs.org), [yarn](https://yarnpkg.com/) or [npm](https://npmjs.com).
2022-06-20 17:07:15 -05:00
```shell
git clone https://github.com/diced/zipline
cd zipline
# npm install
yarn install
# npm run build
yarn build
# npm start
yarn start
```
# NGINX Proxy
2022-07-06 11:57:39 -05:00
This section requires [NGINX](https://nginx.org/).
2022-06-20 17:07:15 -05:00
```nginx
server {
listen 80 default_server;
client_max_body_size 100M;
server_name <your domain (optional)>;
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;
}
}
```
# Website
2022-06-20 17:07:15 -05:00
The default port is `3000`, once you have accessed it you can see a login screen. The default credentials are "administrator" and "password". Once you login please immediately change the details to something more secure. You can do this by clicking on the top right corner where it says "administrator" with a gear icon and clicking Manage Account.
# ShareX (Windows)
2022-06-20 17:07:15 -05:00
This section requires [ShareX](https://www.getsharex.com/).
2022-09-24 12:41:03 -05:00
After navigating to Zipline, click on the top right corner where it says your username and click Manage Account. Scroll down to see "ShareX Config", select the one you would prefer using. After this you can import the .sxcu into sharex. [More information here](https://zipl.vercel.app/docs/guides/uploaders/sharex)
2022-06-20 17:07:15 -05:00
# Flameshot (Linux)
2022-06-25 23:41:42 -05:00
This section requires [Flameshot](https://www.flameshot.org/), [jq](https://stedolan.github.io/jq/), and [xsel](https://github.com/kfish/xsel).
2022-06-20 17:07:15 -05:00
2022-11-26 17:33:42 -05:00
<details>
<summary>Wayland instructions</summary>
If using wayland you will need to have [wl-clipboard](https://github.com/bugaevc/wl-clipboard) installed, for the `wl-copy` command.
If you are not using GNOME/KDE/Qtile/Sway, and are using something like a wlroots-based compositor (ex. [Hyprland](https://github.com/hyprwm/Hyprland/), [River](https://github.com/riverwm/river), etc), you will need to set the `XDG_CURRENT_DESKTOP` environment variable to `sway`, which will just override it for this script. Adding `export XDG_CURRENT_DESKTOP=sway` to the start of the script will work.
After this, replace the `xsel -ib` with `wl-copy` in the script.
</details>
2022-09-24 12:41:03 -05:00
You can either use the script below, or generate one directly from Zipline (just like how you can generate a ShareX config).
2022-06-20 17:07:15 -05:00
To upload files using flameshot we will use a script. Replace $TOKEN and $HOST with your own values, you probably know how to do this if you use linux.
```shell
DATE=$(date '+%h_%Y_%d_%I_%m_%S.png');
flameshot gui -r > ~/Pictures/$DATE;
curl -H "Content-Type: multipart/form-data" -H "authorization: $TOKEN" -F file=@$1 $HOST/api/upload | jq -r 'files[0].url' | xsel -ib
```
# Contributing
2022-06-25 23:41:42 -05:00
2022-06-20 17:07:15 -05:00
## Bug reports
2022-11-28 23:47:24 -05:00
Create an issue on GitHub and use the template, please include the following (if one of them is not applicable to the issue then it's not needed):
- The steps to reproduce the bug
- Logs of Zipline
- The version of Zipline
- Your OS & Browser including server OS
- What you were expecting to see
2022-06-20 17:07:15 -05:00
## Feature requests
Create a discussion on GitHub, please include the following:
2022-11-17 18:30:49 -05:00
- Brief explanation of the feature in the title (very brief please)
- How it would work (Be detailed!)
2022-06-20 17:07:15 -05:00
## Pull Requests (contributions to the codebase)
Create a pull request on GitHub. If your PR does not pass the action checks, then please fix the errors. If your PR was submitted before a release, and I have pushed a new release, please make sure to update your PR to reflect any changes, usually this is handled by GitHub.