Pasty is a simple web-based paste bin written in Python by Lus. This guide will walk you through the process of installing Pasty on NetBSD.
Before you start, you will need the following:
$ git clone https://github.com/lus/pasty
pasty
directory:$ cd pasty
$ pip3 install -r requirements.txt
Edit the config.py
file to configure Pasty. Set the BASE_URL
and SITE_NAME
variables to the URL of your Pasty instance and the name of your site respectively.
Start Pasty using Flask:
$ export FLASK_APP=pasty.py
$ flask run
You should now be able to access Pasty by visiting http://localhost:5000
in your web browser.
To deploy Pasty on your web server, you will need to configure your web server to reverse proxy to Pasty.
Here is an example configuration for NGINX:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Here is an example configuration for Apache:
<VirtualHost *:80>
ServerName example.com
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
ErrorLog /var/log/apache2/pasty_error.log
CustomLog /var/log/apache2/pasty_access.log combined
</VirtualHost>
Congratulations! You have successfully installed Pasty on your NetBSD server and deployed it on your web server. You can now use Pasty to easily share code snippets and text with others.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!