No description
Find a file
Kazi 68143de992
How-to guide for HTTP Shortcuts app on Android (#201)
* How-to guide for HTTP Shortcuts app on Android

* refinements

* link fix
2022-02-28 08:12:37 +01:00
.github/workflows Update CI config to install Node dependencies 2021-05-14 02:38:44 +02:00
.idea Add bookmark view tests 2021-05-14 02:32:19 +02:00
assets Add favicon (#60) 2021-01-09 00:24:06 +01:00
bookmarks Ensure tag names don't contain spaces (#184) 2021-12-12 22:54:22 +01:00
docs How-to guide for HTTP Shortcuts app on Android (#201) 2022-02-28 08:12:37 +01:00
siteroot Add password change view (#168) 2021-10-16 05:42:04 +02:00
.coveragerc Exclude tests from coverage 2021-05-14 23:45:32 +02:00
.dockerignore exclude .git in docker container (#176) 2021-12-05 21:11:49 +01:00
.env.sample Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
.gitignore Implement tag auto-completion 2019-12-27 12:32:44 +01:00
.grenrc.js Add versioning and release notes 2020-12-31 06:16:52 +01:00
background-tasks-wrapper.sh Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
bootstrap.sh Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
build-docker.sh Doc improvements (#97) 2021-03-20 11:58:20 +01:00
build-static.sh Implement tag auto-completion 2019-12-27 12:32:44 +01:00
CHANGELOG.md Update CHANGELOG.md 2021-12-13 00:12:51 +01:00
coverage.sh Add code coverage script 2021-05-14 12:23:11 +02:00
docker-compose.yml Fix docker-compose.yaml to import variables from env file 2021-11-10 12:19:56 +01:00
Dockerfile Change Docker base image to slim-buster 2021-08-27 10:14:48 +02:00
install-linkding.sh Provide automated setup script 2019-12-26 18:49:10 +01:00
LICENSE.txt Add license 2019-12-24 11:03:08 +01:00
linkding_shortcut.json How-to guide for HTTP Shortcuts app on Android (#201) 2022-02-28 08:12:37 +01:00
linkdings.iml Add search autocomplete (#53) 2020-12-31 09:47:51 +01:00
manage.py Implement basic bookmark page 2019-06-27 08:09:51 +02:00
package-lock.json Update node dependencies 2020-12-31 07:34:33 +01:00
package.json Bump version 2021-12-12 22:57:22 +01:00
README.md Add linkding-injector community extension to README (#190) 2022-01-17 13:39:45 +01:00
requirements.prod.txt Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
requirements.txt Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
rollup.config.js Update node dependencies 2020-12-31 07:34:33 +01:00
supervisord.conf Create snapshots on web.archive.org for bookmarks (#150) 2021-09-04 22:31:04 +02:00
uwsgi.ini Implement custom netscape file parser (#51) 2020-12-31 07:02:28 +01:00
version.txt Bump version 2021-12-12 22:57:22 +01:00

linkding

linkding is a simple bookmark service that you can host yourself. It's designed be to be minimal, fast and easy to set up using Docker.

The name comes from:

  • link which is often used as a synonym for URLs and bookmarks in common language
  • Ding which is german for thing
  • ...so basically some thing for managing your links

Feature Overview:

  • Tags for organizing bookmarks
  • Search by text or tags
  • Bulk editing
  • Bookmark archive
  • Dark mode
  • Automatically creates snapshots of bookmarked websites on web archive
  • Automatically provides titles and descriptions of bookmarked websites
  • Import and export bookmarks in Netscape HTML format
  • Extensions for Firefox and Chrome, and a bookmarklet that should work in most browsers
  • REST API for developing 3rd party apps
  • Admin panel for user self-service and raw data access
  • Easy to set up using Docker, uses SQLite as database

Demo: https://demo.linkding.link/ (configured with open registration)

Screenshot:

Screenshot

Installation

The easiest way to run linkding is to use Docker. The Docker image is compatible with ARM platforms, so it can be run on a Raspberry Pi.

There is also the option to set up the installation manually which I do not support, but can give some pointers on below.

Docker setup

To install linkding using Docker you can just run the image from the Docker registry:

docker run --name linkding -p 9090:9090 -d sissbruecker/linkding:latest

By default the application runs on port 9090, but you can map it to a different host port by modifying the command above.

However for production use you also want to mount a data folder on your system, so that the applications database is not stored in the container, but on your hosts file system. This is safer in case something happens to the container and makes it easier to update the container later on, or to run backups. To do so you can use the following extended command, where you replace {host-data-folder} with the absolute path to a folder on your system where you want to store the data:

docker run --name linkding -p 9090:9090 -v {host-data-folder}:/etc/linkding/data -d sissbruecker/linkding:latest

If everything completed successfully the application should now be running and can be accessed at http://localhost:9090, provided you did not change the port mapping.

Automated Docker setup

If you are using a Linux system you can use the following shell script for an automated setup. The script does basically everything described above, but also handles updating an existing container to a new application version (technically replaces the existing container with a new container built from a newer image, while mounting the same data folder).

The script can be configured using shell variables - for more details have a look at the script itself.

Docker-compose setup

To install linkding using docker-compose you can use the docker-compose.yml file. Copy the .env.sample file to .env and set your parameters, then run:

docker-compose up -d

User setup

Finally you need to create a user so that you can access the application. Replace the credentials in the following command and run it:

Docker

docker exec -it linkding python manage.py createsuperuser --username=joe --email=joe@example.com

Docker-compose

docker-compose exec linkding python manage.py createsuperuser --username=joe --email=joe@example.com

The command will prompt you for a secure password. After the command has completed you can start using the application by logging into the UI with your credentials.

Manual setup

If you can not or don't want to use Docker you can install the application manually on your server. To do so you can basically follow the steps from the Development section below while cross-referencing the Dockerfile and bootstrap.sh on how to make the application production-ready.

Hosting

The application runs in a web-server called uWSGI that is production-ready and that you can expose to the web. If you don't know how to configure your server to expose the application to the web there are several more steps involved. I can not support the process here, but I can give some pointers on what to search for:

  • first get the app running (described in this document)
  • open the port that the application is running on in your servers firewall
  • depending on your network configuration, forward the opened port in your network router, so that the application can be addressed from the internet using your public IP address and the opened port

Options

Check the options document on how to configure your linkding installation.

Administration

Check the administration document on how to use the admin app that is bundled with linkding.

Backups

Check the backups document for options on how to create backups.

How To

Check the how-to document for tips and tricks around using linkding.

API

The application provides a REST API that can be used by 3rd party applications to manage bookmarks. Check the API docs for further information.

Troubleshooting

Import fails with 502 Bad Gateway

The default timeout for requests is 60 seconds, after which the application server will cancel the request and return the above error. Depending on the system that the application runs on, and the number of bookmarks that need to be imported, the import may take longer than the default 60 seconds.

To increase the timeout you can configure the LD_REQUEST_TIMEOUT option.

Note that any proxy servers that you are running in front of linkding may have their own timeout settings, which are not affected by the variable.

Development

The application is open source, so you are free to modify or contribute. The application is built using the Django web framework. You can get started by checking out the excellent Django docs: https://docs.djangoproject.com/en/3.2/. The bookmarks folder contains the actual bookmark application, siteroot is the Django root application. Other than that the code should be self-explanatory / standard Django stuff 🙂.

Prerequisites

  • Python 3
  • Node.js

Setup

Create a virtual environment for the application (https://docs.python.org/3/tutorial/venv.html):

python3 -m venv ~/environments/linkding

Activate the environment for your shell:

source ~/environments/linkding/bin/activate[.csh|.fish]

Within the active environment install the application dependencies from the application folder:

pip3 install -Ur requirements.txt

Install frontend dependencies:

npm install

Initialize database:

mkdir -p data
python3 manage.py migrate

Create a user for the frontend:

python3 manage.py createsuperuser --username=joe --email=joe@example.com

Start the Node.js development server (used for compiling JavaScript components like tag auto-completion) with:

npm run dev

Start the Django development server with:

python3 manage.py runserver

The frontend is now available under http://localhost:8000

Community

  • linkding-extension Chromium compatible extension that wraps the linkding bookmarklet. Tested with Chrome, Edge, Brave. By jeroenpardon
  • linkding-injector Injects search results from linkding into the sidebar of search pages like google and duckduckgo. Tested with Firefox and Chrome. By Fivefold