1 line
25 KiB
JSON
Executable File
1 line
25 KiB
JSON
Executable File
{"title":"Install Linkwarden: Self-Hosted Bookmark Manager on Synology","byline":null,"dir":null,"lang":null,"content":"<div id=\"readability-page-1\" class=\"page\"><section id=\"blog-post-content\"> <p>Managing bookmarks can often be a hassle, especially when you’re trying to sync them across multiple browsers and devices. Enter <a href=\"https://linkwarden.app/\">Linkwarden</a>, a robust open-source self-hosted bookmark manager that puts you in control of your digital resources. If you have a <a href=\"https://amzn.to/4aBvfKi\">Synology NAS</a> at your disposal, you’re in luck. You can set up Linkwarden on your device, ensuring that your bookmarks are private and accessible from anywhere. Let’s walk through the installation process.</p>\n<h2 id=\"understanding-linkwarden-a-self-hosted-bookmark-manager\">Understanding Linkwarden: A Self-Hosted Bookmark Manager</h2>\n<p>A bookmark manager, as the name suggests, helps you manage your web bookmarks. It takes your pile of links, some new, some long lost under an avalanche of data, and presents them to you in an easily navigable format. From categorizing to sorting, a bookmark manager’s job is to turn your bookmark chaos into an organized symphony.</p>\n<div aria-label=\"Event timeline\"> <li tabindex=\"0\"> <div> <h4>v1.0.0</h4> <p>First official release</p> </div> <p><time> July 31, 2023 </time> </p> </li><li tabindex=\"0\"> <div> <h4>v2.0.0</h4> <p>New archivable format: Readable view, Full text search functionality, Rename and Remove Tags functionality, Recent Links in dashboard, Added rearchive functionality, Delete profile functionality, Increased max import size, Added indicators for public collections, Seperated owned/member collections, Refactored API routes, Bug fixes, security patches, and optimizations, ...</p> </div> <p><time> November 8, 2023 </time> </p> </li><li tabindex=\"0\"> <div> <h4>v.2.4.0</h4> <p>Much Improved Design, All Bookmarks Now Get Archived, Archive Formats Other Than Webpages, Added Compact List View, Enhanced User Experience, ...</p> </div> <p><time> December 27, 2023 </time> </p> </li> </div>\n<p>Linkwarden is fairly new to the bookmark manager scene, but it’s already making waves and gaining popularity.</p>\n<h3 id=\"key-features-of-linkwarden\">Key Features of Linkwarden</h3>\n<p>Linkwarden presents a variety of features to its users. It’s got an intuitive design, allowing you to create, check, and manage bookmarks with ease. Collaborative bookmarking is another top feature, enabling you to share your bookmarks with colleagues or friends.</p>\n<h4 id=\"collect-and-organize-webpages-effortlessly\">Collect and Organize Webpages Effortlessly</h4>\n<p>Linkwarden makes it a breeze to save, store, and categorize webpages all in one central hub. You can collect links from any browser with just a few clicks, organize your links with custom tags and folders, and create collections to group related links, ensuring a clutter-free and intuitive bookmark management experience.</p>\n<h4 id=\"preserve-webpages\">Preserve Webpages</h4>\n<p>Linkwarden allows you to view and preserve the webpages you’ve organized, ensuring you never have to worry about broken links again. It can auto-capture a copy of each webpage as a screenshot (.png) and a PDF, and allows you to download your archived webpages for offline access.</p>\n<h4 id=\"collaborate-seamlessly\">Collaborate Seamlessly</h4>\n<p>Linkwarden isn’t just for personal use. It’s the perfect tool to supercharge your collaboration efforts, making teamwork smoother and more efficient. You can invite team members to collaborate on shared collections, assign customizable permissions, and easily share curated collections with the public.</p>\n<h4 id=\"additional-features\">Additional Features</h4>\n<p>Linkwarden is open source and fully self-hostable, with its entire source code published to GitHub. It’s privacy-friendly, responsive, and supports both dark and light modes. You can pin your favorite webpages to the dashboard, search and filter all your curated contents across all your collections effortlessly, and collect webpages directly from your browser with its open-source extension for <a href=\"https://chromewebstore.google.com/detail/linkwarden/pnidmkljnhbjfffciajlcpeldoljnidn\">Chrome / Chromium based</a> or <a href=\"https://addons.mozilla.org/de/firefox/addon/linkwarden/\">Firefox</a>. Plus, you can easily import or export all your bookmarks from/to other platforms.</p>\n<h3 id=\"the-advantage-of-a-self-hosted-solution\">The Advantage of a Self-Hosted Solution</h3>\n<p>Now, why should you want to install an open-source bookmark manager and use it as a self-hosted solution? The advantage is obvious: control. A self-hosted bookmark manager empowers you to keep hold of your data, protecting you from third-party intervention.</p>\n<h2 id=\"prerequisites\">Prerequisites</h2>\n<p>Before diving into the installation, ensure that your Synology NAS meets the following requirements:</p>\n<ul>\n<li>Docker installed</li>\n<li>Portainer installed</li>\n<li>(Optional) A domain name with a valid SSL certificate (for example from <a href=\"https://www.netcup.de/bestellen/domainangebote.php/ref=65086\">Netcup for €5 / year (.de domain)</a>)</li>\n<li>(Optional) A reverse proxy configured</li>\n</ul>\n<h2 id=\"step-by-step-installation-guide\">Step-by-Step Installation Guide</h2>\n<h3 id=\"step-0-set-up-docker-and-portainer\">Step 0: Set up Docker and Portainer</h3>\n<p>If you haven’t already, you’ll need to install Docker and Portainer on your Synology NAS. You can find detailed instructions on how to do so in my <a href=\"https://deployn.de/en/blog/setup-synology/\">Synology Setup Guide</a>. Make sure that you don’t block internal requests in your firewall settings.</p>\n<h3 id=\"step-1-create-a-directory-for-linkwarden\">Step 1: Create a Directory for Linkwarden</h3>\n<p>First, you’ll need to create a directory for Linkwarden. Open File Station and create two new folders where you want to save your Linkwarden data. I called mine <code>data</code> and <code>db</code>. You can name them whatever you want.</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"713\" width=\"1057\" alt=\"Create a directory for Linkwarden\" src=\"https://deployn.de/_astro/linkwarden-directory.B3dxQF9P_Z1MuKOb.webp\"></p>\n<p>Make sure that you have read and write permissions for both folders. Note down the path to your folders. You’ll need it later:</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"768\" width=\"1261\" alt=\"Folder path\" src=\"https://deployn.de/_astro/folder-path.Djim3Ygf_2g5ev6.webp\"></p>\n<h3 id=\"step-2-create-a-docker-stack-in-portainer\">Step 2: Create a Docker Stack in Portainer</h3>\n<p>Next, you’ll need to create a Docker stack in Portainer. Open Portainer and navigate to <code>Stacks</code> in the left sidebar. Click on <code>Add stack</code> in the top right corner.</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"1272\" width=\"2560\" alt=\"Add stack\" src=\"https://deployn.de/_astro/add-stack.BOS9Z7Fj_Z22gJSa.webp\"></p>\n<h3 id=\"step-3-configure-the-docker-stack\">Step 3: Configure the Docker Stack</h3>\n<p>Now, you’ll need to configure the Docker stack. Enter a name for your stack. I called mine <code>linkwarden</code>. Then, paste the following code into the <code>Web editor</code>:</p>\n<pre data-language=\"yaml\" tabindex=\"0\"><code><span><span>version</span><span>:</span><span> \"</span><span>3.5</span><span>\"</span></span>\n<span><span>services</span><span>:</span></span>\n<span><span> linkwarden</span><span>:</span></span>\n<span><span> environment</span><span>:</span></span>\n<span><span> -</span><span> DATABASE_URL=postgresql://linkwarden:9aGnTqvEs6BPXEl@linkwarden-db:5432/linkwarden-db</span></span>\n<span><span> -</span><span> NEXTAUTH_SECRET=q013hX949bW6uXf</span></span>\n<span><span> -</span><span> NEXTAUTH_URL=https://linkwarden.yourdomain.com</span></span>\n<span><span> # - NEXT_PUBLIC_DISABLE_REGISTRATION=true</span></span>\n<span><span> restart</span><span>:</span><span> always</span></span>\n<span><span> image</span><span>:</span><span> ghcr.io/linkwarden/linkwarden:latest</span></span>\n<span><span> ports</span><span>:</span></span>\n<span><span> -</span><span> 3333:3000</span></span>\n<span><span> volumes</span><span>:</span></span>\n<span><span> -</span><span> /volume1/docker/linkwarden/data:/data/data</span></span>\n<span><span> depends_on</span><span>:</span></span>\n<span><span> -</span><span> linkwarden-db</span></span>\n<span><span> linkwarden-db</span><span>:</span></span>\n<span><span> container_name</span><span>:</span><span> linkwarden-db</span></span>\n<span><span> image</span><span>:</span><span> postgres:15</span></span>\n<span><span> environment</span><span>:</span></span>\n<span><span> POSTGRES_DB</span><span>:</span><span> \"</span><span>linkwarden-db</span><span>\"</span></span>\n<span><span> POSTGRES_PASSWORD</span><span>:</span><span> \"</span><span>9aGnTqvEs6BPXEl</span><span>\"</span></span>\n<span><span> POSTGRES_USER</span><span>:</span><span> \"</span><span>linkwarden</span><span>\"</span></span>\n<span><span> restart</span><span>:</span><span> always</span></span>\n<span><span> volumes</span><span>:</span></span>\n<span><span> -</span><span> /volume1/docker/linkwarden/db:/var/lib/postgresql/data</span></span>\n<span></span></code></pre>\n<p>Replace the following values:</p>\n<ul>\n<li><code>POSTGRES_PASSWORD</code>: Replace <code>9aGnTqvEs6BPXEl</code> at both occurrences with a secure password of your choice.</li>\n<li><code>NEXTAUTH_SECRET</code>: Replace <code>q013hX949bW6uXf</code> with a secure password of your choice.</li>\n<li><code>NEXTAUTH_URL</code>: Replace <code>https://linkwarden.yourdomain.com</code> with the URL you want to use to access Linkwarden. If you don’t have a domain name, you can use your local IP address instead. If you don’t want to use SSL, replace <code>https</code> with <code>http</code>. If you don’t want a custom URL, use <code>http://localhost:3000</code> instead.</li>\n<li><code>volumes</code>: Replace <code>/volume1/docker/linkwarden/data</code> with the path to your <code>data</code> folder. Replace <code>/volume1/docker/linkwarden/db</code> with the path to your <code>db</code> folder.</li>\n<li><code>ports</code>: Replace <code>3333</code> with the port you want to use to access Linkwarden. If the reverse proxy is installed on the same device, you don’t have to publish any ports.</li>\n</ul>\n<p>Configure the reserve proxy if you want to use a custom URL and/or SSL.</p>\n<h3 id=\"step-4-create-a-linkwarden-admin-account\">Step 4: Create a Linkwarden Admin Account</h3>\n<p>Now, you’ll need to create a Linkwarden admin account. After the container starts, open a web browser and type in your NAS IP address followed by the assigned port number <code>http://ip-address-of-your-synology:3333</code> or your domain. You’ll be greeted by the Linkwarden login screen:</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"503\" width=\"650\" alt=\"Linkwarden login screen\" src=\"https://deployn.de/_astro/linkwarden-login.ChkKe_b6_1WYJNS.webp\"></p>\n<p>Click on <code>Sign up</code> and create a new account. Then, log in with your new account.</p>\n<p>If this doesn’t work, you might have to check your <code>NEXTAUTH_URL</code> again. Make sure it’s <code>http</code> instead of <code>https</code> if you don’t use SSL.</p>\n<h3 id=\"step-5-configure-linkwarden\">Step 5: Configure Linkwarden</h3>\n<p>After logging in, you’ll find yourself on the Linkwarden dashboard.</p>\n<h4 id=\"set-your-profile-to-private\">Set your profile to private</h4>\n<p>Click on the profile icon in the top right corner to open the settings.</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"1223\" width=\"2558\" alt=\"Empty Linkwarden dashboard\" src=\"https://deployn.de/_astro/linkwarden-dashboard.zlOSSHqQ_ZiV2gy.webp\"></p>\n<p>Under “Profile Visibility” select “Make profile private” and click on “Save”.</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"382\" width=\"541\" alt=\"Linkwarden settings\" src=\"https://deployn.de/_astro/linkwarden-settings.Mfv6MvQO_1HH4NS.webp\"></p>\n<h4 id=\"disable-registration\">Disable registration</h4>\n<p>Do you want to prevent other users from registering? Go back to the Portainer stack and uncomment the following line:</p>\n<pre data-language=\"yaml\" tabindex=\"0\"><code><span><span>-</span><span> NEXT_PUBLIC_DISABLE_REGISTRATION=true</span></span>\n<span></span></code></pre>\n<p>The boolean is case sensitive. Make sure it’s <code>true</code> and not <code>True</code> or <code>TRUE</code>. Then, restart the stack.</p>\n<p>Try to register a new account. You should see the an error 400: “Registration is disabled” at the end of the registration process.</p>\n<h3 id=\"step-6-add-bookmarks\">Step 6: Add bookmarks</h3>\n<p>You can import your bookmarks from a bookmark html file. These files are usually exported from your browser.\nYou can also import a json file from Linkwarden or another bookmark manager.</p>\n<p>You can find the export functionality in the profile settings.</p>\n<p>You can also add bookmarks manually by clicking on the plus icon in the top right corner.</p>\n<p>This will save the bookmark to a selected collection and generate a screenshot and a PDF of the webpage (you can disable this feature in the settings). Furthermore, you can add tags to your bookmarks to categorize them.</p>\n<p><img decoding=\"async\" loading=\"lazy\" height=\"781\" width=\"1330\" alt=\"Add a bookmark\" src=\"https://deployn.de/_astro/linkwarden-add-bookmark.COKi-19z_Z1apUdJ.webp\"></p>\n<h2 id=\"tips-for-a-smooth-experience\">Tips for a Smooth Experience</h2>\n<ul>\n<li>Regularly update Linkwarden to the <a href=\"https://github.com/linkwarden/linkwarden/releases\">latest version</a>. Go to the stack editor in Portainer and click on <code>Update the stack</code> and select <code>Re-pull image and redeploy</code> to update Linkwarden. Don’t update Postgres to a newer major version without a migration plan.</li>\n<li>Regularly back up your data. You can find the backup functionality in the profile settings. You can also back up your data by backing up the <code>data</code> and <code>db</code> folders you created in Step 1.</li>\n<li>Use strong, unique passwords for your Linkwarden account. You can use a password manager like <a href=\"https://deployn.de/en/blog/vaultwarden-synology/\">Vaultwarden</a> to generate and store your passwords.</li>\n</ul>\n<h2 id=\"conclusion\">Conclusion</h2>\n<p>Congratulations! You’ve taken a significant step towards managing your bookmarks more effectively with Linkwarden on your Synology NAS. With your bookmarks now self-hosted, you can enjoy enhanced privacy and convenience. Remember, the key to a successful installation is following each step carefully and not rushing the process. Happy bookmarking!</p> </section></div>","textContent":" Managing bookmarks can often be a hassle, especially when you’re trying to sync them across multiple browsers and devices. Enter Linkwarden, a robust open-source self-hosted bookmark manager that puts you in control of your digital resources. If you have a Synology NAS at your disposal, you’re in luck. You can set up Linkwarden on your device, ensuring that your bookmarks are private and accessible from anywhere. Let’s walk through the installation process.\nUnderstanding Linkwarden: A Self-Hosted Bookmark Manager\nA bookmark manager, as the name suggests, helps you manage your web bookmarks. It takes your pile of links, some new, some long lost under an avalanche of data, and presents them to you in an easily navigable format. From categorizing to sorting, a bookmark manager’s job is to turn your bookmark chaos into an organized symphony.\n v1.0.0 First official release July 31, 2023 v2.0.0 New archivable format: Readable view, Full text search functionality, Rename and Remove Tags functionality, Recent Links in dashboard, Added rearchive functionality, Delete profile functionality, Increased max import size, Added indicators for public collections, Seperated owned/member collections, Refactored API routes, Bug fixes, security patches, and optimizations, ... November 8, 2023 v.2.4.0 Much Improved Design, All Bookmarks Now Get Archived, Archive Formats Other Than Webpages, Added Compact List View, Enhanced User Experience, ... December 27, 2023 \nLinkwarden is fairly new to the bookmark manager scene, but it’s already making waves and gaining popularity.\nKey Features of Linkwarden\nLinkwarden presents a variety of features to its users. It’s got an intuitive design, allowing you to create, check, and manage bookmarks with ease. Collaborative bookmarking is another top feature, enabling you to share your bookmarks with colleagues or friends.\nCollect and Organize Webpages Effortlessly\nLinkwarden makes it a breeze to save, store, and categorize webpages all in one central hub. You can collect links from any browser with just a few clicks, organize your links with custom tags and folders, and create collections to group related links, ensuring a clutter-free and intuitive bookmark management experience.\nPreserve Webpages\nLinkwarden allows you to view and preserve the webpages you’ve organized, ensuring you never have to worry about broken links again. It can auto-capture a copy of each webpage as a screenshot (.png) and a PDF, and allows you to download your archived webpages for offline access.\nCollaborate Seamlessly\nLinkwarden isn’t just for personal use. It’s the perfect tool to supercharge your collaboration efforts, making teamwork smoother and more efficient. You can invite team members to collaborate on shared collections, assign customizable permissions, and easily share curated collections with the public.\nAdditional Features\nLinkwarden is open source and fully self-hostable, with its entire source code published to GitHub. It’s privacy-friendly, responsive, and supports both dark and light modes. You can pin your favorite webpages to the dashboard, search and filter all your curated contents across all your collections effortlessly, and collect webpages directly from your browser with its open-source extension for Chrome / Chromium based or Firefox. Plus, you can easily import or export all your bookmarks from/to other platforms.\nThe Advantage of a Self-Hosted Solution\nNow, why should you want to install an open-source bookmark manager and use it as a self-hosted solution? The advantage is obvious: control. A self-hosted bookmark manager empowers you to keep hold of your data, protecting you from third-party intervention.\nPrerequisites\nBefore diving into the installation, ensure that your Synology NAS meets the following requirements:\n\nDocker installed\nPortainer installed\n(Optional) A domain name with a valid SSL certificate (for example from Netcup for €5 / year (.de domain))\n(Optional) A reverse proxy configured\n\nStep-by-Step Installation Guide\nStep 0: Set up Docker and Portainer\nIf you haven’t already, you’ll need to install Docker and Portainer on your Synology NAS. You can find detailed instructions on how to do so in my Synology Setup Guide. Make sure that you don’t block internal requests in your firewall settings.\nStep 1: Create a Directory for Linkwarden\nFirst, you’ll need to create a directory for Linkwarden. Open File Station and create two new folders where you want to save your Linkwarden data. I called mine data and db. You can name them whatever you want.\n\nMake sure that you have read and write permissions for both folders. Note down the path to your folders. You’ll need it later:\n\nStep 2: Create a Docker Stack in Portainer\nNext, you’ll need to create a Docker stack in Portainer. Open Portainer and navigate to Stacks in the left sidebar. Click on Add stack in the top right corner.\n\nStep 3: Configure the Docker Stack\nNow, you’ll need to configure the Docker stack. Enter a name for your stack. I called mine linkwarden. Then, paste the following code into the Web editor:\nversion: \"3.5\"\nservices:\n linkwarden:\n environment:\n - DATABASE_URL=postgresql://linkwarden:9aGnTqvEs6BPXEl@linkwarden-db:5432/linkwarden-db\n - NEXTAUTH_SECRET=q013hX949bW6uXf\n - NEXTAUTH_URL=https://linkwarden.yourdomain.com\n # - NEXT_PUBLIC_DISABLE_REGISTRATION=true\n restart: always\n image: ghcr.io/linkwarden/linkwarden:latest\n ports:\n - 3333:3000\n volumes:\n - /volume1/docker/linkwarden/data:/data/data\n depends_on:\n - linkwarden-db\n linkwarden-db:\n container_name: linkwarden-db\n image: postgres:15\n environment:\n POSTGRES_DB: \"linkwarden-db\"\n POSTGRES_PASSWORD: \"9aGnTqvEs6BPXEl\"\n POSTGRES_USER: \"linkwarden\"\n restart: always\n volumes:\n - /volume1/docker/linkwarden/db:/var/lib/postgresql/data\n\nReplace the following values:\n\nPOSTGRES_PASSWORD: Replace 9aGnTqvEs6BPXEl at both occurrences with a secure password of your choice.\nNEXTAUTH_SECRET: Replace q013hX949bW6uXf with a secure password of your choice.\nNEXTAUTH_URL: Replace https://linkwarden.yourdomain.com with the URL you want to use to access Linkwarden. If you don’t have a domain name, you can use your local IP address instead. If you don’t want to use SSL, replace https with http. If you don’t want a custom URL, use http://localhost:3000 instead.\nvolumes: Replace /volume1/docker/linkwarden/data with the path to your data folder. Replace /volume1/docker/linkwarden/db with the path to your db folder.\nports: Replace 3333 with the port you want to use to access Linkwarden. If the reverse proxy is installed on the same device, you don’t have to publish any ports.\n\nConfigure the reserve proxy if you want to use a custom URL and/or SSL.\nStep 4: Create a Linkwarden Admin Account\nNow, you’ll need to create a Linkwarden admin account. After the container starts, open a web browser and type in your NAS IP address followed by the assigned port number http://ip-address-of-your-synology:3333 or your domain. You’ll be greeted by the Linkwarden login screen:\n\nClick on Sign up and create a new account. Then, log in with your new account.\nIf this doesn’t work, you might have to check your NEXTAUTH_URL again. Make sure it’s http instead of https if you don’t use SSL.\nStep 5: Configure Linkwarden\nAfter logging in, you’ll find yourself on the Linkwarden dashboard.\nSet your profile to private\nClick on the profile icon in the top right corner to open the settings.\n\nUnder “Profile Visibility” select “Make profile private” and click on “Save”.\n\nDisable registration\nDo you want to prevent other users from registering? Go back to the Portainer stack and uncomment the following line:\n- NEXT_PUBLIC_DISABLE_REGISTRATION=true\n\nThe boolean is case sensitive. Make sure it’s true and not True or TRUE. Then, restart the stack.\nTry to register a new account. You should see the an error 400: “Registration is disabled” at the end of the registration process.\nStep 6: Add bookmarks\nYou can import your bookmarks from a bookmark html file. These files are usually exported from your browser.\nYou can also import a json file from Linkwarden or another bookmark manager.\nYou can find the export functionality in the profile settings.\nYou can also add bookmarks manually by clicking on the plus icon in the top right corner.\nThis will save the bookmark to a selected collection and generate a screenshot and a PDF of the webpage (you can disable this feature in the settings). Furthermore, you can add tags to your bookmarks to categorize them.\n\nTips for a Smooth Experience\n\nRegularly update Linkwarden to the latest version. Go to the stack editor in Portainer and click on Update the stack and select Re-pull image and redeploy to update Linkwarden. Don’t update Postgres to a newer major version without a migration plan.\nRegularly back up your data. You can find the backup functionality in the profile settings. You can also back up your data by backing up the data and db folders you created in Step 1.\nUse strong, unique passwords for your Linkwarden account. You can use a password manager like Vaultwarden to generate and store your passwords.\n\nConclusion\nCongratulations! You’ve taken a significant step towards managing your bookmarks more effectively with Linkwarden on your Synology NAS. With your bookmarks now self-hosted, you can enjoy enhanced privacy and convenience. Remember, the key to a successful installation is following each step carefully and not rushing the process. Happy bookmarking! ","length":9683,"excerpt":"Managing bookmarks can often be a hassle, especially when you’re trying to sync them across multiple browsers and devices. Enter Linkwarden, a robust open-source self-hosted bookmark manager that puts you in control of your digital resources. If you have a Synology NAS at your disposal, you’re in luck. You can set up Linkwarden on your device, ensuring that your bookmarks are private and accessible from anywhere. Let’s walk through the installation process.","siteName":null} |