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