Pastefy is an feature-rich Open Source self-hostable Pastebin. https://pastefy.app
  • Vue 57.1%
  • Java 32.3%
  • TypeScript 8.9%
  • CSS 1%
  • HTML 0.4%
  • Other 0.2%
Find a file
2025-10-15 03:40:42 +02:00
.github Updated README 2025-03-26 01:39:40 +01:00
backend Design Improvements, added pagination as query param, and more 2025-10-15 03:40:42 +02:00
deployment Pastefy v6 2021-02-01 14:10:03 +01:00
docs Added docs 2025-10-11 19:07:16 +03:00
frontend Design Improvements, added pagination as query param, and more 2025-10-15 03:40:42 +02:00
.env.example Changed docker-compose.yml the example env and readme 2021-09-20 23:10:51 +02:00
.gitignore New Frontend 2025-03-24 17:57:31 +01:00
.gitlab-ci.yml Added caching for deployment 2021-02-01 21:48:20 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2021-02-04 23:36:18 +01:00
CONTRIBUTING.md Create CONTRIBUTING.md 2021-02-04 23:43:44 +01:00
docker-compose.override.yml Added docker-compose.override.yml for development and changed docker-compose.yml 2021-09-21 16:41:00 +02:00
docker-compose.yml Fixed docker-compose, changed readme, fixed expiry and more 2023-08-17 14:52:56 +02:00
Dockerfile Update java versionx 2025-05-18 20:58:59 +02:00
Dockerfile.save Added custom plugin support 2025-05-03 03:49:04 +02:00
LICENSE Create LICENSE 2021-02-04 23:29:42 +01:00
PLUGINS.md Added custom plugin support 2025-05-03 03:49:04 +02:00
README.md Added docs 2025-10-11 19:16:13 +03:00

Pastefy is an open source alternative to Gists or Pastebin.
You want to share some code to your friends or just save it for yourself? Just paste it.

Try out the public instance https://pastefy.app
Visit the docs for everything around Pastefy here: https://docs.pastefy.app

Features

  • Raw-Preview
  • Copy Button
  • Fork
  • An API (Docs)
  • Log in
    • Folders
    • See your created pastes
    • delete created pastes
  • Create paste with curl -F f=@file.txt pastefy.app
  • Extensions:
    • VS-Code
    • Raycast
  • Previews for (file extension)

Overview

Screenshots

Deploy

See Self-Hosting for more options.

Container-Less

git clone https://github.com/interaapps/pastefy.git
cd pastefy/frontend
npm run install
npm run build
cd ../backend
mvn clean package
cd ..
cp .env.example .env
nano .env
java -jar backend/target/backend.jar

Using intelliJ? Look at Develop

Configuration

See Configuration for all options.

Adding login

You can choose between INTERAAPPS (best integration), GOOGLE, GITHUB, DISCORD or TWITCH for the provider (You can use all of them at the same time).

OAUTH2_${provider}_CLIENT_ID=${client_id}
OAUTH2_${provider}_CLIENT_SECRET=${client_secret}

Example

OAUTH2_INTERAAPPS_CLIENT_ID=dan3q9n
OAUTH2_INTERAAPPS_CLIENT_SECRET=ASDFASDF

Custom OIDC Example

OAUTH2_CUSTOM_CLIENT_ID=CLIENT_ID
OAUTH2_CUSTOM_CLIENT_SECRET=SECRET
OAUTH2_CUSTOM_AUTH_ENDPOINT=https://accounts.interaapps.de/auth/oauth2
OAUTH2_CUSTOM_TOKEN_ENDPOINT=https://accounts.interaapps.de/api/v2/authorization/oauth2/access_token
OAUTH2_CUSTOM_USERINFO_ENDPOINT=https://accounts.interaapps.de/api/v2/oidc/userinfo

Develop

Build frontend into the backend

# You might want to build the frontend
cd frontend
npm build prod

Frontend

Run the backend (On port 1337) and then go to the frontend and run

cd frontend
npm run serve

We are using IntelliJ Idea and Visual Studio code.

API

You can find the docs of the Pastefy-Rest-APi here: Docs

Administration

If you want to give yourself the admin role, you have to log into your MySQL server and set type on your account to ADMIN in the pastefy_users table.

You'll find the admin panel under https://YOUR_URL/admin

Extra Features

Read more here Docs

Upload via Curl

curl -F f=@file.txt pastefy.app

Asciinema support

configure: nano ~/.config/asciinema/config

[api]
url = https://pastefy.app

Using asciinema

asciinema rec test.cast
# ...
asciinema upload test.cast

# Authenticate via Pastefy
# Pastefy will request you to set the install-id via `echo YOUR_PASTEFY_API_KEY > ~/.config/asciinema/install-id`
asciinema auth

asciinema upload test.cast