Installing Pasty on Ubuntu Server

Pasty is a simple, self-hosted, open-source pastebin service. It's available to be installed on Ubuntu Server using the following steps:

Step 1: Install Required Dependencies

sudo apt-get update
sudo apt-get install -y git python3-virtualenv python3-dev build-essential sqlite3

Step 2: Clone the Repository

Pasty is hosted on GitHub, so we will need to clone the repository with Git.

git clone https://github.com/lus/pasty.git

Step 3: Create a Virtual Environment

Navigate to the cloned repository directory and create a virtual environment.

cd pasty
python3 -m virtualenv venv

Step 4: Activate the Virtual Environment

You will need to activate the virtual environment to ensure that all dependencies are installed in the local directory, and not system-wide.

source venv/bin/activate

Step 5: Install Dependencies

Now that we are in a virtual environment, we can install the required dependencies to run Pasty.

pip3 install -r requirements.txt

Step 6: Create a Settings File

You need to create a settings.py file to configure the Pasty application with appropriate settings. You can create the file from the example provided.

cp pasty/settings_example.py pasty/settings.py

Step 7: Migrate Database

With the virtual environment and settings file configured, you need to complete the database migration.

python3 manage.py migrate

Step 8: Running the Application

Finally, you can run the application using the following command.

python3 manage.py runserver

You should now have pasty running on your Ubuntu Server. To access it, open a browser and type Server IP address:8000 in the address bar.

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!