Tutorial: How to Install Pasty on Debian Latest

In this tutorial, we will guide you through the process of installing Pasty, a web-based clipboard management tool, on Debian Latest.

Prerequisites

Before we begin, you will need the following:

Installing Pasty

  1. Update your system package cache:
sudo apt-get update
  1. Install git, a version control system:
sudo apt-get install -y git
  1. Clone the Pasty repository from GitHub:
git clone https://github.com/lus/pasty.git
  1. Install the required dependencies:
sudo apt-get install -y python3-pip python3-psycopg2 libpq-dev postgresql postgresql-client
  1. Navigate to the Pasty directory:
cd pasty
  1. Install the Python dependencies:
sudo pip3 install -r requirements.txt
  1. Set up the PostgreSQL database:
sudo su postgres
psql
CREATE USER pasty WITH PASSWORD 'password';
CREATE DATABASE pasty_db OWNER pasty;
\q
exit
  1. Edit the pasty/settings.py file to include your database credentials. Change the following lines:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'pasty_db',
        'USER': 'pasty',
        'PASSWORD': 'password',
    }
}
  1. Create the necessary database tables:
python3 manage.py migrate
  1. Create an administrative user:
python3 manage.py createsuperuser
  1. Run the development web server:
python3 manage.py runserver

If everything is successful, you should see output similar to the following:

Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

You can now access Pasty by navigating to http://127.0.0.1:8000/ in your web browser.

Conclusion

Congratulations! You have successfully installed Pasty on Debian Latest. Pasty makes it easy to manage your clipboard history and share clipboard contents between devices.

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!