selfpaste
Pasteservice for your own pleasure.
If you are talking about a pasteservice Pastebin or dpaste is well known.
I had the idea to build this by myself. Learning and creating was the main reason. Also to have a service which can be self hosted and run everywhere without the need to be in the internet.
This is no project to be an alternative nor to be better, just something everyone can use and learn something new by creating it.
About
selfpaste is a self hosting paste service. Your enviroment and your data. Nothing more.
It is not the aim to replace any other well know paste service. It is an experiment and build for private use only.
This tool uses PHP fileinfo
The functions in this module try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bullet proof approach the heuristics used do a very good job.
It is not really bulletproof, but it does the job. Everything can be manipulated to look alike something it isn’t.
So, here is a friendly REMINDER:
- Use at own risk.
- Don’t open it up to the public
- Check regularly what is added
- Clean everything what you do not know
- You provide the service by hosting it. Your are responsible for it!
- Change your secret often.
News and updates
Latest news and updates about this project can be found here.
Important stuff will be added to this page.
Features
- self hosted
- short url concept based on the famous base64-shortlinks
- lifetime management
- client authentication
- bash, c, c on windows, go and a web-client
- focus ony doing its jop and nothing more
Releases
- 1.5 - Fluorine - (2023-10-09), Checksum sha1
- 1.4 - Oxygen - (2022-03-16), Checksum md5, sha1
- 1.3 - Nitrogen - (2021-03-21), Checksum md5, sha1
- 1.2 - Carbon - (2020-08-14), Checksum md5, sha1
- 1.1 - Boron - (2020-05-30), Checksum md5, sha1
- 1.0 - Beryllium - (2020-04-26), Checksum md5, sha1
- 0.3-beta - Lithium - (2020-01-01), Checksum md5, sha1
- 0.2-beta - Helium - (2019-12-23), Checksum md5, sha1
Documentation
Lastest documentation can be found in each release and here
Requirements
PHP >=7.3 Apache >= 2.4 with mod_deflate, mod_rewrite htaccess support AllowOverride All Bash, curl and jq for included bash client
Setup
- Unpack and move everything in the webroot folder to a webaccessable folder into your webserver.
- Rename config.default.php t config.php.
- Open config.php, read the comments and make your changes.
- For more information about some config settings read the seperate documentation file for this setting.
- Folder logs and pasties need to be writeable by webserver process / owner
- Change date_default_timezone_set in index.php if your timezone is different to Europe/Berlin
Sourcecode
Changelog
20231009 version 1.5 Fluorine
* Maintenance release. Updated requirements to current versions if possible
* New syntax in config file. Switched from define() to const syntax.
Use config.default.php as a template to update your config.
* Update requirements for server and webclient code to PHP 8.1
* Changes to webclient:
New syntax in config file. Switched from define() to const syntax.
Use config.default.php as a template to update your config.
* Licence change to GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
20220316 version 1.4 Oxygen
* Using some more "default" branch names
* New client added: Go client
* Cleanups
202100321 version 1.3 Nitrogen
* Added new default allowed file types
* Cleanups
20200530 version 1.1 Boron
* House cleaning
* Added a simple web client
* Cleaned up the linux client written in c. See README for more details
* Added a windows C client based on the linux version. See README for more details
20200426 version 1.0 Beryllium
* final 1.0 working version
* added perl as default allowed file
* added shellscript to the default allowed files
* added html and js to the default allowed files
* added C source files to the default allowed files
* added an example cronjob file which can be used
to clean old pastes. See clean-cronjob.txt for more
details
* Multiple secrets are now supported
* added a c client which can be build with the makefile
2020101 version 0.3-beta Lithium
* Update information now included
* Rewritten lifetime calculation
* Ready for 2020
* Lifetime in days now and not in seconds
20191223 version 0.2-beta Helium
* First public beta release
* Using https://www.jwz.org/base64-shortlinks/ more correctly
* Simple flood protection
* Lifetime for each paste.
* Deletion of paste older than lifetime
20191221 version 0.1 Hydrogen
* Initial creation. Not polished yet.
* Basic functions working.
* No release yet