First commit on Mac Mini server

This commit is contained in:
2025-07-25 02:15:37 +08:00
parent 6f09b5f46f
commit 64eed4e7ce
358 changed files with 67829 additions and 14729 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>My First Server in Room: Mac Mini &#43; SSD Enclosure on SWangNice</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/</link>
<description>Recent content in My First Server in Room: Mac Mini &#43; SSD Enclosure on SWangNice</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<copyright>© 2025 SWang</copyright>
<lastBuildDate>Fri, 20 Sep 2024 04:17:50 +0000</lastBuildDate><atom:link href="http://localhost:1313/projects/self_host/mac_mini_m4/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Website Setup</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/01_website_hosting/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/01_website_hosting/</guid>
<description>&lt;p&gt;I don&amp;rsquo;t have a public IP, so my solution is SSH tunnel + reverse Proxy on cloud server.&lt;/p&gt;
&lt;h2 class=&#34;relative group&#34;&gt;🍎Mac Mini Side
&lt;div id=&#34;mac-mini-side&#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;#mac-mini-side&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;As a server, my Mac won&amp;rsquo;t sleep, so change the setting firstly.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo systemsetup -setcomputersleep Never # never sleep
sudo systemsetup -setdisplaysleep 10 # display will sleep in 10 min
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use autossh to avoid timeout:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;brew install autossh
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Add the configuration below in &lt;code&gt;~/.ssh/config&lt;/code&gt; Mac Mini will send package per 30 seconds to keep the connection alive.&lt;/p&gt;</description>
</item>
<item>
<title>NAS: Network Attachment Storage</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/02_nas/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/02_nas/</guid>
<description>&lt;h2 class=&#34;relative group&#34;&gt;Hardware
&lt;div id=&#34;hardware&#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;#hardware&#34; aria-label=&#34;Anchor&#34;&gt;#&lt;/a&gt;
&lt;/span&gt;
&lt;/h2&gt;
&lt;p&gt;I went with the UNITEK 3373BBK for one of my drive enclosures—and honestly, it wasnt the best decision.&lt;/p&gt;
&lt;p&gt;The first big letdown? The bandwidth tops out at just 5Gbps. Thats fine for basic tasks, but definitely underwhelming if youre dealing with high-speed storage or large file transfers.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;</description>
</item>
<item>
<title>My Own Code Vault: Gitea on Mac Mini</title>
<link>http://localhost:1313/projects/self_host/mac_mini_m4/03_gitea/</link>
<pubDate>Fri, 20 Sep 2024 04:17:50 +0000</pubDate>
<guid>http://localhost:1313/projects/self_host/mac_mini_m4/03_gitea/</guid>
<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;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;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mysql -u root
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then, execute:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CREATE DATABASE gitea CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
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>
</item>
</channel>
</rss>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>http://localhost:1313/projects/self_host/mac_mini_m4/</title>
<link rel="canonical" href="http://localhost:1313/projects/self_host/mac_mini_m4/">
<meta name="robots" content="noindex">
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=http://localhost:1313/projects/self_host/mac_mini_m4/">
</head>
</html>