No description
  • TypeScript 98%
  • JavaScript 1.1%
  • CSS 0.5%
  • MDX 0.3%
  • Dockerfile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sooox db46d18e6f
All checks were successful
/ build-and-push (push) Successful in 15m8s
Update the logo and regenerate the icons
2026-10-27 14:18:58 +01:00
.forgejo/workflows Update the logo and regenerate the icons 2026-10-27 14:18:58 +01:00
.github Run image builds on Forgejo Actions 2026-10-21 15:47:56 +02:00
.husky refactor: openapi schema (#553) 2024-02-09 08:54:56 -08:00
.vscode Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
.yarn/releases Feature/next (#573) 2024-04-04 10:58:05 -07:00
docker Build Docker images on Node 24 2026-10-21 15:39:13 +02:00
docs Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
minio/data Feature/next (#573) 2024-04-04 10:58:05 -07:00
packages Update the logo and regenerate the icons 2026-10-27 14:18:58 +01:00
.dockerignore Update the logo and regenerate the icons 2026-10-27 14:18:58 +01:00
.editorconfig More stuff 2019-02-19 00:06:55 +09:00
.eslintrc.json Feature/next (#573) 2024-04-04 10:58:05 -07:00
.gitattributes wip 2021-06-19 02:01:25 +09:00
.gitignore Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
.prettierignore Feature/next (#573) 2024-04-04 10:58:05 -07:00
.prettierrc.json [Feature] Switch to Hyper-Express (#344) 2023-06-03 05:03:16 -03:00
.yarnrc.yml Feature/next (#573) 2024-04-04 10:58:05 -07:00
Caddyfile Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
docker-compose.dev.yml Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
docker-compose.example.yml Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
LICENSE Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
package.json Fork chibisafe as sojusafe 2026-10-21 14:56:00 +02:00
README.md Update the logo and regenerate the icons 2026-10-27 14:18:58 +01:00
tsconfig.json feat: remove files store (#477) 2023-09-19 23:21:23 +09:00
turbo.json Feature/next (#573) 2024-04-04 10:58:05 -07:00
yarn.lock Upgrade to Fastify 5, Next 15 and React 19 2026-10-21 15:17:08 +02:00

sojusafe

sojusafe

License: MIT

sojusafe is a fork of chibisafe by Pitu with additional security and privacy hardening.

What is sojusafe?

sojusafe is a file uploader service written in typescript that just works. It's easy to use, easy to deploy, free and open source. It accepts files, photos, documents, anything you imagine and gives you back a shareable link for you to send to others.

You can run it in public mode, user accounts mode or invite-only mode. Big files are automatically chunked to minimize network failure and users can create an API key to use the service programatically and hook it to other things.

The service also comes with a dashboard where you can edit almost every configuration of the instance directly from the UI without having to touch environment or configuration files manually. Control the name, the rate limit, max file size, accepted extensions, meta descriptions, etc directly from our intuitive panel.

Features of v6 aka Holo

  • 📄 Beautiful docs (upstream chibisafe docs, still applicable)
  • 🗄️ S3 Storage Support
  • 📷 Beautiful masonry to browse media files
  • ✨ Chunked uploads for big files
  • 🔗 Share direct links to uploaded files
  • 📂 Albums/Folders with direct links to share
  • 📝 Snippets/Gists creation with direct links to share
  • 🗃️ File management and file tagging
  • 🙋 User management and quotas
  • 🔗 Built-in URL shortener
  • ✉️ Public or Private mode (with invite support)
  • ⬆️ ShareX support out-of-the-box to upload screenshots/screenrecordings from your desktop
  • 📱 iOS shortcut to upload files through the share menu
  • 🌐 Browser extension to upload content from websites easily
  • 🧩 Easily extensible
  • 📖 Open source
  • 🚫 No ads and no tracking (except for IP logging of requests)

Installing and running sojusafe

On first start sojusafe creates an account named admin with a random password that is printed once in the server logs (docker compose logs sojusafe_server), unless you set ADMIN_PASSWORD. You have to change that password on your first login. Also we highly recommend using docker for sojusafe.

cp docker-compose.example.yml docker-compose.yml
docker compose up -d

The upstream chibisafe guides still apply, substituting the sojusafe image names (git.sooox.cc/sooox/sojusafe and git.sooox.cc/sooox/sojusafe-server):

Security and privacy

On top of chibisafe, sojusafe adds:

  • Image metadata removal: EXIF (including GPS), XMP, IPTC and comments are stripped from JPEG, PNG and WebP uploads without re-encoding the image. The photo orientation is kept. Can be turned off in Settings > Privacy & Security.
  • Uploader IP minimization: IPs stored with uploads can be dropped entirely, truncated (/24, /48), stored as a keyed hash (default) or kept in full, and are erased after a retention period (30 days by default). Changing the mode converts existing records. Bans and rate limits use the live connection and keep working.
  • Log hygiene: request logs leave out client IPs (unless enabled), query strings and credentials, and are kept for LOG_RETENTION_DAYS (default 14).
  • Expiring uploads: uploaders can pick a lifetime per upload (also through the X-Expires-In header, in seconds) and admins can cap the maximum lifetime. Expired files are deleted automatically.
  • Sessions: login tokens are tied to server-side sessions, expire after 7 days (configurable), and are revoked on logout, password change and when an account is disabled. Users can sign out every other session. Passwords use bcrypt cost 12 and must be at least 8 characters.
  • Two-factor authentication: optional TOTP with single-use recovery codes. Admins can reset it for users who lost access.
  • No default credentials: see above. Existing instances whose owner still uses admin/admin are forced to change it.
  • Admins can't browse user content: there is no admin view of other users' files, albums, short links or uploads per IP. Admins keep user management, statistics, bans and a Takedown page that quarantines or deletes a file or short link from its public URL. This is a dashboard boundary: whoever runs the server can still read the disk and database.
  • Security headers: a Content-Security-Policy and related headers for the app and the API.

Uploaded file security

Uploaded files are untrusted content. The supplied Caddyfile and the development server apply these headers to upload responses, including files uploaded before the update:

Content-Security-Policy: sandbox; script-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'
X-Content-Type-Options: nosniff
Access-Control-Allow-Origin: *

The policy disables scripts and isolates uploaded documents from the application's origin. Anonymous CORS access lets native media viewers load public uploads from that isolated origin. These headers must be scoped to uploaded files so they do not restrict the application or grant CORS access to private API responses.

Existing Docker installations must update their mounted Caddyfile and reload or restart Caddy. Updating the application images alone does not replace that file. Custom web servers, CDNs, and S3 storage must apply the same protections to uploaded file responses. Purge any cached upload responses when deploying the change. Blocking upload extensions alone does not protect files already stored.

Migrate from older versions

v5 to v6

If you come from v5 you might be used to chibisafe exposing 1 single port for you to reverse proxy into nginx/caddy/apache. Starting from v6 this is also the case (although port is now 24424) as long as you run the configuration we provide with docker. Other than configuring your reverse proxy accordingly, all you need to do to migrate is to copy both the uploads/ and database/ folders into your new instance folder. Once sojusafe starts it will apply the necessary migrations automatically.

Caution

Migrating from an older version than v5 to v6 is not possible, so we recommend setting up a new instance instead.

Credits

sojusafe is based on chibisafe © Pitu and its contributors.

Released under the MIT License.