Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!

License

NotificationsYou must be signed in to change notification settings

diced/zipline

Repository files navigation

The next generation ShareX / File upload server

StarsVersionGitHub last commit (branch)Discord

Build

zipline.diced.sh |old v3.zipline.diced.sh

Features

  • Setup Quickly:Get Started with Docker
  • Configure
  • Upload any file
  • Folders
  • Tags
  • URL shortening
  • Embeds
  • Discord Webhooks
  • HTTP Webhooks
  • OAuth2
  • 2FA
  • Passkeys
  • Password Protection
  • Image Compression
  • Video Thumbnails
  • API
  • PWA
  • Partial Uploads
  • Invites
  • Quotas
  • Custom Themes
  • ... and more!

Usage

Visitthe docs for a more in-depth guide on how to get started.

Install and Run with Docker

This is the recommended way to run Zipline:

services:postgresql:image:postgres:16restart:unless-stoppedenv_file:      -.envenvironment:POSTGRES_USER:${POSTGRESQL_USER:-zipline}POSTGRES_PASSWORD:${POSTGRESQL_PASSWORD:?POSTGRESSQL_PASSWORD is required}POSTGRES_DB:${POSTGRESQL_DB:-zipline}volumes:      -pgdata:/var/lib/postgresql/datahealthcheck:test:['CMD', 'pg_isready', '-U', 'zipline']interval:10stimeout:5sretries:5zipline:image:ghcr.io/diced/ziplineports:      -'3000:3000'env_file:      -.envenvironment:      -DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}depends_on:      -postgresqlvolumes:      -'./uploads:/zipline/uploads'      -'./public:/zipline/public'      -'./themes:/zipline/themes'volumes:pgdata:

Volumes

  • ./uploads - The folder where all the user uploads are stored (the default is./uploads)
  • ./public - The folder where all the public assets are stored (must mount to/zipline/public)
  • ./themes - The folder where all the custom themes are stored (must mount to/zipline/themes)

Generating Secrets

echo"POSTGRESQL_PASSWORD=$(openssl rand -base64 42| tr -dc A-Za-z0-9| cut -c -32| tr -d'\n')"> .envecho"CORE_SECRET=$(openssl rand -base64 42| tr -dc A-Za-z0-9| cut -c -32| tr -d'\n')">> .env

Without theCORE_SECRET environment variable, Zipline will not start.

Changing where uploads are stored

By default, Zipline will default to the./uploads folder, which is also reflected in thedocker-compose.yml above. If you want to change this, you can set theDATASOURCE_LOCAL_DIRECTORY environment variable to a different path.

DATASOURCE_LOCAL_DIRECTORY=/path/to/your/local/files# or relative to the working directoryDATASOURCE_LOCAL_DIRECTORY=./relative/path/to/files

Note

Remember to change volume mappings in the docker-compose.yml file if you change this.

Changing the port and hostname

By default, Zipline binds to0.0.0.0:3000, which is also reflected in thedocker-compose.yml above. If you want to change this, you can set theCORE_PORT andCORE_HOSTNAME environment variables to a different port and hostname.

CORE_PORT=80CORE_HOSTNAME=localhost

Note

If you change the port, you will need to update theports section in thedocker-compose.yml file.

Using S3

If you want to use S3 instead of the local filesystem, you can set the following environment variables:

DATASOURCE_TYPE=s3DATASOURCE_S3_ACCESS_KEY_ID=access_key_idDATASOURCE_S3_SECRET_ACCESS_KEY=secretDATASOURCE_S3_BUCKET=ziplineDATASOURCE_S3_REGION=us-west-2

For more information, like other providers, see thedocs.

Starting Zipline

Simply run the following command to start the server:

docker compose up -d

You should be able to access the website athttp://localhost:3000 or the port you specified.

Manual Install

Seedocs for more information.

Migrating from v3

Zipline v4 was a complete rewrite, and as such, there is no upgrade path from v3 to v4. You will need to export your data from v3 and import it into v4. This process is made easier by the fact that v4 has a built-in importer to import data from v3.

Seemigration for more information.

Contributing

Contributions of any kind are welcome, whether they are bug reports, pull requests, or feature requests.

Bug Reports

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, and whether or not you are using Docker (include the image digest/tag if possible)
  • Your OS & Browser including server OS
  • What you were expecting to see
  • How it can be fixed (if you know)

Feature Requests

Create a discussion on GitHub, and please include the following:

  • Brief explanation of your feature in the title (very brief)
  • How it would work (be detailed)

Pull Requests

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.

Development

Here's how to setup Zipline for development

Prerequisites

  • nodejs (lts -> 20.x, 22.x)
  • pnpm (10.x)
  • a postgresql server

Setup

You should probably use a.env file to manage your environment variables, here is an example .env file with every available environment variable:

DEBUG=zipline# requiredCORE_SECRET="a secret that is 32 characters long"# requiredDATABASE_URL="postgresql://postgres:postgres@localhost:5432/zipline?schema=public"# these are optionalCORE_PORT=3000CORE_HOSTNAME=0.0.0.0# one of these is requiredDATASOURCE_TYPE="local"# DATASOURCE_TYPE="s3"# if DATASOURCE_TYPE=localDATASOURCE_LOCAL_DIRECTORY="/path/to/your/local/files"# if DATASOURCE_TYPE=s3# DATASOURCE_S3_ACCESS_KEY_ID="your-access-key-id"# DATASOURCE_S3_SECRET_ACCESS_KEY="your-secret-access-key"# DATASOURCE_S3_REGION="your-region"# DATASOURCE_S3_BUCKET="your-bucket"# DATASOURCE_S3_ENDPOINT="your-endpoint"# ^ if using a custom endpoint other than aws s3# optional but both are required if using ssl# SSL_KEY="/path/to/your/ssl/key"# SSL_CERT="/path/to/your/ssl/cert"

Install dependencies:

pnpm install

Finally you may start the development server:

pnpm dev

If you wish to build the production version of Zipline, you can run the following command:

pnpm build

And to run the production version of Zipline:

pnpm start

Making changes to the database schema

Zipline usesprisma as its ORM, and as such, you will need to use the prisma CLI to facilitate any changes to the database schema.

Once you have made a change toprisma.schema, you can run the scriptdb:migrate to generate a migration file. This script doesn't apply the migration, as Zipline handles applying migrations itself on startup.

pnpm db:migrate

If you wish to push changes to the database without generating a migration file, you can run the scriptdb:prototype. This is only recommended for testing purposes, and should not be used in production.

pnpm db:prototype

Linting and Formatting

Zipline will fail to build unless the code is properly formatted and linted. To format the code, you can run the following command:

pnpm validate

Testingzipline-ctl

To build the ctl, you can run the following command:

pnpm build:server

then run any command you want

pnpm ctlhelp

Documentation

Documentation is located atzipline.diced.sh and the source is located atgithub.com/diced/zipline-docs.

Security

Security issues are taken seriously, and should be reported viaGitHub Advisories. For more information see thesecurity policy.


[8]ページ先頭

©2009-2025 Movatter.jp