2025-08-05 13:24:21

This commit is contained in:
swangnice
2025-08-05 13:24:21 +08:00
parent 64eed4e7ce
commit 8a920994bf
268 changed files with 8347 additions and 15561 deletions

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" class="scroll-smooth" data-default-appearance="light"
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
data-auto-appearance="true"><head>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="en" />
@@ -78,6 +78,9 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<meta property="article:modified_time" content="2024-09-20T04:17:50+00:00">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/02_nas/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/03_gitea/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/">
<meta name="twitter:card" content="summary">
@@ -112,7 +115,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
"mainEntityOfPage": "true",
"wordCount": "234"
"wordCount": "260"
}]
</script>
@@ -195,10 +198,10 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-base font-medium" title="">
Home
<p class="text-base font-medium" title="About">
About
</p>
</a>
@@ -319,7 +322,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/life/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Rest Here">
RestHere
</a>
<span>
@@ -548,10 +551,10 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
Home
<p class="text-bg font-bg" title="About">
About
</p>
</a>
</li>
@@ -675,9 +678,9 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/life/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Rest Here">
RestHere
</p>
<span>
@@ -849,7 +852,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div class="flex flex-row flex-wrap items-center">
<span>234 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
<span>260 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
@@ -1015,6 +1018,33 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>
@@ -1058,7 +1088,7 @@ while true; do
ping -c 1 &lt;ip address&gt; &gt; /dev/null 2&gt;&amp;1
if [ $? -ne 0 ]; then
pkill -f autossh
autossh -M 0 -f -N -R 0.0.0.0:9000:localhost:1313 &lt;ip address&gt;
autossh -M 0 -f -N -R 0.0.0.0:1313:localhost:1313 &lt;ip address&gt;
fi
sleep 60
done
@@ -1080,12 +1110,16 @@ done
server_name www.&lt;your domain&gt; &lt;your domain&gt;;
location / {
proxy_pass http://localhost:9000;
proxy_pass http://localhost:1313;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
</code></pre><p>Then, link the config file to <code>sites-enabled</code>, check and reload the Nginx configuration:</p>
<pre tabindex="0"><code>ln -s /etc/nginx/sites-available/&lt;your config file&gt; /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
</code></pre><p>To obtain a security certificate, use the certbot:</p>
<pre tabindex="0"><code>sudo apt update
sudo apt install certbot python3-certbot-nginx
@@ -1132,6 +1166,33 @@ sudo certbot --nginx -d swangnice.cn
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" class="scroll-smooth" data-default-appearance="light"
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
data-auto-appearance="true"><head>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="en" />
@@ -77,6 +77,9 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<meta property="article:modified_time" content="2024-09-20T04:17:50+00:00">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/01_website_hosting/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/03_gitea/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/">
<meta name="twitter:card" content="summary">
@@ -110,7 +113,7 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
"mainEntityOfPage": "true",
"wordCount": "122"
"wordCount": "117"
}]
</script>
@@ -193,10 +196,10 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-base font-medium" title="">
Home
<p class="text-base font-medium" title="About">
About
</p>
</a>
@@ -317,7 +320,7 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/life/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Rest Here">
RestHere
</a>
<span>
@@ -546,10 +549,10 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<li class="mt-1">
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
Home
<p class="text-bg font-bg" title="About">
About
</p>
</a>
</li>
@@ -673,9 +676,9 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<li class="mt-1">
<a href="" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/life/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Rest Here">
RestHere
</p>
<span>
@@ -847,7 +850,7 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<div class="flex flex-row flex-wrap items-center">
<span>122 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
<span>117 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
@@ -1011,6 +1014,33 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>
@@ -1035,8 +1065,7 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
<p>Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring drive health a hassle. That was a big deal-breaker for me.</p>
<p>Still, none of the other options really fit my expectations either. One day, I might just go all-in and make my own enclosure—design the PCB, write the firmware, the whole deal. Maybe not today… but someday.</p>
<pre tabindex="0"><code>diskutil list
</code></pre><p>Solution: HFS+ + SMB3.0 客户端设置“延迟加载目录”或“按需索引”</p>
<p><code>diskutil list</code></p>
</code></pre><p><code>diskutil list</code></p>
<pre tabindex="0"><code>sudo smartctl -a /dev/disk2
</code></pre><p><code>brew install smartmontools</code></p>
@@ -1081,6 +1110,33 @@ Even worse, it doesnt support S.M.A.R.T passthrough, which makes monitoring d
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" class="scroll-smooth" data-default-appearance="light"
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
data-auto-appearance="true"><head>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="en" />
@@ -68,11 +68,10 @@
<meta property="og:site_name" content="SWangNice">
<meta property="og:title" content="My Own Code Vault: Gitea on Mac Mini">
<meta property="og:description" content="Install dependence of gitea:
brew install git brew install gitea Start the configuration page of Gitea:
gitea web Install MySQL:
brew install git brew install gitea The database # Install MySQL:
brew install mysql brew services start mysql Login MySQL and create the database and user:
mysql -u root Then, execute:
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER &#39;gitea&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;yourpassword&gt;&#39;; GRANT ALL PRIVILEGES ON gitea.* TO &#39;gitea&#39;@&#39;localhost&#39;; FLUSH PRIVILEGES; CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER gitea@localhost IDENTIFIED BY gitea; GRANT ALL PRIVILEGES ON gitea.* TO gitea@localhost; FLUSH PRIVILEGES;">
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER &#39;gitea&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;yourpassword&gt;&#39;; GRANT ALL PRIVILEGES ON gitea.* TO &#39;gitea&#39;@&#39;localhost&#39;; FLUSH PRIVILEGES; Config the Gitea # Start the configuration page of Gitea:">
<meta property="og:locale" content="en">
<meta property="og:type" content="article">
<meta property="article:section" content="projects">
@@ -80,16 +79,18 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<meta property="article:modified_time" content="2024-09-20T04:17:50+00:00">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/01_website_hosting/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/02_nas/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="My Own Code Vault: Gitea on Mac Mini">
<meta name="twitter:description" content="Install dependence of gitea:
brew install git brew install gitea Start the configuration page of Gitea:
gitea web Install MySQL:
brew install git brew install gitea The database # Install MySQL:
brew install mysql brew services start mysql Login MySQL and create the database and user:
mysql -u root Then, execute:
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER &#39;gitea&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;yourpassword&gt;&#39;; GRANT ALL PRIVILEGES ON gitea.* TO &#39;gitea&#39;@&#39;localhost&#39;; FLUSH PRIVILEGES; CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER gitea@localhost IDENTIFIED BY gitea; GRANT ALL PRIVILEGES ON gitea.* TO gitea@localhost; FLUSH PRIVILEGES;">
CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE USER &#39;gitea&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;yourpassword&gt;&#39;; GRANT ALL PRIVILEGES ON gitea.* TO &#39;gitea&#39;@&#39;localhost&#39;; FLUSH PRIVILEGES; Config the Gitea # Start the configuration page of Gitea:">
<script type="application/ld+json">
@@ -100,7 +101,7 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
"name": "My Own Code Vault: Gitea on Mac Mini",
"headline": "My Own Code Vault: Gitea on Mac Mini",
"abstract": "\u003cp\u003eInstall dependence of gitea:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ebrew install git\nbrew install gitea\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eStart the configuration page of Gitea:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003egitea web\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eInstall MySQL:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ebrew install mysql\nbrew services start mysql\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eLogin MySQL and create the database and user:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003emysql -u root\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eThen, execute:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003eCREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER \u0026#39;gitea\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED BY \u0026#39;\u0026lt;yourpassword\u0026gt;\u0026#39;;\nGRANT ALL PRIVILEGES ON gitea.* TO \u0026#39;gitea\u0026#39;@\u0026#39;localhost\u0026#39;;\nFLUSH PRIVILEGES;\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eCREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER \u0026lsquo;gitea\u0026rsquo;@\u0026rsquo;localhost\u0026rsquo; IDENTIFIED BY \u0026lsquo;gitea\u0026rsquo;;\nGRANT ALL PRIVILEGES ON gitea.* TO \u0026lsquo;gitea\u0026rsquo;@\u0026rsquo;localhost\u0026rsquo;;\nFLUSH PRIVILEGES;\u003c\/p\u003e",
"abstract": "\u003cp\u003eInstall dependence of gitea:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ebrew install git\nbrew install gitea\n\u003c\/code\u003e\u003c\/pre\u003e\n\n\u003ch2 class=\u0022relative group\u0022\u003eThe database \n \u003cdiv id=\u0022the-database\u0022 class=\u0022anchor\u0022\u003e\u003c\/div\u003e\n \n \u003cspan\n class=\u0022absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100\u0022\u003e\n \u003ca class=\u0022group-hover:text-primary-300 dark:group-hover:text-neutral-700\u0022\n style=\u0022text-decoration-line: none !important;\u0022 href=\u0022#the-database\u0022 aria-label=\u0022Anchor\u0022\u003e#\u003c\/a\u003e\n \u003c\/span\u003e \n \n\u003c\/h2\u003e\n\u003cp\u003eInstall MySQL:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ebrew install mysql\nbrew services start mysql\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eLogin MySQL and create the database and user:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003emysql -u root\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eThen, execute:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003eCREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;\nCREATE USER \u0026#39;gitea\u0026#39;@\u0026#39;localhost\u0026#39; IDENTIFIED BY \u0026#39;\u0026lt;yourpassword\u0026gt;\u0026#39;;\nGRANT ALL PRIVILEGES ON gitea.* TO \u0026#39;gitea\u0026#39;@\u0026#39;localhost\u0026#39;;\nFLUSH PRIVILEGES;\n\u003c\/code\u003e\u003c\/pre\u003e\n\n\u003ch2 class=\u0022relative group\u0022\u003eConfig the Gitea \n \u003cdiv id=\u0022config-the-gitea\u0022 class=\u0022anchor\u0022\u003e\u003c\/div\u003e\n \n \u003cspan\n class=\u0022absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100\u0022\u003e\n \u003ca class=\u0022group-hover:text-primary-300 dark:group-hover:text-neutral-700\u0022\n style=\u0022text-decoration-line: none !important;\u0022 href=\u0022#config-the-gitea\u0022 aria-label=\u0022Anchor\u0022\u003e#\u003c\/a\u003e\n \u003c\/span\u003e \n \n\u003c\/h2\u003e\n\u003cp\u003eStart the configuration page of Gitea:\u003c\/p\u003e",
"inLanguage": "en",
"url" : "http:\/\/localhost:1313\/projects\/self_host\/mac_mini_m4\/03_gitea\/",
"author" : {
@@ -116,7 +117,7 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
"mainEntityOfPage": "true",
"wordCount": "86"
"wordCount": "161"
}]
</script>
@@ -199,10 +200,10 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-base font-medium" title="">
Home
<p class="text-base font-medium" title="About">
About
</p>
</a>
@@ -323,7 +324,7 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/life/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Rest Here">
RestHere
</a>
<span>
@@ -552,10 +553,10 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<li class="mt-1">
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
Home
<p class="text-bg font-bg" title="About">
About
</p>
</a>
</li>
@@ -679,9 +680,9 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<li class="mt-1">
<a href="" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/life/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Rest Here">
RestHere
</p>
<span>
@@ -853,7 +854,7 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<div class="flex flex-row flex-wrap items-center">
<span>86 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
<span>161 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
@@ -907,7 +908,81 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<section class="flex flex-col max-w-full mt-0 prose dark:prose-invert lg:flex-row">
<div
class="order-first lg:ml-auto px-0 lg:order-last ltr:lg:pl-8 rtl:lg:pr-8">
<div class="toc ltr:pl-5 rtl:pr-5 print:hidden lg:sticky lg:top-10">
<details open id="TOCView"
class="toc-right mt-0 overflow-y-scroll overscroll-contain scrollbar-thin scrollbar-track-neutral-200 scrollbar-thumb-neutral-400 dark:scrollbar-track-neutral-800 dark:scrollbar-thumb-neutral-600 rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 hidden lg:block">
<summary
class="block py-1 text-lg font-semibold cursor-pointer bg-neutral-100 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-neutral-700 dark:text-neutral-100 lg:hidden">
Table of Contents
</summary>
<div
class="min-w-[220px] py-2 border-dotted ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#the-database">The database</a></li>
<li><a href="#config-the-gitea">Config the Gitea</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</details>
<details class="toc-inside mt-0 overflow-hidden rounded-lg ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 lg:hidden">
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-neutral-100 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-neutral-700 dark:text-neutral-100 lg:hidden">
Table of Contents
</summary>
<div
class="py-2 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<nav id="TableOfContents">
<ul>
<li>
<ul>
<li><a href="#the-database">The database</a></li>
<li><a href="#config-the-gitea">Config the Gitea</a></li>
</ul>
</li>
</ul>
</nav>
</div>
</details>
<script>
var margin = 200;
var marginError = 50;
(function () {
var $window = $(window);
var $toc = $('#TOCView');
var tocHeight = $toc.height();
function onResize() {
var windowAndMarginHeight = $window.height() - margin;
if(tocHeight >= windowAndMarginHeight) {
$toc.css("overflow-y", "scroll")
$toc.css("max-height", (windowAndMarginHeight + marginError) + "px")
} else {
$toc.css("overflow-y", "hidden")
$toc.css("max-height", "9999999px")
}
}
$window.on('resize', onResize);
$(document).ready(onResize);
})();
</script>
</div>
</div>
<div class="min-w-0 min-h-0 max-w-fit">
@@ -945,6 +1020,33 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>
@@ -955,9 +1057,19 @@ CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; CREATE U
<p>Install dependence of gitea:</p>
<pre tabindex="0"><code>brew install git
brew install gitea
</code></pre><p>Start the configuration page of Gitea:</p>
<pre tabindex="0"><code>gitea web
</code></pre><p>Install MySQL:</p>
</code></pre>
<h2 class="relative group">The database
<div id="the-database" class="anchor"></div>
<span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
style="text-decoration-line: none !important;" href="#the-database" aria-label="Anchor">#</a>
</span>
</h2>
<p>Install MySQL:</p>
<pre tabindex="0"><code>brew install mysql
brew services start mysql
</code></pre><p>Login MySQL and create the database and user:</p>
@@ -967,10 +1079,29 @@ brew services start mysql
CREATE USER &#39;gitea&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;&lt;yourpassword&gt;&#39;;
GRANT ALL PRIVILEGES ON gitea.* TO &#39;gitea&#39;@&#39;localhost&#39;;
FLUSH PRIVILEGES;
</code></pre><p>CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER &lsquo;gitea&rsquo;@&rsquo;localhost&rsquo; IDENTIFIED BY &lsquo;gitea&rsquo;;
GRANT ALL PRIVILEGES ON gitea.* TO &lsquo;gitea&rsquo;@&rsquo;localhost&rsquo;;
FLUSH PRIVILEGES;</p>
</code></pre>
<h2 class="relative group">Config the Gitea
<div id="config-the-gitea" class="anchor"></div>
<span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
style="text-decoration-line: none !important;" href="#config-the-gitea" aria-label="Anchor">#</a>
</span>
</h2>
<p>Start the configuration page of Gitea:</p>
<pre tabindex="0"><code>gitea web
</code></pre><p>After filling all information it required, it will generate a config file, for me, it&rsquo;s in<code>/opt/homebrew/var/gitea/custom/conf/app.ini</code>, then you can configure more details in this file. I strongly recommend close the public registration.</p>
<p>🚫outdated &ndash; Use autossh to build the new connection</p>
<pre tabindex="0"><code>autossh -M 0 -f -N \
-i ~/.ssh/id_ed25519 \
-o &#34;ServerAliveInterval 30&#34; -o &#34;ServerAliveCountMax 3&#34; \
-R 127.0.0.1:3000:localhost:3000 \
-R 127.0.0.1:9000:localhost:1313 \
root@&lt;ip_address&gt;
</code></pre><p>✅ Now I wrote a script to keep the connection alive, it contains some sensitive info like IP and ports, so I will not share it here.</p>
@@ -1013,6 +1144,33 @@ FLUSH PRIVILEGES;</p>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/06_photo_server/">
Part 6: My Own Photo Server: Immich on Mac Mini
</a>
</div>
</details>
@@ -1051,6 +1209,26 @@ FLUSH PRIVILEGES;</p>
<div class="flex justify-between pt-3">
<span>
<a class="flex group mr-3" href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
<span
class="mr-3 text-neutral-700 group-hover:text-primary-600 ltr:inline rtl:hidden dark:text-neutral dark:group-hover:text-primary-400"
>&larr;</span
>
<span
class="ml-3 text-neutral-700 group-hover:text-primary-600 ltr:hidden rtl:inline dark:text-neutral dark:group-hover:text-primary-400"
>&rarr;</span
>
<span class="flex flex-col">
<span
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>MCU Benchmark</span
>
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
</span>
</span>
</a>
</span>
<span>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" class="scroll-smooth" data-default-appearance="light"
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
data-auto-appearance="true"><head>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="en" />
@@ -8,14 +8,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Setup &middot; SWangNice</title>
<meta name="title" content="Setup &middot; SWangNice" />
<title>My Own Photo Server: Immich on Mac Mini &middot; SWangNice</title>
<meta name="title" content="My Own Photo Server: Immich on Mac Mini &middot; SWangNice" />
<meta name="description" content="My awesome website (English)" />
<link rel="canonical" href="http://localhost:1313/projects/self_host/mac_mini_m4/01_ssh/" />
<link rel="canonical" href="http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/" />
@@ -26,8 +26,8 @@
<link type="text/css" rel="stylesheet" href="/css/main.bundle.min.36c3cd7950e4533fa7da3150d972e3edf34d07f83c0264ff04cad0969dfdb3b8a7065b0ed6c730c6d34a7bad516cfc6f6a5917ab1fdb10b25f481f8a17b54c16.css"
integrity="sha512-NsPNeVDkUz&#43;n2jFQ2XLj7fNNB/g8AmT/BMrQlp39s7inBlsO1scwxtNKe61RbPxvalkXqx/bELJfSB&#43;KF7VMFg==" />
<link type="text/css" rel="stylesheet" href="/css/main.bundle.min.3d98b0e3c7886b2be13facfb539c8f79843dd3cff84d1c41763deb363c668c308c7c7ac9ecb3923f8602e257866ff553de4228ff50492074acc6d07b3d232fb1.css"
integrity="sha512-PZiw48eIayvhP6z7U5yPeYQ908/4TRxBdj3rNjxmjDCMfHrJ7LOSP4YC4leGb/VT3kIo/1BJIHSsxtB7PSMvsQ==" />
<script type="text/javascript" src="/js/appearance.min.516a16745bea5a9bd011138d254cc0fd3973cd55ce6e15f3dec763e7c7c2c7448f8fe7b54cca811cb821b0c7e12cd161caace1dd794ac3d34d40937cbcc9ee12.js"
@@ -43,8 +43,8 @@
<script defer type="text/javascript" id="script-bundle" src="/js/main.bundle.min.52b8d61b061c90a738102a0eac69eaa1479fdf5de882a0b0741d7515240617156a6c4477fcc91f9c962062804fe62d2932bb9f57d0aded208c762c2e1ed2e202.js"
integrity="sha512-UrjWGwYckKc4ECoOrGnqoUef313ogqCwdB11FSQGFxVqbER3/MkfnJYgYoBP5i0pMrufV9Ct7SCMdiwuHtLiAg==" data-copy="Copy" data-copied="Copied"></script>
<script defer type="text/javascript" id="script-bundle" src="/js/main.bundle.min.f8f2cec11308434554dfdbe3a0963bc19265192ebb9e2d644f3f9250731c879dfb09b44d2d58fcd06e8a1c9051b57f594719b37d21689d366ffd2db050df40a0.js"
integrity="sha512-&#43;PLOwRMIQ0VU39vjoJY7wZJlGS67ni1kTz&#43;SUHMch537CbRNLVj80G6KHJBRtX9ZRxmzfSFonTZv/S2wUN9AoA==" data-copy="Copy" data-copied="Copied"></script>
@@ -64,26 +64,29 @@
<meta property="og:url" content="http://localhost:1313/projects/self_host/mac_mini_m4/01_ssh/">
<meta property="og:url" content="http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/">
<meta property="og:site_name" content="SWangNice">
<meta property="og:title" content="Setup">
<meta property="og:description" content="🍎Mac Mini Side # As a server, my Mac wont sleep, so change the setting firstly.
sudo systemsetup -setcomputersleep Never # never sleep sudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min Use autossh to avoid timeout:
brew install autossh Add the configuration below in ~/.ssh/config Mac Mini will send package per 30 seconds to keep the connection alive.">
<meta property="og:title" content="My Own Photo Server: Immich on Mac Mini">
<meta property="og:description" content="Immich is a self-hosted photo and video management solution that allows you to organize, share, and access your media files from anywhere. It provides features like automatic backups, facial recognition, and easy sharing options.
Installation # Follow the official Immich installation guide for detailed instructions. Below is a quick overview of the steps to get started.
cd &lt;where you like&gt; mkdir ./immich-app cd ./immich-app wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env cp example.env .env Edit the .env file to set your desired configuration options, such as database settings and server URLs. Make sure to set the APP_URL to your servers URL.">
<meta property="og:locale" content="en">
<meta property="og:type" content="article">
<meta property="article:section" content="projects">
<meta property="article:published_time" content="2024-09-20T04:17:50+00:00">
<meta property="article:modified_time" content="2024-09-20T04:17:50+00:00">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/stock_bot/01_todo/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/stock_bot/02_results/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/01_website_hosting/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/02_nas/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/03_gitea/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/">
<meta property="og:see_also" content="http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Setup">
<meta name="twitter:description" content="🍎Mac Mini Side # As a server, my Mac wont sleep, so change the setting firstly.
sudo systemsetup -setcomputersleep Never # never sleep sudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min Use autossh to avoid timeout:
brew install autossh Add the configuration below in ~/.ssh/config Mac Mini will send package per 30 seconds to keep the connection alive.">
<meta name="twitter:title" content="My Own Photo Server: Immich on Mac Mini">
<meta name="twitter:description" content="Immich is a self-hosted photo and video management solution that allows you to organize, share, and access your media files from anywhere. It provides features like automatic backups, facial recognition, and easy sharing options.
Installation # Follow the official Immich installation guide for detailed instructions. Below is a quick overview of the steps to get started.
cd &lt;where you like&gt; mkdir ./immich-app cd ./immich-app wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env cp example.env .env Edit the .env file to set your desired configuration options, such as database settings and server URLs. Make sure to set the APP_URL to your servers URL.">
<script type="application/ld+json">
@@ -91,12 +94,12 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
"@context": "https://schema.org",
"@type": "Article",
"articleSection": "Projects",
"name": "Setup",
"headline": "Setup",
"name": "My Own Photo Server: Immich on Mac Mini",
"headline": "My Own Photo Server: Immich on Mac Mini",
"abstract": "\u003ch2 class=\u0022relative group\u0022\u003e🍎Mac Mini Side \n \u003cdiv id=\u0022mac-mini-side\u0022 class=\u0022anchor\u0022\u003e\u003c\/div\u003e\n \n \u003cspan\n class=\u0022absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100\u0022\u003e\n \u003ca class=\u0022group-hover:text-primary-300 dark:group-hover:text-neutral-700\u0022\n style=\u0022text-decoration-line: none !important;\u0022 href=\u0022#mac-mini-side\u0022 aria-label=\u0022Anchor\u0022\u003e#\u003c\/a\u003e\n \u003c\/span\u003e \n \n\u003c\/h2\u003e\n\u003cp\u003eAs a server, my Mac won\u0026rsquo;t sleep, so change the setting firstly.\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003esudo systemsetup -setcomputersleep Never # never sleep\nsudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eUse autossh to avoid timeout:\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ebrew install autossh\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eAdd the configuration below in \u003ccode\u003e~\/.ssh\/config\u003c\/code\u003e Mac Mini will send package per 30 seconds to keep the connection alive.\u003c\/p\u003e",
"abstract": "\u003cp\u003eImmich is a self-hosted photo and video management solution that allows you to organize, share, and access your media files from anywhere. It provides features like automatic backups, facial recognition, and easy sharing options.\u003c\/p\u003e\n\n\n\u003ch2 class=\u0022relative group\u0022\u003eInstallation \n \u003cdiv id=\u0022installation\u0022 class=\u0022anchor\u0022\u003e\u003c\/div\u003e\n \n \u003cspan\n class=\u0022absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100\u0022\u003e\n \u003ca class=\u0022group-hover:text-primary-300 dark:group-hover:text-neutral-700\u0022\n style=\u0022text-decoration-line: none !important;\u0022 href=\u0022#installation\u0022 aria-label=\u0022Anchor\u0022\u003e#\u003c\/a\u003e\n \u003c\/span\u003e \n \n\u003c\/h2\u003e\n\u003cp\u003eFollow the official \u003ca href=\u0022https:\/\/immich.app\/docs\/overview\/quick-start\u0022 target=\u0022_blank\u0022\u003eImmich installation guide\u003c\/a\u003e for detailed instructions. Below is a quick overview of the steps to get started.\u003c\/p\u003e\n\u003cpre tabindex=\u00220\u0022\u003e\u003ccode\u003ecd \u0026lt;where you like\u0026gt;\nmkdir .\/immich-app\ncd .\/immich-app\nwget -O docker-compose.yml https:\/\/github.com\/immich-app\/immich\/releases\/latest\/download\/docker-compose.yml\nwget -O .env https:\/\/github.com\/immich-app\/immich\/releases\/latest\/download\/example.env\ncp example.env .env\n\u003c\/code\u003e\u003c\/pre\u003e\u003cp\u003eEdit the \u003ccode\u003e.env\u003c\/code\u003e file to set your desired configuration options, such as database settings and server URLs. Make sure to set the \u003ccode\u003eAPP_URL\u003c\/code\u003e to your server\u0026rsquo;s URL.\u003c\/p\u003e",
"inLanguage": "en",
"url" : "http:\/\/localhost:1313\/projects\/self_host\/mac_mini_m4\/01_ssh\/",
"url" : "http:\/\/localhost:1313\/projects\/self_host\/mac_mini_m4\/06_photo_server\/",
"author" : {
"@type": "Person",
"name": "SWang"
@@ -110,7 +113,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
"mainEntityOfPage": "true",
"wordCount": "127"
"wordCount": "180"
}]
</script>
@@ -193,10 +196,10 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-base font-medium" title="">
Home
<p class="text-base font-medium" title="About">
About
</p>
</a>
@@ -207,7 +210,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a href="/notes/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/notes/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Notes">
Notes
</a>
<span>
@@ -262,7 +265,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a href="/projects/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/projects/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Projects">
Projects
</a>
<span>
@@ -291,6 +294,13 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div class="pt-2 p-5 mt-2 rounded-xl backdrop-blur shadow-2xl">
<div class="flex flex-col space-y-3">
<a href="/projects/embedded/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-sm font-sm" title="">
Fancy Things on Boards
</p>
</a>
<a href="/projects/self_host/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-sm font-sm" title="">
@@ -310,7 +320,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/life/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Rest Here">
RestHere
</a>
<span>
@@ -539,10 +549,10 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
Home
<p class="text-bg font-bg" title="About">
About
</p>
</a>
</li>
@@ -556,7 +566,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="/notes/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Notes">
Notes
</p>
<span>
@@ -612,7 +622,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="/projects/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Projects">
Projects
</p>
<span>
@@ -639,6 +649,15 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
</a>
</li>
<li class="mt-1">
<a href="/projects/embedded/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-sm font-small" title="">
Fancy Things on Boards
</p>
</a>
</li>
<li class="mt-1">
<a href="/projects/self_host/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
@@ -657,9 +676,9 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<li class="mt-1">
<a href="" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/life/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Rest Here">
RestHere
</p>
<span>
@@ -788,7 +807,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<header id="single_header" class="mt-5 max-w-prose">
<h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
Setup
My Own Photo Server: Immich on Mac Mini
</h1>
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
@@ -831,7 +850,7 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div class="flex flex-row flex-wrap items-center">
<span>127 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
<span>180 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
@@ -901,8 +920,8 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<ul>
<li>
<ul>
<li><a href="#mac-mini-side">🍎Mac Mini Side</a></li>
<li><a href="#server-side">💻Server Side</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#quote-photos-in-hugo-page">Quote Photos in Hugo page</a></li>
</ul>
</li>
</ul>
@@ -920,8 +939,8 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<ul>
<li>
<ul>
<li><a href="#mac-mini-side">🍎Mac Mini Side</a></li>
<li><a href="#server-side">💻Server Side</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#quote-photos-in-hugo-page">Quote Photos in Hugo page</a></li>
</ul>
</li>
</ul>
@@ -968,22 +987,15 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
StockBot - This article is part of a series.
My First Server in Room - This article is part of a series.
</summary>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part 1: This Article
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/stock_bot/01_todo/">
Part 1: TODO List
<a href="/projects/self_host/mac_mini_m4/01_website_hosting/">
Part 1: Website Setup
</a>
</div>
@@ -991,12 +1003,46 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/stock_bot/02_results/">
Part 2: Showcases
<a href="/projects/self_host/mac_mini_m4/02_nas/">
Part 2: NAS: Network Attachment Storage
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/03_gitea/">
Part 3: My Own Code Vault: Gitea on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part 6: This Article
</div>
</details>
@@ -1004,58 +1050,49 @@ brew install autossh Add the configuration below in ~/.ssh/config Mac Mini wi
<div class="article-content max-w-prose mb-20">
<p>Immich is a self-hosted photo and video management solution that allows you to organize, share, and access your media files from anywhere. It provides features like automatic backups, facial recognition, and easy sharing options.</p>
<h2 class="relative group">🍎Mac Mini Side
<div id="mac-mini-side" class="anchor"></div>
<h2 class="relative group">Installation
<div id="installation" class="anchor"></div>
<span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
style="text-decoration-line: none !important;" href="#mac-mini-side" aria-label="Anchor">#</a>
style="text-decoration-line: none !important;" href="#installation" aria-label="Anchor">#</a>
</span>
</h2>
<p>As a server, my Mac won&rsquo;t sleep, so change the setting firstly.</p>
<pre tabindex="0"><code>sudo systemsetup -setcomputersleep Never # never sleep
sudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min
</code></pre><p>Use autossh to avoid timeout:</p>
<pre tabindex="0"><code>brew install autossh
</code></pre><p>Add the configuration below in <code>~/.ssh/config</code> Mac Mini will send package per 30 seconds to keep the connection alive.</p>
<pre tabindex="0"><code>Host &lt;ip address&gt;
ServerAliveInterval 30
ServerAliveCountMax 5
TCPKeepAlive yes
</code></pre><p>Build the connection:</p>
<pre tabindex="0"><code>autossh -M 0 -f -N \
-i ~/.ssh/id_ed25519 \
-R 0.0.0.0:9000:localhost:1313 \
root@&lt;ip address&gt;
</code></pre>
<p>Follow the official <a href="https://immich.app/docs/overview/quick-start" target="_blank">Immich installation guide</a> for detailed instructions. Below is a quick overview of the steps to get started.</p>
<pre tabindex="0"><code>cd &lt;where you like&gt;
mkdir ./immich-app
cd ./immich-app
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
cp example.env .env
</code></pre><p>Edit the <code>.env</code> file to set your desired configuration options, such as database settings and server URLs. Make sure to set the <code>APP_URL</code> to your server&rsquo;s URL.</p>
<p>Then, run the following command to start Immich:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">docker compose up -d
</span></span></code></pre></div><p>Then Enjoy!!!</p>
<h2 class="relative group">💻Server Side
<div id="server-side" class="anchor"></div>
<h2 class="relative group">Quote Photos in Hugo page
<div id="quote-photos-in-hugo-page" class="anchor"></div>
<span
class="absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100">
<a class="group-hover:text-primary-300 dark:group-hover:text-neutral-700"
style="text-decoration-line: none !important;" href="#server-side" aria-label="Anchor">#</a>
style="text-decoration-line: none !important;" href="#quote-photos-in-hugo-page" aria-label="Anchor">#</a>
</span>
</h2>
<p>Install and config the Nginx, for me the config file in <code>/etc/nginx/sites-available</code>:</p>
<pre tabindex="0"><code>server {
listen 80;
server_name www.&lt;your domain&gt; &lt;your domain&gt;;
<ol>
<li>Share the photo using Immich.</li>
<li>Navigate to <code>Sharing</code> &gt; <code>Shared links</code> and select the tab corresponding to your shared content.</li>
<li>Open the web developer tools by pressing <code>F12</code>, then click on the photo you wish to quote.</li>
<li>In the <code>Network</code> tab, locate the request that displays the image preview and copy the URL. This URL should resemble <code>https://your-immich-domain.cn/api/assets/xxxxxxxxx/thumbnail?key=xxxxxxxxxxx=preview&amp;c=xxxxxxxxx</code>.</li>
</ol>
location / {
proxy_pass http://localhost:9000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
</code></pre>
@@ -1068,22 +1105,15 @@ root@&lt;ip address&gt;
<summary
class="py-1 text-lg font-semibold cursor-pointer bg-primary-200 text-neutral-800 ltr:-ml-5 ltr:pl-5 rtl:-mr-5 rtl:pr-5 dark:bg-primary-800 dark:text-neutral-100">
StockBot - This article is part of a series.
My First Server in Room - This article is part of a series.
</summary>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part 1: This Article
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/stock_bot/01_todo/">
Part 1: TODO List
<a href="/projects/self_host/mac_mini_m4/01_website_hosting/">
Part 1: Website Setup
</a>
</div>
@@ -1091,12 +1121,46 @@ root@&lt;ip address&gt;
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/stock_bot/02_results/">
Part 2: Showcases
<a href="/projects/self_host/mac_mini_m4/02_nas/">
Part 2: NAS: Network Attachment Storage
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/03_gitea/">
Part 3: My Own Code Vault: Gitea on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">
Part 4: MCU Benchmark
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
Part 5: My Own PDF Shelf: pdfding on Mac Mini
</a>
</div>
<div
class="py-1 border-dotted border-neutral-300 ltr:-ml-5 ltr:border-l ltr:pl-5 rtl:-mr-5 rtl:border-r rtl:pr-5 dark:border-neutral-600">
Part 6: This Article
</div>
</details>
@@ -1114,8 +1178,8 @@ root@&lt;ip address&gt;
<script>
var oid = "views_projects\/self_host\/mac_mini_m4\/01_ssh.md"
var oid_likes = "likes_projects\/self_host\/mac_mini_m4\/01_ssh.md"
var oid = "views_projects\/self_host\/mac_mini_m4\/06_photo_server.md"
var oid_likes = "likes_projects\/self_host\/mac_mini_m4\/06_photo_server.md"
</script>
@@ -1127,6 +1191,41 @@ root@&lt;ip address&gt;
<div class="pt-8">
<hr class="border-dotted border-neutral-300 dark:border-neutral-600" />
<div class="flex justify-between pt-3">
<span>
</span>
<span>
<a class="flex text-right group ml-3" href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">
<span class="flex flex-col">
<span
class="mt-[0.1rem] leading-6 group-hover:underline group-hover:decoration-primary-500"
>My Own PDF Shelf: pdfding on Mac Mini</span
>
<span class="mt-[0.1rem] text-xs text-neutral-500 dark:text-neutral-400">
</span>
</span>
<span
class="ml-3 text-neutral-700 group-hover:text-primary-600 ltr:inline rtl:hidden dark:text-neutral dark:group-hover:text-primary-400"
>&rarr;</span
>
<span
class="mr-3 text-neutral-700 group-hover:text-primary-600 ltr:hidden rtl:inline dark:text-neutral dark:group-hover:text-primary-400"
>&larr;</span
>
</a>
</span>
</div>
</div>
@@ -1149,7 +1248,7 @@ root@&lt;ip address&gt;
<li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
<a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="/tags/"
title="">
title="Tags">
Tags
</a>
@@ -1171,6 +1270,14 @@ root@&lt;ip address&gt;
<p class="text-sm text-neutral-500 dark:text-neutral-400">
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">
苏ICP备2024145451号
</a>
</p>
<p class="text-xs text-neutral-500 dark:text-neutral-400">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -1,6 +1,6 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" class="scroll-smooth" data-default-appearance="light"
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script>
data-auto-appearance="true"><head>
<meta charset="utf-8" />
<meta http-equiv="content-language" content="en" />
@@ -161,10 +161,10 @@
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-base font-medium" title="">
Home
<p class="text-base font-medium" title="About">
About
</p>
</a>
@@ -285,7 +285,7 @@
<div>
<div class="cursor-pointer flex items-center nested-menu">
<a class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="">
<a href="/life/" class="text-base font-medium text-gray-500 hover:text-primary-600 dark:hover:text-primary-400" title="Rest Here">
RestHere
</a>
<span>
@@ -514,10 +514,10 @@
<li class="mt-1">
<a href="/en/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/about/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
Home
<p class="text-bg font-bg" title="About">
About
</p>
</a>
</li>
@@ -641,9 +641,9 @@
<li class="mt-1">
<a href="" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<a href="/life/" class="flex items-center text-gray-500 hover:text-primary-600 dark:hover:text-primary-400">
<p class="text-bg font-bg" title="">
<p class="text-bg font-bg" title="Rest Here">
RestHere
</p>
<span>
@@ -894,7 +894,7 @@
<div class="flex flex-row flex-wrap items-center">
<span>234 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
<span>260 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
@@ -986,7 +986,7 @@
<div class="flex flex-row flex-wrap items-center">
<span>122 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
<span>117 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
@@ -1078,7 +1078,283 @@
<div class="flex flex-row flex-wrap items-center">
<span>86 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
<span>161 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>
</div>
<div class="flex flex-row flex-wrap items-center">
</div>
</div>
</div>
<div class="px-6 pt-4 pb-2">
</div>
</div>
</a>
<a href="/projects/self_host/mac_mini_m4/04_mcu_markbench/" class="min-w-full">
<div class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
<div class="px-6 py-4">
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="/projects/self_host/mac_mini_m4/04_mcu_markbench/">MCU Benchmark</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">
<div class="flex flex-row flex-wrap items-center">
<span>217 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
</div>
<div class="flex flex-row flex-wrap items-center">
</div>
</div>
</div>
<div class="px-6 pt-4 pb-2">
</div>
</div>
</a>
<a href="/projects/self_host/mac_mini_m4/05_pdf_shelf/" class="min-w-full">
<div class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
<div class="px-6 py-4">
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="/projects/self_host/mac_mini_m4/05_pdf_shelf/">My Own PDF Shelf: pdfding on Mac Mini</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">
<div class="flex flex-row flex-wrap items-center">
<span>251 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">2 mins</span>
</div>
<div class="flex flex-row flex-wrap items-center">
</div>
</div>
</div>
<div class="px-6 pt-4 pb-2">
</div>
</div>
</a>
<a href="/projects/self_host/mac_mini_m4/06_photo_server/" class="min-w-full">
<div class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
<div class="px-6 py-4">
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="/projects/self_host/mac_mini_m4/06_photo_server/">My Own Photo Server: Immich on Mac Mini</div>
<div class="text-sm text-neutral-500 dark:text-neutral-400">
<div class="flex flex-row flex-wrap items-center">
<span>180 words</span><span class="px-2 text-primary-500">&middot;</span><span title="Reading time">1 min</span>

View File

@@ -68,9 +68,19 @@ sudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min
<description>&lt;p&gt;Install dependence of gitea:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install git
brew install gitea
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start the configuration page of Gitea:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gitea web
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Install MySQL:&lt;/p&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 class=&#34;relative group&#34;&gt;The database
&lt;div id=&#34;the-database&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
&lt;span
class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
style=&#34;text-decoration-line: none !important;&#34; href=&#34;#the-database&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;Install MySQL:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install mysql
brew services start mysql
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Login MySQL and create the database and user:&lt;/p&gt;
@@ -80,10 +90,105 @@ brew services start mysql
CREATE USER &amp;#39;gitea&amp;#39;@&amp;#39;localhost&amp;#39; IDENTIFIED BY &amp;#39;&amp;lt;yourpassword&amp;gt;&amp;#39;;
GRANT ALL PRIVILEGES ON gitea.* TO &amp;#39;gitea&amp;#39;@&amp;#39;localhost&amp;#39;;
FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER &amp;lsquo;gitea&amp;rsquo;@&amp;rsquo;localhost&amp;rsquo; IDENTIFIED BY &amp;lsquo;gitea&amp;rsquo;;
GRANT ALL PRIVILEGES ON gitea.* TO &amp;lsquo;gitea&amp;rsquo;@&amp;rsquo;localhost&amp;rsquo;;
FLUSH PRIVILEGES;&lt;/p&gt;</description>
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 class=&#34;relative group&#34;&gt;Config the Gitea
&lt;div id=&#34;config-the-gitea&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
&lt;span
class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
style=&#34;text-decoration-line: none !important;&#34; href=&#34;#config-the-gitea&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;Start the configuration page of Gitea:&lt;/p&gt;</description>
</item>
<item>
<title>MCU Benchmark</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/04_mcu_markbench/</guid>
<description>&lt;a id=&#34;gitea-557b8590fb1ca3d7d5e6d0761887bbe0&#34; target=&#34;_blank&#34; href=&#34;https://code.swangnice.cn/swangnice/mcu-benchmark&#34; class=&#34;cursor-pointer&#34;&gt;
&lt;div
class=&#34;w-full md:w-auto pt-3 p-5 border border-neutral-200 dark:border-neutral-700 border rounded-md shadow-2xl&#34;&gt;
&lt;div class=&#34;flex items-center&#34;&gt;
&lt;span class=&#34;text-2xl text-neutral-800 dark:text-neutral&#34; style=&#34;margin-right:10px;&#34;&gt;
&lt;span class=&#34;relative block icon&#34;&gt;
&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; xml:space=&#34;preserve&#34; viewBox=&#34;5.67 143.05 628.65 387.55&#34;&gt;&lt;path fill=&#34;currentColor&#34; d=&#34;M115.912 143.075c-6.462 0-13.762.525-22.012 2.325-8.7 1.8-33.5 7.4-53.8 26.9C-4.9 212.4 6.6 276.2 8 285.8c1.7 11.7 6.9 44.2 31.7 72.5 45.8 56.1 144.4 54.8 144.4 54.8s12.1 28.9 30.6 55.5c25 33.1 50.7 58.9 75.7 62 63 0 188.9-.1 188.9-.1s12 .1 28.3-10.3c14-8.5 26.5-23.4 26.5-23.4S547 483 565 451.5c5.5-9.7 10.1-19.1 14.1-28 0 0 55.2-117.1 55.2-231.1-1.1-34.5-9.6-40.6-11.6-42.6-4.1-4.1-9.6-4-9.6-4s-117.2 6.6-177.9 8c-13.267.3-26.433.597-39.5.697l.1 117.002s57.4 24.202 83.1 40.102c3.7 2.3 10.2 6.798 12.9 14.398 2.1 6.1 2 13.101-1 19.301l-61 126.9c-6.2 12.7-21.4 18.1-33.9 12l-126.9-61c-12.5-6-17.9-21.2-11.8-33.8l61-126.9c6-12.5 21.2-17.9 33.8-11.8a5290.322 5290.322 0 0 0 27 12.954c0-36.449-.1-109.053-.1-109.053-29 .4-89.2-2.201-89.2-2.201s-141.4-7.1-156.8-8.5c-4.9-.3-10.525-.825-16.988-.825zm12.188 48.026s7.1 59.399 15.7 94.199c7.2 29.2 24.8 77.7 24.8 77.7s-26.1-3.1-43-9.1c-25.9-8.5-36.9-18.7-36.9-18.7S69.6 321.8 60 295.4c-16.5-44.2-1.4-71.2-1.4-71.2s8.4-22.5 38.5-30c13.8-3.7 31-3.1 31-3.1z&#34;/&gt;&lt;path fill=&#34;currentColor&#34; d=&#34;M326.8 380.1c-8.2.1-15.4 5.8-17.3 13.8-1.9 8 2 16.3 9.1 20 7.7 4 17.5 1.8 22.7-5.4 5.1-7.1 4.3-16.9-1.8-23.1l24-49.1c1.5.1 3.7.2 6.2-.5 4.1-.9 7.1-3.6 7.1-3.6 4.2 1.8 8.6 3.8 13.2 6.1 4.8 2.4 9.3 4.9 13.4 7.3.9.5 1.8 1.1 2.8 1.9 1.6 1.3 3.4 3.1 4.7 5.5 1.9 5.5-1.9 14.9-1.9 14.9-2.3 7.6-18.4 40.6-18.4 40.6-8.1-.2-15.3 5-17.7 12.5-2.6 8.1 1.1 17.3 8.9 21.3 7.8 4 17.4 1.7 22.5-5.3 5-6.8 4.6-16.3-1.1-22.6 1.9-3.7 3.7-7.4 5.6-11.3 5-10.4 13.5-30.4 13.5-30.4.9-1.7 5.7-10.3 2.7-21.3-2.5-11.4-12.6-16.7-12.6-16.7-12.2-7.9-29.2-15.2-29.2-15.2s0-4.1-1.1-7.1c-1.1-3.1-2.8-5.1-3.9-6.3 4.7-9.7 9.4-19.3 14.1-29-4.1-2-8.1-4-12.2-6.1-4.8 9.8-9.7 19.7-14.5 29.5-6.7-.1-12.9 3.5-16.1 9.4-3.4 6.3-2.7 14.1 1.9 19.8l-24.6 50.4z&#34;/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;/span&gt;
&lt;div
id=&#34;gitea-557b8590fb1ca3d7d5e6d0761887bbe0-full_name&#34;
class=&#34;m-0 font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral&#34;&gt;
swangnice/mcu-benchmark
&lt;/div&gt;
&lt;/div&gt;
&lt;p id=&#34;gitea-557b8590fb1ca3d7d5e6d0761887bbe0-description&#34; class=&#34;m-0 mt-2 text-md text-neutral-800 dark:text-neutral&#34;&gt;
A markbench of MCUs to help to you choose the right one.
&lt;/p&gt;</description>
</item>
<item>
<title>My Own PDF Shelf: pdfding on Mac Mini</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/05_pdf_shelf/</guid>
<description>&lt;p&gt;PDFding is a self-hosted PDF library management system, which is perfect for managing my personal PDF collection. It allows me to organize, search, and read PDFs directly from my Mac Mini. Later I will list a contents of my PDF library, if you need any of them, just email me. No commercial use, please.&lt;/p&gt;
&lt;h2 class=&#34;relative group&#34;&gt;Install Docker and Prepare Directories
&lt;div id=&#34;install-docker-and-prepare-directories&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
&lt;span
class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
style=&#34;text-decoration-line: none !important;&#34; href=&#34;#install-docker-and-prepare-directories&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;Download &lt;a href=&#34;https://www.docker.com/products/docker-desktop/&#34; target=&#34;_blank&#34;&gt;Docker Desktop&lt;/a&gt;, and install it.&lt;/p&gt;</description>
</item>
<item>
<title>My Own Photo Server: Immich on Mac Mini</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/06_photo_server/</guid>
<description>&lt;p&gt;Immich is a self-hosted photo and video management solution that allows you to organize, share, and access your media files from anywhere. It provides features like automatic backups, facial recognition, and easy sharing options.&lt;/p&gt;
&lt;h2 class=&#34;relative group&#34;&gt;Installation
&lt;div id=&#34;installation&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
&lt;span
class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
&lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
style=&#34;text-decoration-line: none !important;&#34; href=&#34;#installation&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;Follow the official &lt;a href=&#34;https://immich.app/docs/overview/quick-start&#34; target=&#34;_blank&#34;&gt;Immich installation guide&lt;/a&gt; for detailed instructions. Below is a quick overview of the steps to get started.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd &amp;lt;where you like&amp;gt;
mkdir ./immich-app
cd ./immich-app
wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env
cp example.env .env
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Edit the &lt;code&gt;.env&lt;/code&gt; file to set your desired configuration options, such as database settings and server URLs. Make sure to set the &lt;code&gt;APP_URL&lt;/code&gt; to your server&amp;rsquo;s URL.&lt;/p&gt;</description>
</item>