How to Install EdPaste on POP! OS Latest

EdPaste is a simple and secure paste tool that allows users to share code snippets, logs, or any other plain text data securely. Here's a step-by-step tutorial on how to install EdPaste on POP! OS Latest.

Prerequisites

Before proceeding, ensure that you have the following requirements;

  • A terminal application
  • Administrative privileges

Step 1: Install Dependencies

The first step is to install the dependencies necessary to build and run EdPaste. Open a terminal and enter the following command to install the required dependencies:

sudo apt install build-essential python3 python3-pip python3-venv libpq-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev

Enter your user password when prompted.

Step 2: Clone EdPaste Repository

After installing the dependencies, it's now time to clone the EdPaste repository from Github using the following command:

git clone https://github.com/ptnr/EdPaste.git

This command will create a new directory called "EdPaste" in the current directory.

Step 3: Navigate to the Project Directory

Navigate to the EdPaste directory using the following command:

cd EdPaste

Step 4: Create a Python Virtual Environment

Next, create a Python virtual environment to run EdPaste. This step is only necessary if you want to create a sandboxed environment for EdPaste. Use the following command to create a virtual environment:

python3 -m venv env

Step 5: Activate Virtual Environment

Activate the virtual environment by running the following command:

source env/bin/activate

Step 6: Install Python Dependencies

After activating the virtual environment, use pip to install the Python dependencies required by EdPaste. Enter the following command:

pip3 install -r requirements.txt

Step 7: Set Environment Variables

Copy and rename the .env.example file to .env using the following command:

cp .env.example .env

Next, open the .env file and set the values of the following variables;

  • FLASK_APP: This variable is set to app.py.
  • FLASK_ENV: This variable tells the Flask app what environment it's running in. Set it to development for development purposes.
  • DATABASE_URL: This variable contains the URL of the database. Set it to sqlite:///data.db for SQLite or use the connection string for PostgreSQL if you're using PostgreSQL.

Step 8: Create Database Tables

Use the following command to create the database tables:

flask db upgrade

Step 9: Run the App

Finally, use the following command to start the development server:

flask run

You can access the app by navigating to http://localhost:5000 in your web browser.

Conclusion

That's it. You have successfully installed EdPaste on POP! OS Latest. You are now free to explore it and make use of its features.