Pastebin
Section titled “ Pastebin”Pastebin shares text, images, and files by link.
- Questions? Ask in the Cloudron Forum - Pastebin
- Pastebin repo
- Pastebin issue tracker
Open / to create a paste. The page has three modes: Text, Image, and File. Ctrl+S saves the paste and copies the link.
Author, notes, language, and expiry are optional. The language list starts at Plain text and updates when pasted text looks like a known language. An image can be cropped or rotated before it is saved. A file paste keeps the original filename and is downloaded rather than shown inline.
A saved paste is at /<key>. /raw/<key> returns the text, image, or file bytes.
Passwords
Section titled “Passwords”A paste can require a password. Leave the field blank to skip it.
A logged-in user can open a password-protected paste without the password. Turn off Allow password protected pastes in Settings to stop new pastes from requiring a password. Pastes that already have a password stay protected.
Private pastes
Section titled “Private pastes”Turn on Only logged-in users can paste to require a Cloudron login before creating a paste. The composer then shows a Public checkbox, left off.
- Leave it off and only a logged-in user can open the paste.
- Check it and anyone with the link can view the paste.
Pastes created before the switch was turned on stay public.
The Legal section in Settings holds the terms text. Leave it empty and no link is shown.
When it is set, Terms appears at the bottom of the composer Details pane and in the footer of a paste. The link opens /terms.html. Plain text keeps its line breaks, and HTML is allowed.
The admin interface is at /_admin. Sign in with a Cloudron account.
The paste list shows the key, author, expiry, size, whether a password is set, whether the paste is public, and the address that created it. Select several rows to delete them together. The address is not shown on the public paste page.
Settings
Section titled “Settings”Default retention is the expiry used when a paste does not pick one. Longest retention is the ceiling for new pastes. It also limits the Expires list on the composer. Existing pastes keep the expiry they were saved with.
Set a size limit to 0 to hide that paste type. Text is measured in KB. Images and files are measured in MB. Accepted images are PNG, JPEG, GIF, and WebP.
Pastes per IP per hour is how many pastes one address can create in an hour. The default is 30. A logged-in user is not limited. Set it to 0 for no limit. Deleting a paste does not reset the count for that hour.
Wrong passwords per IP per hour is how many wrong passwords one address can try in an hour. The default is 10. After the limit, that address has to wait until the hour passes, even with the right password. Set it to 0 for no limit.
Upload API
Section titled “Upload API”cloudron-support uploads a log with POST /upload. Send the file as the content field and an expiry as expiration.
curl --silent --include -X POST https://paste.example.com/upload \ --form content=@log \ --form expiration=1weekA successful upload responds with 302 and a Location header of /upload/<key>. GET /upload/<key> redirects to the paste page.
expiration accepts 10min, 1hour, 1day, 1week, 1month, 1year, and never. Leave it out to use the default retention. The text size limit still applies.
When Only logged-in users can paste is on, this upload is rejected. The support script has no login.