EdPaste is a lightweight and easy-to-use web pastebin written in Python using Flask micro framework. It allows users to share texts and codes with other users quickly and easily.
Here’s a step-by-step guide on how to install EdPaste on OpenSUSE latest:
Open the terminal and run the following command to install the required dependencies:
sudo zypper install python python-pip python-devel python-flask python-flask-bcrypt python-flask-bootstrap python-flask-admin python-flask-login python-flask-moment python-flask-principal python-flask-wtf python-pytz python-sqlalchemy
EdPaste requires MySQL server to store pastes. Install MySQL server by running the following command:
sudo zypper in mysql mysql-server
Start and enable the MySQL service using the command below:
sudo systemctl start mysql
sudo systemctl enable mysql
Configure MySQL by running the following command:
sudo mysql_secure_installation
Clone the EdPaste repository using the following command:
git clone https://github.com/ptnr/EdPaste.git
Navigate to the EdPaste directory:
cd EdPaste
Install EdPaste using the following command:
sudo pip install -e .
Create a new MySQL database for EdPaste:
mysql -u root -p
create database edpaste;
grant all privileges on edpaste.* to 'edpaste'@'localhost' identified by '<password>';
Edit the configuration file config.py
file, add the following configurations:
SQLALCHEMY_DATABASE_URI = 'mysql://edpaste:<password>@localhost/edpaste'
SECRET_KEY = '<strong_random_key>'
Replace <password>
with the password you set when creating the database, and <strong_random_key>
with a strong and random secret key of your choice.
Create a systemd service file for EdPaste:
sudo nano /etc/systemd/system/edpaste.service
Add the following lines to the service file:
[Unit]
Description=EdPaste
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/opt/edpaste
Environment="PATH=/opt/edpaste/venv/bin"
ExecStart=/opt/edpaste/venv/bin/pserve /opt/edpaste.ini --reload
Restart=always
[Install]
WantedBy=multi-user.target
Save and close the file.
Start the EdPaste service by running the following command:
sudo systemctl start edpaste
Enable the service to start automatically at boot time:
sudo systemctl enable edpaste
You’re all set! You can now access EdPaste via your web browser by visiting the URL http://<your_server_ip>:5000/
.
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!