0938.html 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Run Lychee - Photo Management System - 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="Browser Based,Docker Made Easy,Home Lab,Home Lab Ideas,Install Guide,Self-Hosted,Web Based,Web Based Tools,Containerize,Containers,Docker,Docker Container,Docker Host,Docker How To,Docker Made Simple,Docker Setup Tutorial,Docker Simplified,Google Photos Alternative,Linux,Photo Management,Photo Manager,Photo Organizer,Ubuntu,Lychee,Lychee Photo Management,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Run Lychee - Photo Management System - in Docker">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="08/11/2024 09:31:30 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>Run Lychee - Photo Management System - in Docker</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>What is Lychee?</h2>
  26. <blockquote><em>Lychee is a free photo-management tool, which runs on your server or web-space. Installing is a matter of seconds. Upload, manage and share photos like from a native application. Lychee comes with everything you need and all your photos are stored securely. -<a href="https://lycheeorg.github.io/" target="_blank">https://lycheeorg.github.io/</a></em></blockquote>
  27. <h2>Installing Docker</h2>
  28. <ol>
  29. <li>Log into the Linux based device</li>
  30. <li>Run the following commands in the terminal
  31. <div class="codeBlock"># install prerequisites<br />
  32. sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg-agent -y<br />
  33. # add docker gpg key<br />
  34. curl -fsSL https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release)/gpg | sudo apt-key add -<br />
  35. # add docker software repository<br />
  36. sudo add-apt-repository &quot;deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(awk -F&#39;=&#39; &#39;/^ID=/{ print $NF }&#39; /etc/os-release) $(lsb_release -cs) stable&quot;<br />
  37. # install docker<br />
  38. sudo apt install docker-ce docker-compose containerd.io -y<br />
  39. # enable and start docker service<br />
  40. sudo systemctl enable docker &amp;&amp; sudo systemctl start docker<br />
  41. # add the current user to the docker group<br />
  42. sudo usermod -aG docker $USER<br />
  43. # reauthenticate for the new group membership to take effect<br />
  44. su - $USER</div>
  45. </li>
  46. </ol>
  47. <h2>Running Lychee</h2>
  48. <ol>
  49. <li>Continue with the following commands in a terminal window
  50. <div class="codeBlock"># list current uid and gid, note these for later<br />
  51. id $user<br />
  52. # create working directories<br />
  53. mkdir ~/docker/lychee/{conf,uploads,sim} -p &amp;&amp; mkdir ~/docker/mariadb -p<br />
  54. # set ownership on the working directories<br />
  55. sudo chown &quot;$USER&quot;:&quot;$USER&quot; ~/docker -R<br />
  56. # create containers network<br />
  57. docker network create containers<br />
  58. # run the mariadb docker container<br />
  59. docker run -d --name mariadb --network containers -e MYSQL_ROOT_PASSWORD=r00tp@$$ -e MYSQL_USER=lychee_rw -e MYSQL_PASSWORD=&#39;Lych33!&#39; -e MYSQL_DATABASE=lychee -v ~/docker/mariadb:/var/lib/mysql -p 3306:3306 --restart=unless-stopped mariadb:latest<br />
  60. # run the lychee docker image<br />
  61. # replace PUID, GUID with the output of the id $user command above<br />
  62. docker run -d --name lychee --network containers -e PUID=1000 -e PGID=1000 -e TZ=America/New_York -e PHP_TZ=America/New_York -e DB_CONNECTION=mysql -e DB_HOST=mariadb -e DB_PORT=3306 -e DB_USERNAME=lychee_rw -e DB_PASSWORD=&#39;Lych33!&#39; -e DB_DATABASE=lychee -p 8090:80 -v ~/docker/lychee/conf:/config -v ~/docker/lychee/uploads:/uploads -v ~/docker/lychee/sym:/sym --restart=unless-stopped lycheeorg/lychee</div>
  63. </li>
  64. <li>Open a web browser and navigate to http://DNSorIP:8090</li>
  65. <li>Click Next at the Lychee welcome screen</li>
  66. <li>Click Next at the Requirements Check</li>
  67. <li>Click Next at the Permissions Check</li>
  68. <li>Update at least the following values in the
  69. <p>APP_URL=http://DNSorIP:8090<br />
  70. <br />
  71. DB_CONNECTION=mysql<br />
  72. DB_HOST=mariadb<br />
  73. DB_PORT=3306<br />
  74. DB_DATABASE=lychee<br />
  75. DB_USERNAME=lychee_rw<br />
  76. DB_PASSWORD=Lych33!</p>
  77. </li>
  78. <li>Click Save &gt; Click Install</li>
  79. <li>Once the installation completes click Set up admin account</li>
  80. <li>Enter a Username &gt; Enter and confirm a Password &gt; Click Create admin account</li>
  81. <li>Click Open Lychee</li>
  82. <li>Login using the username and password setup earlier</li>
  83. <li>Welcome to Lychee</li>
  84. </ol>
  85. <p>Documentation: <a href="https://lycheeorg.github.io/docs/#installation" target="_blank">https://lycheeorg.github.io/docs/#installation</a></p> </div>
  86. </div>
  87. </body>
  88. </html>