How to Install Wastebin on Debian Latest

Wastebin is an open-source paste tool, allowing quick and easy text sharing. It is a great alternative to pastebin or gist, with the added convenience of being self-hosted. This tutorial will guide you through the installation of Wastebin on Debian Latest.

Prerequisites

Step 1: Install Dependencies

Before we can install Wastebin, we need to install a few dependencies. Open the Terminal and enter the following command:

sudo apt-get install nodejs npm nginx sqlite3

This will install Node.js, NPM, Nginx, and SQLite3.

Step 2: Clone Wastebin

Next, we need to clone the Wastebin repository to our server:

git clone https://github.com/matze/wastebin.git

This will create a directory called 'wastebin' in your home directory.

Step 3: Configure Nginx

Now we need to configure our Nginx server to serve the Wastebin application. Open the default Nginx configuration file in a text editor:

sudo nano /etc/nginx/sites-available/default

In that file, add the following configuration above the default server block:

server {
    listen 80;
    server_name mywastebin.example.com;
    return 301 https://mywastebin.example.com$request_uri;
}

server {
    listen 443 ssl;
    server_name mywastebin.example.com;

    ssl_certificate /path/to/your/cert.pem;
    ssl_certificate_key /path/to/your/key.pem;

    location / {
        proxy_pass http://localhost:3000/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Replace mywastebin.example.com with your own domain name. You should also point your domain to your server's IP address.

Step 4: Build and Run Wastebin

Now we need to build and run the Wastebin application. First, navigate to the wastebin directory:

cd wastebin

Next, install the necessary npm modules:

npm install

Now we can build the application:

npm run build

And finally, start the application:

npm start

Step 5: Create an Admin Account

In order to use Wastebin, you need an admin account. To create one, navigate to the /register page on your Wastebin instance. Fill out the registration form and submit it. You should now have an admin account that you can use to create and manage pastes.

Congratulations! You have successfully installed and configured Wastebin on your Debian Latest server.

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!