{"id":1577,"date":"2025-08-17T17:13:35","date_gmt":"2025-08-17T17:13:35","guid":{"rendered":"https:\/\/blog.eu.enginyr.ing\/?p=1577"},"modified":"2025-08-17T17:13:36","modified_gmt":"2025-08-17T17:13:36","slug":"never-lose-a-link-again-how-to-set-up-your-personal-web-archive-with-linkwarden","status":"publish","type":"post","link":"https:\/\/www.serverspan.com\/en\/blog\/never-lose-a-link-again-how-to-set-up-your-personal-web-archive-with-linkwarden\/","title":{"rendered":"Never Lose a Link Again: How to Set Up Your Personal Web Archive with Linkwarden"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We\u2019ve all been there. You find a fascinating article, a crucial piece of documentation, or the perfect recipe, so you save it to your browser&#8217;s bookmarks. Months later, you go to find it, only to be greeted by a dreaded &#8220;404 Not Found&#8221; error. The page is gone, the domain has expired, or the content has been moved. The valuable resource you saved is lost forever. This phenomenon, known as &#8220;link rot,&#8221; is a fundamental problem of the digital age. Browser bookmarks, while convenient, are merely fragile pointers to content that can disappear at any moment. Services like Pocket or Instapaper offer a better solution by saving a copy of the content, but they come with their own trade-offs: your data is stored on their servers, analyzed for their benefit, and locked within their ecosystem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What if you could have the best of both worlds? The convenience of a modern bookmarking service combined with the permanence of a personal archive and the absolute privacy of owning your own data. This is the power of self-hosting, and it&#8217;s more accessible than you might think. By using a small, affordable <a href=\"https:\/\/www.enginyring.com\/en\/virtual-servers\">Virtual Private Server (VPS)<\/a>, you can run your own applications, creating a private and powerful corner of the internet that you control. Today, we&#8217;re going to show you how to build the ultimate solution to link rot and bookmark chaos: a personal, permanent web archive using a fantastic open-source application called Linkwarden. This step-by-step, beginner-friendly guide will walk you through the entire process, from a bare server to a fully functional, private digital library that ensures you never lose a valuable link again.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Linkwarden and Why Should You Host Your Own?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Linkwarden is a self-hosted, open-source application designed to be a powerful, all-in-one archive and bookmark manager. Think of it as your personal library for the internet. When you save a link, Linkwarden doesn&#8217;t just store the URL; it goes a step further and automatically captures a complete, permanent copy of that page&#8217;s content. This can be in the form of a clean PDF, a full-page screenshot, or a clutter-free, readable version of the text, much like Pocket or Instapaper.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hosting your own Linkwarden instance on a VPS provides several key advantages over commercial services:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>Complete Data Ownership and Privacy:<\/b> This is the most significant benefit. Your collection of saved articles, research, and interests is your data. When you self-host, it resides on your private server, inaccessible to third-party companies who might otherwise analyze or monetize your reading habits.<\/li>\n\n\n\n<li><b>Protection Against Link Rot:<\/b> Because Linkwarden saves a physical copy of the content, you are completely insulated from link rot. If the original website goes offline, your archived version remains perfectly preserved and accessible.<\/li>\n\n\n\n<li><b>Powerful Organization:<\/b> Linkwarden goes beyond simple folders. You can organize your links with tags and group them into &#8220;Collections,&#8221; making it easy to manage complex research projects or personal interests.<\/li>\n\n\n\n<li><b>Collaboration Features:<\/b> You can create teams within Linkwarden to build a shared library of resources with colleagues, family, or friends, making it a powerful tool for collaborative projects.<\/li>\n\n\n\n<li><b>No Subscription Fees:<\/b> The software is free and open-source. Your only cost is the affordable monthly fee for the VPS that runs it, which can also host numerous other applications.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites: What You&#8217;ll Need<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This guide is designed for beginners, but you will need a few things to get started:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><b>A VPS Plan:<\/b> Linkwarden is very lightweight. A small VPS plan, like those offered by ENGINYRING, is more than enough to run it smoothly.<\/li>\n\n\n\n<li><b>A Linux Operating System:<\/b> We will be using <b>Ubuntu 22.04<\/b> for this guide, as it is one of the most popular and user-friendly server operating systems.<\/li>\n\n\n\n<li><b>SSH Access:<\/b> You will need to connect to your server using a command-line terminal. On macOS and Linux, this is built-in. On Windows, you can use PowerShell or a tool like PuTTY.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Initial Server Preparation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first step is to connect to your new server and perform some essential setup tasks. When you first get your VPS, you will receive an IP address and a root password. Use these to log in for the first time.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 Update Your System<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once logged in as root, the very first action should always be to update your system&#8217;s software packages to ensure you have the latest security patches.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update &amp;&amp; apt upgrade -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 Create a Sudo User<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Operating as the root user is risky. We will create a new user for our daily tasks and give it &#8220;sudo&#8221; privileges. For a detailed walkthrough of this and other initial security steps, we highly recommend following our <a href=\"https:\/\/www.enginyring.com\/en\/blog\/a-practical-guide-to-vps-hardening-15-essential-security-steps-for-linux-servers\">Practical Guide to VPS Hardening<\/a>. For now, here are the essential commands (replace &#8216;youruser&#8217; with a username of your choice):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create the new user\nadduser youruser\n\n# Add the user to the sudo group\nusermod -aG sudo youruser<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After creating the user, log out of your root session (type <code>exit<\/code>) and log back in as your new user: <code>ssh youruser@your_server_ip<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.3 Install Docker and Docker Compose<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest and most reliable way to install Linkwarden is by using Docker. Docker is a platform that allows you to run applications in isolated containers, which simplifies installation and avoids conflicts between different software. Docker Compose is a tool that lets you manage multi-container applications like Linkwarden with a single configuration file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following commands to install Docker and Docker Compose:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Install Docker's prerequisites\nsudo apt install apt-transport-https ca-certificates curl software-properties-common -y\n\n# Add Docker's official GPG key\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg\n\n# Add the Docker repository\necho \"deb &#91;arch=amd64 signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\n\n# Update package list and install Docker\nsudo apt update\nsudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y\n\n# Add your user to the docker group to run docker commands without sudo\nsudo usermod -aG docker ${USER}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After running the last command, you will need to log out and log back in for the group change to take effect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Download and Configure Linkwarden<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now that our server is prepared, we can set up the Linkwarden application itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a dedicated directory for Linkwarden to keep its files organized, and then move into that directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir ~\/linkwarden &amp;&amp; cd ~\/linkwarden<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, download the official `docker-compose.yml` file from the Linkwarden project. This file is a blueprint that tells Docker Compose how to set up the three containers required for Linkwarden to run (the application itself, its database, and a database admin tool).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o docker-compose.yml https:\/\/raw.githubusercontent.com\/linkwarden\/linkwarden\/main\/docker-compose.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Before we can launch the application, we need to create a configuration file named `.env` to store some secret keys and settings. Create and open this file with the nano text editor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano .env<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now, copy and paste the following content into the file. You will need to replace the placeholder values with your own secure, randomly generated strings.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># A long, random string for the database password\nPOSTGRES_PASSWORD=GENERATE_A_STRONG_PASSWORD\n\n# A long, random 64-character string for the application's secret key\nSECRET_KEY_BASE=GENERATE_A_64_CHAR_RANDOM_STRING\n\n# The URL where your application will be accessible.\n# For now, use your server's IP and port 3000. Replace YOUR_SERVER_IP.\nNEXT_PUBLIC_APP_URL=http:\/\/YOUR_SERVER_IP:3000<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can generate strong random strings for the password and secret key using the following command (run it twice in your terminal):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl rand -base64 48<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the output of this command and paste it after `POSTGRES_PASSWORD=` and `SECRET_KEY_BASE=` in your `.env` file. Once you&#8217;ve replaced the placeholders, save the file and exit nano (press `Ctrl+X`, then `Y`, then `Enter`).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Launch Linkwarden and Create Your Account<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">With the configuration in place, launching the application is incredibly simple. From within your `~\/linkwarden` directory, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command tells Docker Compose to read your `docker-compose.yml` and `.env` files, download the necessary container images, and start them in the background (`-d` stands for &#8220;detached mode&#8221;). The first time you run this, it may take a few minutes to download the images. You can check the status of your containers with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see three services listed with a &#8220;running&#8221; or &#8220;up&#8221; status. Your Linkwarden instance is now live! Open a web browser and navigate to the URL you set in the `.env` file: `http:\/\/your_server_ip:3000`.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will be greeted with a &#8220;Create an account&#8221; screen. The first account you create will automatically become the administrator. Fill in your desired username, email, and a strong password, and click &#8220;Sign up&#8221;. Congratulations, you are now the proud owner of a private, self-hosted web archive!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4 (Recommended): Using a Domain Name with Nginx and SSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Accessing your server via an IP address and port number works, but it&#8217;s not ideal. Setting up a domain name (e.g., `archive.yourdomain.com`) makes it easier to remember and allows you to secure your connection with a free SSL certificate from Let&#8217;s Encrypt. We will use the Nginx web server as a &#8220;reverse proxy&#8221; to accomplish this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, install Nginx:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nginx -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, create a new Nginx configuration file for your Linkwarden site. Replace `archive.yourdomain.com` with your actual domain or subdomain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/nginx\/sites-available\/archive.yourdomain.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Paste the following configuration into the file, making sure to replace `archive.yourdomain.com` with your domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 80;\n    server_name archive.yourdomain.com;\n\n    location \/ {\n        proxy_pass http:\/\/localhost:3000;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save and close the file. Now, enable this site by creating a symbolic link to it in the `sites-enabled` directory and test the configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ln -s \/etc\/nginx\/sites-available\/archive.yourdomain.com \/etc\/nginx\/sites-enabled\/\nsudo nginx -t<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the test is successful, install Certbot to get your SSL certificate:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install certbot python3-certbot-nginx -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, run Certbot. It will automatically detect your domain from the Nginx configuration, obtain a certificate, and configure Nginx to use it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo certbot --nginx -d archive.yourdomain.com<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the on-screen prompts. You can now access your Linkwarden instance securely at `https:\/\/archive.yourdomain.com`.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion: Take Control of Your Digital Library<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ve done it! In just a few steps, you&#8217;ve moved beyond the limitations of traditional bookmarks and commercial read-it-later services. You now have a robust, private, and permanent archive for all the valuable content you discover online. You are no longer at the mercy of link rot or the privacy policies of large tech companies. This is the true power and freedom that comes with self-hosting. Your Linkwarden instance is a testament to what&#8217;s possible with a simple VPS and a desire to own your digital space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Projects like this are exactly why we are so passionate about providing high-performance, reliable server infrastructure at ENGINYRING. We believe everyone should have the ability to build their own tools and control their own data. If you&#8217;re inspired to start your own self-hosting journey or have any questions about finding the right VPS plan for your needs, please don&#8217;t hesitate to <a href=\"https:\/\/www.enginyring.com\/en\/contact\">contact our team<\/a>. We&#8217;re here to help you build your own private corner of the internet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve all been there. You find a fascinating article, a crucial piece of documentation, or the perfect recipe, so you save it to your browser&#8217;s bookmarks. Months later, you go to find it, only to be greeted by a dreaded &#8220;404 Not Found&#8221; error. The page is gone, the domain has expired, or the content [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1578,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[9849,9838,9847,9841,9839,9853,9830,6380,9825,9831,9835,9846,9843,9829,9842,9844,3261,9848,9834,9836,9845,9828,9833,9852,9837,9850,9826,4967,9832,9851,9827,9840],"class_list":["post-1577","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-virtual-servers","tag-build-your-own-cloud","tag-certbot-ssl-certificate","tag-collaborative-bookmarking","tag-data-ownership","tag-digital-library","tag-digital-organization","tag-docker-compose-tutorial","tag-enginyring-vps-tutorial","tag-how-to-install-linkwarden","tag-install-docker-on-ubuntu","tag-link-rot-solution","tag-linkwarden-docker","tag-linkwarden-setup","tag-linkwarden-tutorial","tag-linux-vps-tutorial","tag-never-lose-a-link","tag-nginx-reverse-proxy","tag-online-privacy-tools","tag-open-source-bookmarking","tag-personal-data-privacy","tag-personal-knowledge-management","tag-private-web-archive","tag-secure-bookmarking","tag-secure-your-data","tag-self-host-pocket-alternative","tag-self-hosted-applications","tag-self-hosted-bookmark-manager","tag-self-hosting-guide-2","tag-ubuntu-vps-setup","tag-vps-for-beginners","tag-vps-projects-for-beginners","tag-web-archiving"],"_links":{"self":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1577"}],"version-history":[{"count":1,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1577\/revisions"}],"predecessor-version":[{"id":1579,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1577\/revisions\/1579"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/1578"}],"wp:attachment":[{"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverspan.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}