Penni Tech guidesHow-to pages for Penni Tech AMIs

How to run linkding on AWS with the Penni Tech AMI

A step-by-step guide to the linkding AMI from Penni Tech LLC on AWS Marketplace: launch, first sign-in, first setup and updates.

Launch on AWS Marketplace

What linkding does

linkding is an open source, self-hosted bookmark manager that lets you save links with tags and notes, then search and filter them.

You work with your bookmarks through its web interface, the linkding browser extension, a bookmarklet, or its REST API.

This image serves linkding over HTTPS through an nginx reverse proxy, creates a unique administrator password on your instance at first boot, and includes commands for status, logs, backup, restore and upgrade.

Who it's for

People who want to keep their bookmarks on a server they control instead of inside one browser.

Teams and developers who want to save and query links from scripts or other tools through a REST API.

What's in the AMI

ComponentVersion
linkding1.47.0
nginx1.30.5
Docker Engine25.0.16
Docker Compose5.6.0
Amazon Linux2023.12.20261012

Supported instance types: t3.medium, t3.large, t3.xlarge, m6i.large, m6i.xlarge.

Launch it from the listing

  1. Subscribe and launch Subscribe to the product, then launch it from the AWS Marketplace website or the EC2 console.
  2. Choose a key pair Pick an EC2 key pair. You need it to connect over SSH and read your first-login password.
  3. Open the right ports In the security group, allow 443/tcp for the application. Allowing 80/tcp is optional and only redirects to HTTPS. Allow 22/tcp for SSH, restricted to your own address, and keep the default outbound rule so automatic security updates can reach the Amazon Linux repositories.
  4. Wait for first boot Give the instance about two minutes to finish its first-boot configuration. During this step it creates its TLS certificate and administrator password.
  5. Read your credentials Connect over SSH as ec2-user and print the credentials file. It holds the URL, the admin username (admin) and the password created on your instance.
    sudo cat /root/linkding-credentials.txt
  6. Sign in Browse to https://<instance-public-dns>/ and sign in as admin. The certificate is self-signed, so expect a browser warning the first time.
  7. Change the password Change the administrator password right away at https://<instance-public-dns>/change-password/. You can also reach it from the Settings page.

First setup

The quickest way to start saving links is to connect your browser to linkding. You can install the linkding browser extension or add the bookmarklet, both from steps that start on the Settings page.

  1. Open Settings Sign in and open the Settings page. It shows the API token that linkding creates for your user, and it offers the bookmarklet.
  2. Install the browser extension Install the linkding browser extension from the Mozilla Addon Store or the Chrome Web Store. It lets you add bookmarks quickly and search them from the browser's address bar.
  3. Connect the extension Follow the extension's setup screen to connect it to https://<instance-public-dns>/.
  4. Or add the bookmarklet If you prefer not to install an extension, add the bookmarklet offered in Settings to your browser. Clicking it takes you to your instance to save the page you are viewing.
  5. Choose where titles come from By default the server fetches each page's title and description, which needs outbound internet access. The extension's *Use browser metadata* option and the bookmarklet settings let you use the metadata from the page in your browser instead.

Day-to-day use

Import bookmarks

Open the general settings and find the Import section. Click *Choose file*, select an HTML bookmarks file, then click *Import*.

The Export section on the same page has a *Download* button that saves all your bookmarks as an HTML file. You can use that file to move bookmarks between linkding installations.

Tags and search

Give each bookmark tags and notes when you save it, then find it again with the search bar. A plain word matches the title, description, notes and URL. Put a phrase in quotes to match it exactly.

Tags start with #. Combine expressions with and, or and not, and use parentheses to group them. Words written side by side are joined with and. Search is not case-sensitive. If you turn on the lax tag search mode in Settings, the # prefix becomes optional.

history rome #book
"history of rome" #book
rome (#article or #book)
history rome not #article

Use the REST API

linkding creates an API token for each user, and you can copy yours from the Settings page. Send it in an Authorization header with the form Token <your-api-token>.

The API lets you list, create, update, archive and delete bookmarks, and work with tags, bundles and bookmark assets. The q parameter on the bookmark list filters results with the same search syntax as the web interface.

curl -m 10 --retry 5 -H "Authorization: Token <your-api-token>" https://<instance-public-dns>/api/bookmarks/

Clients and the self-signed certificate

The instance creates a self-signed certificate at first boot. Your browser lets you accept it, but the linkding browser extension and API clients such as curl may refuse to connect until the server presents a certificate they accept.

To fix this, install your own certificate as described in the usage instructions section YOUR OWN TLS CERTIFICATE. If you serve linkding on your own domain, that section also shows how to add the domain to LD_CSRF_TRUSTED_ORIGINS in /etc/linkding/linkding.env.

sudo install -m 0644 fullchain.pem /etc/pki/nginx/server.crt
sudo install -m 0600 privkey.pem /etc/pki/nginx/private/server.key
sudo systemctl reload nginx

Keeping it updated

The instance installs Amazon Linux security updates automatically, and because nginx is an Amazon Linux package, those updates cover it too.

The linkding container is not updated automatically, so it only changes when you run sudo linkding-upgrade, which rebuilds the image with current security updates or moves to a new pinned release.

The upgrade command takes a backup first and keeps the previous Dockerfile so you can roll back. You can also take your own backup at any time with sudo linkding-backup, which writes one archive to /var/backups/linkding by default.

To move to a new instance, run linkding-backup on the old one, then linkding-restore <archive> --keep-env on the new one.

Cost

Software: $0.05 per hour. You also pay AWS for the EC2 instance and storage, at standard rates for the instance type you choose.

See the listing for current pricing.

More information

Launch on AWS Marketplace