How to Install Linkding on Debian Latest

Linkding is a free open-source project hosted on GitHub. It is a self-hosted bookmarking application. It allows you to save, organize, and share bookmarks of web pages easily. In this tutorial, we will explain how to install Linkding on Debian Latest.

Prerequisites

Before starting the installation process, make sure you have:

Step 1: Install Required Packages

We'll start by installing all the packages required for Linkding. Run the command:

sudo apt update
sudo apt install git python3 python3-pip python3-venv nginx

Step 2: Clone the Repository

Now we need to download the Linkding code. Run the following command to clone the repository:

git clone https://github.com/sissbruecker/linkding.git

This command will clone the repository to your current directory.

Step 3: Set Up a Virtual Environment

It's always a good idea to set up a virtual environment. We'll create a Python virtual environment and activate it:

cd linkding
python3 -m venv linkding-env
source linkding-env/bin/activate

Step 4: Install Required Python Libraries

Now we'll install all the Python libraries required for Linkding. Run the command:

pip3 install -r requirements.txt

Step 5: Configure Linkding

After installing all the packages and libraries, we need to configure Linkding. Copy the config.example.py file to config.py and edit it:

cp config.example.py config.py
nano config.py

Change the following values in the file:

SECRET_KEY = "your_secret_key_here"
SQLALCHEMY_DATABASE_URI = 'sqlite:///linkding.sqlite'

Replace your_secret_key_here with a unique secret key of your choice.

Step 6: Create Database

Before starting the Linkding application, we need to create a database. Run the command:

flask db init
flask db migrate
flask db upgrade

This command will initialize the database and create necessary tables.

Step 7: Run Linkding

We're now ready to run Linkding. Run the following command to start the application:

export FLASK_APP=linkding
export FLASK_ENV=production
flask run

This command will start the Linkding application in production mode.

Step 8: Configure Nginx

Since we want to use Nginx as a reverse proxy, we need to configure it. Create an Nginx configuration file with the following content:

server {
    listen 80;
    server_name mydomain.com;

    location / {
        proxy_pass http://localhost:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Replace mydomain.com with your own domain or IP address.

Step 9: Start Nginx

Lastly, start Nginx using the following command:

sudo systemctl restart nginx

This command will start the Nginx service and linkding will now be accessible from your domain or IP address.

Conclusion

That's all! You've installed Linkding, a self-hosted bookmarking application on Debian Latest. You can now use Linkding to save, organize, and share your bookmarks easily.

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!