0401.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Host Your Own Reddit Alternative with Lemmy in Docker</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Lemmy,Reddit,Self-Hosted,Docker,Container,Linux,Link Aggregator,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Host Your Own Reddit Alternative with Lemmy in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="10/26/2022 09:13:22 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Host Your Own Reddit Alternative with Lemmy in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Lemmy?</h2>
  26. <blockquote><em>Lemmy is an open-source, federated link aggregator similar to Reddit and built with Rust.</em></blockquote>
  27. <ol>
  28. <li>Log into the host device</li>
  29. <li>Run the following commands in terminal
  30. <div class="codeBlock"># install docker and docker-compose<br />
  31. sudo apt install docker docker-compose docker.io<br />
  32. # create a working directory<br />
  33. sudo mkdir lemmy &amp;&amp; cd lemmy/<br />
  34. # download the container files<br />
  35. sudo wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/prod/docker-compose.yml<br />
  36. sudo wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/lemmy.hjson<br />
  37. sudo wget https://raw.githubusercontent.com/LemmyNet/lemmy/main/docker/iframely.config.local.js<br />
  38. # create pictrs directory<br />
  39. sudo mkdir -p volumes/pictrs<br />
  40. sudo chown -R 991:991 volumes/pictrs<br />
  41. # edit docker-compose.yml<br />
  42. sudo nano docker-compose.yml</div>
  43. </li>
  44. <li>Scroll down to the POSTGRES_PASSWORD line and enter a secure password</li>
  45. <li>Press CTRL+O, Enter, CTRL+X to write the changes to docker-compose.yml</li>
  46. <li>Continue with the following command
  47. <div class="codeBlock">sudo nano lemmy.hjson</div>
  48. </li>
  49. <li>Press CTRL + W and search for database</li>
  50. <li>Scroll down to the database password and update the value to match the value set in docker-compose.yml earlier</li>
  51. <li>Press CTRL+O, Enter, CTRL+X to write the changes to lemmy.hjson</li>
  52. <li>Run the following command to start the Lemmy Docker container
  53. <div class="codeBlock">sudo docker-compose up -d</div>
  54. </li>
  55. <li>Open a web browser and navigate to http://DNSorIP:1235</li>
  56. <li>Log into Lemmy with the username and password lemmy</li>
  57. </ol> </div>
  58. </div>
  59. </body>
  60. </html>