缺少 CORE_SECRET 环境变量时 Zipline 无法启动;默认监听 0.0.0.0:3000,改端口需同步改 compose 的 ports;v3 到 v4 无升级路径,需用内置导入器迁移数据;改 DATASOURCE_LOCAL_DIRECTORY 后要同步调整卷映射。
zipline
dicedMIT活跃维护开箱即用的 ShareX 文件上传服务器,支持截图分享、图库浏览和多种上传方式,Docker 一键部署,适合自建文件分享服务。
A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
echo "POSTGRESQL_PASSWORD=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" > .env
echo "CORE_SECRET=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" >> .env
docker compose up -dREADME 明确要求 CPU 支持 AVX 指令集,不提供非 AVX CPU 的镜像或二进制;未提及 GPU 或显存要求。
自托管的 ShareX 文件上传服务器,带文件夹、短链和 Webhook,Docker 一键起
开箱即用的 ShareX 文件上传服务器,支持截图分享、图库浏览和多种上传方式,Docker 一键部署,适合自建文件分享服务。
核心能力
- 支持上传任意文件并配文件夹与标签管理
- 内置 URL 短链、嵌入与 Discord/HTTP Webhook
- 提供 OAuth2、2FA、Passkeys 与密码保护
- 支持图片压缩、视频缩略图与分片上传
- 可切换本地存储或 S3 数据源
容易踩的坑
- v4.8.3最新正式版2026-11-08 · 2026-11-08 22:45 UTC
What's Changed
- added per-file and per-link Discord preview options #1153
- uploads can inherit account settings, use a custom Components V2 layout, or disable previews
- shortened URLs can preview their destination, use a custom Components V2 layout, or disable previews
- reorganized account settings into tabs for account, dashboard, file viewing, security, and tools
- restricted OIDC avatar downloads to images from the configured userinfo origin, with download size limits and timeouts (please stop being annoying with these ffs, you're all annoying and i hope you amount to nothing in this world)
- fixed existing sessions remaining valid after password resets through the admin apis
- fixed logins failing after 14 days of server uptime due to session cookie expiration
- fixed completed chunk uploads leaving worker threads running
- fixed original-filename uploads duplicating multi extensions such as .tar.gz
- fixed tos stale after settings changes
- fixed file viewers unintentionally clearing tags or carrying another file's tags over when switching files
- fixed ziplinectl import-dir --skip-ds still writing files to storage
- improved local and S3 storage error handling
- fixed failed S3 deletions being treated as successful during background cleanup
- fixed S3 object listing and thumbnail cleanup when using subdirectory prefixes or paginated results
- improved template parsing performance
- improved validation of upload maximum view limits
- hardened server settings updates
- updated dependencies
Pulls Merged
Full Changelog: v4.8.2...trunk
- added per-file and per-link Discord preview options #1153
- v4.8.22026-10-25 · 2026-10-25 05:56 UTC
查看更新说明
What's Changed
- fixed #1155
- if you are having issues while using pglite please update to this version but also take a look at the logs after running the new version, which they will tell you about "upgrading pglite", which 4.8.1 introduced (on accident) but eventually at some point (in the near but distant future) the upgrade-pglite utilities and the shipping of the old pglite and new pglite will be deprecated, so I recommend taking a look at https://zipline.diced.sh/docs/guides/ctl/ziplinectl-upgrade-pglite to see how to upgrade your pglite, and I will try my best to make sure that this manual step isn't needed anymore in the future.
Full Changelog: https://github.com/diced/zipline/compare/v4.8.1...v4.8.2
- fixed #1155
- v4.8.12026-10-23 · 2026-10-23 00:49 UTC
查看更新说明
What's Changed
- added multi-language support to the web UI #1143
- supports Chinese, Japanese, French, German, Spanish, Portuguese, Russian, Turkish, Dutch, Italian, and Romanian
- translations are now managed through Weblate; please contribute translations there instead of opening pull requests
- if you want to include a new language, please reach out on GitHub or Discord to me so that I can add it in Weblate.
- added configurable quick links to the dashboard
- added Discord Components V2 link previews #1152
- added an experimental full-page upload dropzone
- this can be disabled completely on the settings page
- added GPS metadata removal for HEIC/HEIF images
- redesigned the text upload page
- redesigned code and text file previews to use the full page
- replaced syntax highlighting with Shiki
- uses GitHub Dark and GitHub Light themes
- improved language detection and aliases, including TSX
- expanded supported code file types and improved MIME-type detection when assuming types from extensions
- redesigned the initial setup page
- improved OAuth/OIDC login handling and added OIDC logout support
- fixed client-side errors related to logging in
- fixed shortened URL identifiers colliding with another user's link and redirecting visitors to the wrong destination
- fixed concurrent uploads being able to claim the same filename
- fixed uploads and file renames from using the reserved
.thumbnailprefix to overwrite generated thumbnails - fixed thumbnails remaining accessible after their parent file expired or reached its maximum view count
- fixed import endpoints accepting and parsing large request bodies before checking authentication and administrator permissions
- fixed GPS metadata removal leaving recoverable coordinate values in image files
- fixed chunked uploads skipping GPS removal when it was enabled
- fixed failed uploads leaving file records behind that consumed quota and reserved filenames
- fixed cleanup removing database records when deleting the corresponding stored files failed
- failed deletions now retain their records so cleanup can retry
- fixed files and shortened URLs with a maximum view limit of
0being deleted- zero continues to mean unlimited views
- fixed background task failures becoming unhandled promise rejections
- improved HTTP range request handling
- validates range syntax and bounds
- unsatisfiable ranges return
416with the correctContent-Rangeheader without sending the entire file
- fixed file-size requery operations leaving unused streams open
- fixed extensionless uploads returning incorrect URLs
- updated dependencies and fixed compatibility issues introduced by package updates
- updated the nix dev env
Pulls Merged
Thanks to the following for helping with translations: @BlackHole1, @KeuqS, @Otte-S, @izgara, @Stef-DP, @lekrkoekje, @DGNVMusic, @HelpMePleasepls
- feat(i18n): add multi-language support to the web UI #1143
- feat(i18n): add Turkish locale #1145
- chore(i18n): update translations #1150
- chore(i18n): update translations #1151
- feat: add Discord Components V2 link previews #1152
Full Changelog: v4.8.0...trunk
- added multi-language support to the web UI #1143
- v4.8.02026-09-27 · 2026-09-27 23:17 UTC
查看更新说明
Big update, please read the following before updating:
- You must be on version
4.7.0before updating to4.8.0 - It is recommended but not required to take a database backup, if you don't trust me then take a backup ig
- If you develop a third-party client that implemeneted the pre-4.8 partial uploads structure, you will need to redo it, check out https://zipline.diced.sh/docs/api/chunked-uploads for docs
- Docs have also been updated to reflect new stuff such as PGLite support if you want to use that
- they also include a list of all the errors that the API can return
What's Changed
- ⚠️ https://github.com/diced/zipline/security/advisories/GHSA-rgxm-54cf-whf7, https://github.com/diced/zipline/security/advisories/GHSA-7xv9-wr46-j578, https://github.com/diced/zipline/security/advisories/GHSA-wwrw-gq56-7wpj
- replaced Prisma with Drizzle ORM
- existing databases are migrated automatically on startup
- if you're running an older release, update to v4.7.0 and let its migrations finish before updating to v4.8.0
- back up your database before updating
- added PGlite support for running Zipline without a separate PostgreSQL server
- set
DATABASE_URL=pglite:///absolute/path/to/database - added
ziplinectl migrate-pgliteto copy an existing PostgreSQL database to PGlite - Docker users must mount persistent storage for the database directory
- set
- added a trusted proxy allowlist
- if you're using a reverse proxy,
CORE_TRUST_PROXY=truealone is no longer enough - set
CORE_TRUSTED_PROXIESto your proxy's IP addresses or CIDRs, separated by commas, or configure "Trusted Proxies" in Server Settings - an empty list ignores forwarded headers, which means clients behind the same proxy share rate limits
- restart Zipline after changing these settings
- if you're using a reverse proxy,
- reworked partial uploads to use single-use continuation tokens
- custom uploaders must replace
partialIdentifier/x-zipline-p-identifierwithpartialToken/x-zipline-p-token - each non-final chunk returns a new token for the next chunk; chunks must be uploaded sequentially
- corrected
Content-Rangehandling to use inclusive end offsets - valid continuation requests no longer count against the upload rate limit
- improved cleanup of failed and interrupted uploads
- custom uploaders must replace
- redesigned the Pending Files modal
- added a "Clear completed" button to remove completed entries without deleting uploaded files
- added an iTake configuration generator for macOS
- fixed file uploads on Windows
- fixed filename encoding and handling of special characters in file URLs
- fixed code previews stripping parts of source files before syntax highlighting #1136
- fixed invalid or unreachable OIDC avatar URLs causing errors
- fixed database configuration when using
DATABASE_*variables instead ofDATABASE_URL - fixed disabled MIME-type policies not being enforced when editing a file's type
- fixed extension restrictions being bypassed through casing and double extensions
- fixed concurrent requests and raw file access bypassing maximum view limits
- fixed shortened URL view-limit handling to match files
- fixed OpenAPI schemas used to generate the API documentation
- switched development tooling to TypeScript 7, oxlint, and oxfmt
- added automated tests
Pulls Merged
- refactor: prisma to drizzle-orm by @diced in https://github.com/diced/zipline/pull/1128
- fix: windows file uploads by @justadityaraj in https://github.com/diced/zipline/pull/1138
- fix: #1136 by @justadityaraj in https://github.com/diced/zipline/pull/1137
- feat: add iTake generator (macOS only) by @SerStars in https://github.com/diced/zipline/pull/1134
- fix: derive core.databaseUrl from DATABASE_* variables by @Gauvino in https://github.com/diced/zipline/pull/1140
New Contributors
- @justadityaraj made their first contribution in https://github.com/diced/zipline/pull/1138
- @SerStars made their first contribution in https://github.com/
- You must be on version
- v4.7.02026-08-16 · 2026-08-16 21:49 UTC
查看更新说明
What's changed
This update focuses on upload hardening, account security, storage reliability, and general backend cleanup.
- 🚨 https://github.com/diced/zipline/security/advisories/GHSA-wq7g-g9f8-8q2p
- added a per-upload option for extensionless file URLs
- available in the dashboard uploader and generated ShareX, iShare, Flameshot, and shell configurations
- works with regular and partial uploads when extensionless URLs are enabled on the server
- added new version checking which queries GitHub directly instead of relying on the external Zipline version service
- checks are cached for six hours
ZIPLINE_GITHUB_TOKENcan optionally authenticate requestsFEATURES_VERSION_APIand the old Version API server setting have been removed
- added namespace-specific
DEBUGlogging- use values such as
zipline.tasks.metricsto enable individual loggers - use values such as
!zipline.tasks.metricsto exclude individual loggers
- use values such as
- fixed edge cases with user accounts
- changing an existing password now requires the current password
- user responses no longer expose TOTP secrets, OAuth access/refresh tokens, password hashes, or API-token fields
- TOTP status is now returned as
totpEnabledin the api
- restricted full Server Settings access to super administrators
- fixed edge cases and hardened partial uploads
- fixed concurrent uploads and shortened URLs being able to race past configured quotas
- fixed concurrent registrations being able to exceed an invite's maximum uses
- fixed disabled MIME-type policies not being consistently applied to regular, partial, assumed, and compressed uploads
- fixed invalid or conflicting filenames being detected only after files had already been processed
- collision checks now account for multiple files in one request and extensions changed by compression
- fixed
FILES_MAX_EXPIRATIONallowing uploads to bypass the limit by requestingnever - fixed files with long names returning a 404 #1124
- fixed older saved upload settings sending an invalid compression format and preventing uploads such as PDFs #1118
- fixed successful uploads not returning a response when instantaneous thumbnails were enabled without an available thumbnail worker
- fixed multipart S3 renames leaving the original object behind
- fixed S3 maintenance operations only seeing the first 1,000 objects
- fixed thumbnail replacement producing misleading missing-object errors on S3
- fixed valid multi-label domains and longer TLDs being rejected in Server Settings #1126
- fixed disabled metrics continuing to collect data and remaining accessible through the stats API
- fixed metrics graphs mutating shared data and causing summary cards to display old values as current
- fixed metrics tooltips displaying invalid dates when no label is available
- fixed HTTP webhook payload sanitization mutating shared request objects and removing fields needed by other webhook consumers
- fixed clicking the empty backdrop around fullscreen images and videos not closing the file viewer
- fixed the local datasource throwing when its optional write options were omitted
- fixed API response typings for file and URL password-token endpoints
- fixed dashboard settings error handling to avoid malformed error messages
- fixed the development Docker Compose configuration
- creates the database referenced by
DATABASE_URL - waits for PostgreSQL to become healthy before starting Zipline
- creates the database referenced by
- fixed the production Docker build after removal of the old Prettier configuration file
- fixed validation and build scripts
- updated GitHub Actions, pnpm, and development documentation
- improved environment-variable overrides in Server Settings with a counted accordion and direct links to affected settings
PRs merged
- fix: prevent stateful regex from rejecting valid domains (#1126) by @DGNVMusic in https://github.com/diced/zipline/pull/1127
New Contributors
- @DGNVMusic made
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
The next generation ShareX / File upload server
Documentation: 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
Visit the 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:16
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRESQL_USER:-zipline}
POSTGRES_PASSWORD: ${POSTGRESQL_PASSWORD:?POSTGRESQL_PASSWORD is required}
POSTGRES_DB: ${POSTGRESQL_DB:-zipline}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD', 'pg_isready', '-U', 'zipline']
interval: 10s
timeout: 5s
retries: 5
zipline:
image: ghcr.io/diced/zipline
ports:
- '3000:3000'
env_file:
- .env
environment:
- DATABASE_URL=postgres://${POSTGRESQL_USER:-zipline}:${POSTGRESQL_PASSWORD}@postgresql:5432/${POSTGRESQL_DB:-zipline}
depends_on:
postgresql:
condition: service_healthy
volumes:
- './uploads:/zipline/uploads'
- './public:/zipline/public'
- './themes:/zipline/themes'
healthcheck:
test: ['CMD', 'wget', '-q', '--spider', 'http://localhost:3000/api/healthcheck']
interval: 15s
timeout: 2s
retries: 2
volumes:
pgdata:
[!WARNING] Zipline requires a cpu with AVX support. We don't provide binaries or images that have support for non-AVX cpus
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)
Temporary files default to ./uploads/.tmp. Setting CORE_TEMP_DIRECTORY to another filesystem, such as tmpfs, can reduce local upload performance.
Generating Secrets
echo "POSTGRESQL_PASSWORD=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" > .env
echo "CORE_SECRET=$(openssl rand -base64 42 | tr -dc A-Za-z0-9 | cut -c -32 | tr -d '\n')" >> .env
Without the CORE_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 the docker-compose.yml above. If you want to change this, you can set the DATASOURCE_LOCAL_DIRECTORY environment variable to a different path.
DATASOURCE_LOCAL_DIRECTORY=/path/to/your/local/files
# or relative to the working directory
DATASOURCE_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 to 0.0.0.0:3000, which is also reflected in the docker-compose.yml above. If you want to change this, you can set the CORE_PORT and CORE_HOSTNAME environment variables to a different port and hostname.
CORE_PORT=80
CORE_HOSTNAME=localhost
[!NOTE] If you change the port, you will need to update the
portssection in thedocker-compose.ymlfile.
Using S3
If you want to use S3 instead of the local filesystem, you can set the following environment variables:
DATASOURCE_TYPE=s3
DATASOURCE_S3_ACCESS_KEY_ID=access_key_id
DATASOURCE_S3_SECRET_ACCESS_KEY=secret
DATASOURCE_S3_BUCKET=zipline
DATASOURCE_S3_REGION=us-west-2
For more information, like other providers, see the docs.
Starting Zipline
Simply run the following command to start the server:
docker compose up -d
You should be able to access the website at http://localhost:3000 or the port you specified.
Manual Install
See docs 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.
See migration for more information.
Contributing
Bug reports, feature requests, code pull requests, and translations are welcome. See below for how to contribute.
Translations
Translations are managed through Weblate. Sign in through GitHub to add or improve translations. Translation pull requests are not accep ted; please submit translation changes through Weblate.
English is the source language, and untranslated text falls back to English. Preserve placeholders such as {{count}}, markup tags, and the plural forms required by your language.
For code contributions, add new source strings to src/lib/i18n/locales/en/<namespace>.json and use SafeTrans for translated markup instead of Trans directly. Run pnpm test to check translation keys, placeholders, tags, and plural forms.
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
Nix
If you have Nix and direnv installed, you can simply cd into the cloned directory and run the following command:
direnv allow
After doing so, your shell will be setup for development.
If you aren't using direnv, you can run the following command to enter the nix shell:
nix develop --no-pure-eval
Useful commands regarding the postgres server:
| Command | Description |
|---|---|
pgup | Starts the postgres server in the background. |
pg_ctl status | See if the postgres server is running |
minioup | Start a Minio server for testing S3 |
downall | Stops any running postgres or minio service. |
After familiarizing yourself with the environment, you can continue below (skipping the prerequisites since they are already installed).
Prerequisites
- Node.js (22 or newer; Node.js 24 recommended)
- pnpm (11.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
# required
CORE_SECRET="a secret that is 32 characters long"
# required
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/zipline?schema=public"
# these are optional
CORE_PORT=3000
CORE_HOSTNAME=0.0.0.0
# one of these is required
DATASOURCE_TYPE="local"
# DATASOURCE_TYPE="s3"
# if DATASOURCE_TYPE=local
DATASOURCE_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
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 uses Drizzle ORM for its database schema and queries.
After changing src/lib/db/schema.ts, generate a migration with Drizzle Kit. Zipline applies committed migrations automatically on startup.
pnpm db:migrate
This command only creates a migration file; Zipline applies committed migrations when it starts. If you wish to push schema changes directly without generating a migration file, use db:prototype; this is only recommended for local prototyping 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
Testing zipline-ctl
To build the ctl, you can run the following command:
pnpm build
then run any command you want
pnpm ctl help
Documentation
Documentation is located at zipline.diced.sh and the source is located at github.com/diced/zipline-docs.
Security
Security issues are taken seriously, and should be reported via GitHub Advisories. For more information see the security policy.