Home Data Center Series: A Complete Guide to Building a Personal Blog from Scratch (Minimum Cost)

Preface

It has been almost exactly one year since I officially published my first article on August 25 last year (the one on August 7 was just a test). In this year, I can’t remember how much knowledge I learned and how many bottomless pits I stepped into in order to run this blog. Today, although I can barely be considered a novice, new knowledge points still appear in front of me from time to time, forcing me to keep learning every day. It is really painful and happy.

只是,随着简中互联网环境的愈发封闭,加之国内搜索引擎对个人博客的极度不友好,导致大量的在国内建站的个人博主断更,而之前大量作者创作的技术内容被几个头部APP垄断,在资本的不停侵蚀下纷纷走上了收费的道路,”自由分享”的精神在简中互联网遭受到了严重的打击。

In this case, the most hurt are actually those new friends who really want to start learning. Take building a personal blog as an example: when someone asks how to build their own personal blog, the following answers are often various recommendations of domestic cloud hosts and related products, or various technical frameworks and then attached with their own courses. Of course, this is not to say that these are completely incorrect, but at this time, the most important thing is not to first explain the optional website building routes and their corresponding advantages and disadvantages, so that everyone can make the most suitable choice for themselves at the beginning, and not turn into ashes because of ignorance?


还记得封神演义中,不识天数的恶果吗?当身后传来申公豹的经典语录:”道友请留步”时,如果能提前知晓天数,头也不回的撒腿就跑,自然就能必避过劫数,不必上那封神榜走一遭。


鉴于此,我萌生了写一个”从零开始搭建个人博客之完整攻略(最低成本)”的想法(源于华夏民族对龙的好感,我本来想取个”从零开始搭建博客之一条龙全套服务”之类的名字,不过最终还是放弃了),一方面希望能够给新手朋友提供一个从无到有搭建个人博客的完整攻略,能够少踩一些深不见底的大坑(小坑是免不了了的,经验都是吃亏吃出来的);另一方面,也是为我这一年来建站所得相关经验做一个大概梳理。

当然,这个”最低成本”并不是绝对的,视每个人的具体情况而定:如果选择wordpress之类的需要数据库支持的动态博客是需要一个主机的,这个主机可以是本地硬件,也可以是云主机。只是不管是硬件还是云主机,多多少少肯定是有成本的,只不过,在我一直倡导的”家庭数据中心”理念的加持下,自己家里任何已有硬件(NAS、闲置硬件等,只要能安装docker就行)都可以利用起来,这样”最低成本”就取决于你闲置硬件的成本;当然,如果自己家里没有闲置硬件或者不想使用家里的硬件,也可以使用云主机的方式搭建动态个人博客,这种情况最低成本就取决于云主机的价格;或者,如果选择使用静态博客并使用免费托管服务,完全可以做到0成本。不过,就算是金钱可以0成本,但是学习所花费的时间和精力可少不了。

Note: Because everyone’s actual situation and choices are different, the optional routes for building a blog later will also be different.

第一节:你是否真的要踏上”个人博客”这个刺激之旅?

In today's era, personal blogs are outdated to some extent. Starting a personal blog now is like joining the National Army in 1949. Most of the bloggers who are still writing personal blogs in China have developed the habit of writing or are looking for a spiritual sanctuary of their own where they can chatter without being deleted or blocked at will. However, they pay a lot of energy and time costs: learning, writing, maintenance, etc. (Ordinary people should not even think about making money from blogs. Not only can they not make money, but they will also lose money~). Therefore, if you just want to play around on a whim or have no interest in writing itself, I don't recommend wasting energy on building a personal blog. You can consider other ready-made platforms. However, if you choose a ready-made platform, you will be subject to others and can only hope that you will not encounter deletion of posts and blocking of accounts. After all, you can't have your cake and eat it too.

注:关于是否需要个人博客的探讨,可以参考我之前的文章”The significance of personal blogs today, from the birth of my blog".

Section 2: Please read the safety instructions before your journey begins, and don’t choose the wrong road

If you finally make up your mind and decide to start this unknown and exciting journey, then you first need to have a general understanding of the key attractions of the journey (especially for friends in China, because you are lucky enough to be in one of the few very distinctive network areas, and the difficulty of starting from here is at least 10 times higher than other normal areas), including but not limited to the following: the area where the target readers are located (domestic or foreign), the way to build the blog (static or dynamic), the location of the blog (whether the IP address is resolved in China or abroad), the route and appearance layout of the blog, the appropriate image hosting solution, and subsequent advanced needs: access acceleration and DDos attack protection, etc. . Are you scared by so many attractions? In fact, don't be afraid, you just need a reliable travel safety guide.

此时,关于”安全须知”你是否会有如下图一般的问题:

image.png

image.png

Some time ago, I wrote an article inspired by:Home Data Center Series Independent Personal Blog Building and Pitfall Avoidance Guide, just treat this as a safety tip.

Section 3: Start the journey from the route you choose

After carefully reading the travel safety instructions, I believe everyone has found a route that suits them, so let's officially start the journey.

Route 1: Domestic website building


Let's first clarify the meaning of domestic website building: this has little to do with whether the VPS used to build the blog (if a VPS is used) is actually located in China or abroad. It only has to do with whether the IP address ultimately resolved from the blog domain name belongs to China or abroad. If it is domestic, it belongs to domestic website building; if it is abroad, it belongs to foreign website building (this is very important, if a CDN is used, the ownership of the CDN address is the same).


Using cloud hosting to build a blog

关于国内建站的一些基本常识(购买域名、购买云主机、备案)我在”避坑指南”里都谈过了,这里就不重复了。总体上而言,在国内建站,购买国内云主机然后以此来获取域名备案资格基本是必经之路(本来就是用这个来限制建站的可选方式,从而实现控制国内网站规模的目的,不过买云主机的目的是获取备案码,如果可以直接搞到备案码,那不买云主机也行),既然都有了云主机,那我建议新手朋友直接就利用云主机使用wordpress来搭建博客,这样建站的学习成本是最低的(有多低?只看一篇文章:Home Data Center Series WordPress Quickly Build a Personal Blog Zero-Based Newbie Direct Gift Package) The blog framework can be set up. As for the way to build WordPress, you can use the Baota panel source code deployment, or use docker to deploy (use docker run to deploy WordPress, please refer to the article:Docker series uses Docker to set up a blog slave site based on WordPress and implement regular backup of master-slave site configuration, but it is still recommended to use docker-compose, which is the most worry-free and suitable for beginners), it all depends on what you like.

Note 1: Since personal registration is not allowed in China, if you use WordPress to build a blog, you need to give up the built-in comment function (you can just disapprove any comments).

Note 2: You don’t have to use WordPress to build a dynamic blog. There are other options. But relatively speaking, WordPress is the most popular, and has a lot of tutorials and plug-ins. I feel it is the most friendly to newcomers.

Note 3: It does not mean that you have to use a dynamic blog like WordPress if you have a cloud host. In fact, you can also run a static blog. For example, after deploying a static blog built by hexo locally on the cloud host (you can refer to the article:Home data center series uses hexo to build a static blog and deploy it to cloudflare pages的”本地部署”部分),可以直接利用其提供的本地页面(http://localhost:4000)It is published with the help of reverse proxy, but due to performance issues (local pages are just lightweight web services), it needs to be used with CDN.

注4:理论上来说,为了备案购买便宜的云主机(比如腾讯云可以获得备案码的最低要求是轻量服务器),常常不得不面临以下的尴尬:便宜的云主机性能是一个问题,而性能好的云主机又太贵,很让人纠结。原本为了这个问题,就该我的”家庭数据中心”方案闪亮登场:使用家里性能好的硬件设备代替云主机部署各种应用(包括动态博客)进行发布。不过这个方案需要公网IP地址,考虑到很多朋友的家庭宽带都不满足,而且现在三大运营商对使用家庭宽带建站也查得很严,我就不正式提这个用法了,不过如果有朋友有这个条件又想挑战一下,有一些注意事项,细节可以参考文章:Home Data Center Series: Talking about the options for building a personal blog website based on the current situation where the Internet was disconnected at home.

Choose the right image hosting solution

Image hosting is a prerequisite issue that needs to be resolved before you officially start writing a blog post.


What is an image hosting service? An image hosting service is an online tool or service that is used to store and manage images. You can upload an image to an image hosting service and then get a link to the image. You can then use this link to display the image directly on your blog, social media, or other websites without having to store the image on your own website. This saves space and makes it easier to manage images.


There are many choices of image hosting services in China, and there are also many free ones to choose from. I won’t go into details here, you can just search online.

In addition to choosing free image hosting services, you can also choose to build your own image hosting (the cloud host purchased for domain name registration comes into play again). Among them, the more famous one is chevereto. For detailed configuration, please refer to the article:Docker series uses Docker to build your own image bed based on Chevereto; If you need to use chevereto to watermark images, you can refer to the article:How to add watermarks to images using chevereto.

Note: The image hosting service needs to be used in conjunction with the reverse proxy and CDN discussed later.

Be proficient in reverse proxy configuration

When using a cloud host to build a blog, one skill that must be mastered is to configure a reverse proxy.


What is a reverse proxy? A reverse proxy is like a "receptionist" at your door. When someone (user) wants to access a room (application) in your home, they will not go directly into the room, but will first tell the receptionist what they want to do at the door. The receptionist will decide whether to let them in and guide them to the correct room. This not only protects your room (application), but also manages and allocates these visitors, making the whole process more orderly and secure.


The reverse proxy function can be implemented by a variety of software, including NPM (nginx Proxy Manager). For specific configuration methods, please refer to the article:Docker series uses Docker to build its own reverse proxy based on NPM; If you already use the Pagoda Panel (for a brief introduction to the Pagoda Panel, please refer to the article:Linux Panel Series Pagoda Panel Introduction), then the specific configuration method can refer to the article:Linux panel series configure reverse proxy and use non-443 port for publishingOf course, there are many other options for implementing reverse proxy, but the principles are the same, so I won’t introduce them one by one.

Use CDN (Content Delivery Network) to speed up blog access

After the blog is built, it is time to publish it to the public.It is strongly recommended not to use the public IP of the cloud host to publish a blog directly, for the following reasons:

1. This will directly expose the IP address of the cloud host, bringing major security risks: the cloud host needs to face various types of attacks, which places very high security requirements on the cloud host system.

2. In addition to consuming cloud host system resources, DDoS attacks can also directly consume the traffic of cloud host traffic packages, causing the cloud provider to disconnect the cloud host from the Internet.

3. Due to geographical restrictions, access from areas far away from the cloud host will be slower.

4. The upstream bandwidth of the cloud host is usually small (3M-6M), which will become a bottleneck when the traffic is slightly larger.

Therefore, at this time, it is necessary to cooperate with CDN (Content Distribution Network).


So what is CDN? CDN is a technology that accelerates websites and applications. It distributes the content of a website (such as pictures, videos, web pages, etc.) to multiple servers across the country. In this way, when users access the website, they will get the content from the server closest to them, which will load faster and reduce lag. At the same time, it can also reduce server pressure and improve security.


The benefits of using CDN are as follows:

1. Improve performance and user experience
Reduce latency:CDN can significantly reduce the delay of data transmission by caching content to the server node closest to the user. This can speed up the loading of web pages and improve user experience.
Speed up static content loading:CDN caches common static resources (such as images, CSS, JavaScript, etc.), allowing these resources to be loaded faster and further optimize page performance.

2. Reduce server load
Distribute request pressure:CDN distributes user requests to multiple nodes, reducing the load on the source server, especially during peak traffic periods, to prevent server overload.
Caching strategy: CDN can cache frequently accessed content, reducing the processing pressure and bandwidth consumption of the source server.

3. Enhanced security
DDoS Protection:The way CDN works can provide partial DDoS protection functions, protecting the source server from large-scale attacks by dispersing attack traffic and filtering malicious requests.
Hide source IP address:CDN acts as a cache layer at the front end, which can hide the IP address of the source server and reduce the risk of direct attacks on the server.

4. Reduce bandwidth costs
Optimize traffic distribution: Since CDN can cache a large amount of static content and reduce direct traffic transmission to the source server, it helps to reduce server bandwidth consumption and thus reduce bandwidth costs.
Compression and optimization: Many CDN services will automatically compress and optimize the transmitted content to further reduce the amount of transmitted data.

5. Geographic expansion
Covering users nationwide:CDN allows developers to easily expand the coverage of their applications. Users in different geographical locations can obtain content from nodes closer to them, thus enjoying faster loading speeds.

It can be said that the biggest advantage of building a website in China is that you can use domestic CDN. Compared with sites using foreign CDN, the user access experience is completely different.

Note 1: The choice of domestic CDN suppliers is relatively arbitrary. As long as you have a registered domain name, you can choose any one. However, in theory, try to choose the CDN service of the cloud host supplier. For example, if you use Alibaba Cloud's cloud host, choose Alibaba Cloud's CDN; if you use Tencent Cloud's cloud host, choose Tencent Cloud's CDN. The advantage of this is that the CDN of the same supplier is considered internal system access when accessing its own cloud host and is not limited by the cloud host's upstream bandwidth.

Note 2: Domestic CDNs do not provide free basic services like Cloudflare's CDN, so this raises a problem that needs attention: there is no solution to consuming CDN traffic due to DDoS attacks. The only way to deal with it passively is to set the usage threshold of the CDN itself. However, this response will interrupt the normal service of the site.

Note 3: Originally this section should include a CDN configuration tutorial, but since there are too many domestic CDN vendors, and each has certain differences in configuration and function (for example, Tencent Cloud CDN does not support IPv6 back-to-source, but Alibaba Cloud CDN does), it doesn’t seem to make much sense to include one. In addition, I don’t recommend using a registered domain name to build a personal blog (unless you clearly know what you need), so I’ll be lazy here and you can search for tutorials online if you need them.

Other advanced configurations

For personal bloggers who build websites in China, saving money is their main goal, so most of them probably just buy CDN traffic, and they don’t even dare to think about WAF or DDoS protection:

image.png

image.png

Seeing the price, I lost interest in taking a serious look at it. There is no option for individual users at all, let alone using it for free. The direct result of this is that personal blogs built using the domestic website building method are basically in a naked state.

注1:百度搜索引擎现在对个人博客收录很谨慎,所以”国内建站并想靠百度搜索引擎来引流”的想法基本上很难实现。

Note 2: Tencent Cloud has launched the EO (Edge One) edge security acceleration platform, which provides an integrated solution including WAF, DDoS and other functions. The personal version is 29.9 yuan per month. Friends who want to build websites in China but don’t want to run naked can consider it. I haven’t used it, so I don’t know how effective it is. I just say it casually:

image.png

Note 3: Due to well-known reasons, the domestic Internet is separated from the international Internet to a certain extent, especially in terms of data routing and cross-border traffic. Therefore, many international attack sources may not be able to effectively reach domestic targets, resulting in a relatively low frequency of DDoS attacks launched from abroad when building websites in China (some walls occasionally have positive effects). However, it is precisely because of this that if a DDoS attack is encountered, the possibility of it coming from a domestic source is much greater (there are still attacks from foreign sources, but the number and proportion are not as many as when building websites abroad). In terms of DDoS protection, Alibaba Cloud and Tencent Cloud are good at dealing with such attacks launched by a large number of domestic sources and a small number of foreign sources (the so-called strong dragon cannot defeat the local snake). After all, in terms of status in the arena, Alibaba and Tencent are still comparable to Du Yuesheng back then.

Route 2: Building a website abroad

I believe that for most personal bloggers, domain name registration is a very troublesome thing. Even many friends who originally had the potential to become great personal bloggers were forced to give up at this first step. Even if the domain name registration is completed, there are still many pitfalls waiting (also refer to the previous guide to avoid pitfalls). Therefore, I suggest that new friends directly choose the route of building a website abroad that does not require domain name registration. In this way, cloud hosting is not a must. The only thing you must spend money on is purchasing a domain name.

注1:如果选择了国外建站,有个大名鼎鼎的名字基本就绕不过去了:cloudflare,俗称”大善人”,提供免费CDN、免费DDoS防护、免费web应用防火墙、免费对象存储等等建站的一条龙服务,虽然这些免费的功能都有种种限制,但是对于一般的个人站长正常情况下完全够用,可以说学会cloudflare基本的使用是个人站长的必修课,那么如何快速了解cloudflare对个人站长的价值呢?请参考文章:Home Data Center Series CloudFlare Tutorial (I) CF related introduction and its benefits to personal webmasters).

注2:即便走的国内建站路线,还是可以通过cloudflare的”自定义主机名”功能白嫖大善人的一揽子免费服务的(前提是本来就有一个完全托管在cloudflare上的域名,可以将”自定义主机名”功能理解成买一送一的赠品),唯一的问题在于对国内访问者来说,大善人的CDN可能是负优化,无法和国内CDN的体验相比(为了解决这个问题,随之而来了多种民间手段:优选IP、优选域名之类,不过说实话,效果都有限,我也并不推荐这些折腾且效果不大的方法),且”自定义主机名”方式接入的域名地位上类似于以前的通房丫头(名不正言不顺的,不是正规的三妻四妾),所以无法完全享受正式托管在cloudflare上的域名能享受的全部功能(比如worker加速大法或者一些深度集成的功能)。

Blog Choice: Static vs Dynamic

Using free hosting services to build a static blog

When you choose to build a website abroad, you will find a new world - a world where you can get it for free: in addition to the cloudflare mentioned in the previous section, the most important thing is that there is one more option for building a blog: a static blog at zero cost. GitHub pages, Vercel, Netlify, cloudflare pages, etc. all support free hosting of static sites. Although there are certainly limitations, it is completely sufficient for general personal blogs. Therefore, if you really don't want to spend money but want to have your own blog, static blog hosting solutions are very suitable.

Note: If you want to use hexo to build a static blog on choudflare pages, you can refer to the article:Home data center series uses hexo to build a static blog and deploy it to cloudflare pages.

Building a dynamic blog

If you choose to build a dynamic blog, you still need a carrier:

1. Cloud Host

If you want to use a cloud host as a carrier, give priority to foreign cloud hosts, which are convenient for deploying docker or installing software using apt on Linux; you can also reuse existing domestic cloud hosts, but the best way to return to the source is to use cloudflare's tunnel, which means that the domain name needs to be hosted on cloudflare (For detailed configuration on the cloud host and tunnel, refer to the article:The home data center series uses tunnel technology to allow home broadband without public IP to use cloudflare for free to quickly build a website (recommended)).


What is a tunnel? In a nutshell: If a domain name is hosted on Cloudflare, a fully encrypted tunnel can be built through the tunnel technology to connect the Cloudflare edge network and the home broadband intranet, so that the domain name can be used to directly access applications deployed on the home broadband intranet (in fact, it is Cloudflare's own intranet penetration).


Note: In fact, using a domestic cloud host to build a dynamic blog and publish it through a foreign CDN vendor (such as cloudflaref), in addition to using the cloudflare tunnel method mentioned above to return to the source, it is technically no problem to directly use the public network address method to return to the source. However, according to the current regulatory intensity, it is too risky to use a domestic cloud host as the source station for an unregistered domain name website, so it is not recommended (foreign cloud hosts do not have this taboo). The configuration process is simple, you can refer to the article:Home data center series uses domestic cloud hosting to get free cloudflare to achieve fast access to domestic sites from abroad; If you use a port other than 80 or 443 to publish an application, you need to configure CloudFlare's Origin Rules. For detailed configuration, please refer to the article:Home data center series uses cloudflare's Origin Rules to solve the problem of having a public IP but no legal ports 80 and 443 when building a website.

2. Home Data Center

在国外建站,我的”家庭数据中心”方案终于可以崛起了,最关键的支撑技术就是前面提到的tunnel,其不需要公网IP,又是基于tcp协议的全加密隧道,又安全又实惠,实在是使用家庭数据中心方式建站的利器。

Note 1: In most cases, the tunnel can run stably, but occasionally there may be a network environment where the tunnel runs unstable (for example, the operator implements a special policy for Cloudflare's IP segment in a certain area).

Note 2: For analysis of various scenarios supported by tunnel, please refer to the article:Cloudflare tutorial series for home data centers (Part 9) Introduction to common Zero Trust functions and multi-scenario usage tutorials.

注3:关于家庭数据中心可以折腾哪些东东,可以参考我以前的文章”Home Data Center Series Introduction to key applications involved in building a home data center".

Selection of image hosting

In addition to using chevereto to build your own image hosting service as you would in China, there are more options for overseas image hosting services. I recommend using cloudflare's R2 (object storage) as your image hosting service. Its free quota is more than enough for most personal webmasters, and it can also be seamlessly integrated with cloudflare's CDN, making it very worry-free.

注:使用cloudflare R2搭建图床的详细步骤参考文章”Home Data Center Series CloudFlare Tutorial (VIII) Introduction to CF R2 Functions and Detailed Tutorial on Building an Image Hosting Platform Based on R2".

Reverse proxy (optional)

Since I recommend using the cloudflare tunnel method for back-to-origin, that is, cloudflare can directly use the domain name to be published to associate the IP and port of the intranet application, so the reverse proxy is not a necessary component:

image.png

However, if you want a more secure application environment (although CloudFlare provides many free security features, they are only the most basic security), you can still add reverse proxies for various purposes, such as: WAF (web application firewall) in the form of reverse proxy:

image.png

cloudflare cdn

I mentioned earlier that Cloudflare provides free CDN services. However, under the default configuration, CDN caches very little content. The most important thing is that it does not cache HTML pages, so you need to make corresponding settings according to the type of your blog (static blog caching is very simple, but dynamic blogs need to configure policies to exclude content that cannot be cached). This is configured in the cache rules in Cloudflare. For detailed cache rule settings, please refer to the article:Home Data Center Series CloudFlare Tutorial (VI) CF Cache Rules Function Introduction and Detailed Configuration Tutorial.

Other advanced configurations

When building a website abroad, various scans, attacks, and crawlers are inevitable every day:

image.png

Therefore, compared with building a website in China, the importance of WAF function and DDoS attack protection is greatly increased. At this time, the WAF and DDoS attack protection functions provided free of charge by Cloudflare are particularly valuable.


Unlimited traffic and free basic CDN, free basic WAF and DDoS protection, free static site hosting, a certain amount of free D1 SQL database, a certain amount of free worker requests per day, powerful redirection and other functions. If compared with the functions and traffic provided by Edge One Personal Edition at 29.9/month, I would believe that if Tencent dared to sell these free features of Cloudflare for 1,000 a month.


However, Cloudflare's Free plan only allows you to use it for free, but whether you have the ability to use it for free is another matter. Well, it reminds me of a movie scene:

image.png

image.png

想要把这些免费功能都用好可不是一件容易的事,需要个人博主付出大量的精力去学习相关知识(比如WAF、DDoS防护、worker加速大法等等),最好是能跟着专业的”cloudflare学习地图”,系统的学习cloudflare的整体解决方案,理论+实战,才是最高效、印象最深刻的学习方式。

然后,关于”cloudflare学习地图”你是否又会如下图一般的问题:

image.png

It’s just a coincidence, my last article just happened to becloudflare learning mapFriends who want to study cloudflare in depth can just follow the map. I won’t go into details in this article.

Section 4: Adding Bricks to the Journey

文章前面的内容,其实都只是围绕”基建”这个中心,目的是让博客有最基本的可访问性以及安全性,搁在项目里就是:机房建设、布线、设备上架及调试等等,只不过,当博客搭建起来之后(验收通过),中心自然就会从”基建”转移到”运维”了。

所以这部分内容就简单介绍下我认为和博客”运维”相关的几个主要知识点。

Writing blog posts efficiently

Many bloggers use the markdown format when writing blog posts, so they can't avoid using a markdown editor (for example, I am used to using obsidian). When I use obsidian to write articles, the first problem I have to solve is how to efficiently insert pictures from the image hosting service into the article (I can't just manually upload the pictures to the image hosting service, then get the picture link and paste it back into the article, right? If there are too many pictures, it will be exhausting), so there is a solution of using obsidian+Picgo+the corresponding image hosting service: If you use chevereto as the image hosting service, you can refer to the article:Chevereto+PicGo+Obsidian is a series of tricks to achieve efficient image upload and image URL acquisition; If you use cloudflare R2 directly as an image hosting service, you can refer to the article:Home Data Center Series CloudFlare Tutorial (VIII) Introduction to CF R2 Functions and Detailed Tutorial on Building an Image Hosting Platform Based on R2.

Share files in blog posts

Sometimes, because the official links of some projects are not accessible in China, it is necessary to provide direct downloads of files in blog posts:

image.png

Of course, you can use the sharing link of domestic cloud disk for download link, but this sharing link needs to be guaranteed to be available to visitors. We all know the nature of domestic cloud disks: either you cannot download without paying members (Baidu Cloud Disk), or some file types cannot be shared (Ali Cloud Disk cannot share zip format files), so the visitor experience cannot be guaranteed by using these cloud disk sharing links.

In view of this, it is a good choice to provide sharing links for self-built applications. There are two common ways:

1. Self-built cloud disk

You can use open source cloud disk solutions, such as nextcloud, which provides complete cloud disk functions and can be integrated with many well-known software through plug-in extensions:

image.png

For detailed construction process, please refer to the article:Docker series Use Docker to build your own personal network disk based on NextCloud.

2. Lightweight file sharing

Although nextcloud is very powerful, if we don't need so many functions and just want to simply provide file downloads, then lightweight file sharing is very suitable, such as pingvin-share, and pingvin-share has its own characteristics: a group of files can be shared through a fixed link, and the shared files can be deleted or added by themselves without changing the sharing link, which is especially useful when some files need to be modified after sharing:

image.png

For detailed construction process, please refer to the article:Docker series uses Docker to deploy a lightweight file sharing platform based on pingvin-share.

Site health monitoring and instant failure notification

As a professional blogger, when a site goes offline for various reasons, you should know and handle it in the shortest possible time. This requires a combination of site health monitoring and instant fault notification. Site health monitoring can use uptime-kuma:

image.png

For instant fault notification, you can use bark-server (requires iPhone, MacOS, iPad). For detailed configuration steps, please refer to the article:Docker series builds a real-time health monitoring and alarm system for applications based on uptime and barkandDocker series builds a message push server based on bark server.

Count blog visits

It is also a very important part of daily operation and maintenance to keep abreast of blog access data. It is recommended to use umami, which can count site access data from multiple dimensions:

image.png

image.png

image.png

image.png

For detailed steps of building umami, please refer to the article:Home Data Center Series The latest version of umami (2.11.3) detailed construction tutorial.

以上内容只是我觉得最主要的几个和平时”运维”最相关的,其实还有更复杂,更好玩的玩法,比如”家庭数据中心”停电、断网时,云主机作为灾备站点自动接管博客服务(参见文章:Home data center series uses cloudflare tunnel to realize automatic takeover of disaster recovery site when WordPress main site fails); or automatic synchronization of multiple wordpress node databases (see article:Home Data Center Series WordPress Multi-node "semi-automatic" and "nearly" real-time synchronization solution) and so on, but these advanced gameplays require a lot of underlying supporting technologies, such as syncthing multi-point synchronization (see article:Docker series: A detailed tutorial on how to synchronize multiple folders using Docker based on syncthing) and tailscale (see article:Application of virtual networking technology in home data center series), there are also some practical operations on databases and shell scripts. If you are interested, you can study them.

Note: There are many articles on the blog about solving certain demand points, such as making WordPress support multi-language translation, solving various errors in WordPress, etc. There are many similar articles. If you are interested, you can take a look. I will not list them one by one here, mainly because there are too many and I can’t finish them in a few words.

Section 5: The journey is long and arduous, and we will continue to search for it.

After the previous steps, your personal blog is built, and you have your own little home on the Internet. However, building a blog is just the beginning. The most difficult thing is whether you can keep writing for a long time. You may stop updating for many reasons: you don’t know what to write, no one reads it, you are too busy at work to write, search engines don’t include it, maintenance is troublesome, etc. Many bloggers stop updating for the above reasons.

However, there are always some bloggers who can persevere and find the joy of owning their own blogs. Especially in the domestic Internet environment where people cannot speak freely, it is very rare to have their own space on the Internet.

And I sincerely hope that there will be more people who share the same journey with me in this long journey.

Afterword

这篇文章对我而言,也算是对去年8月底到现在这整整1年时间里,折腾个人博客及相关技术领域的一个泛总结,从中可以看出,这一年来我主要都是围绕”搭建个人博客”这个中心在搞基建,直白的说其实就是在补课,补相关领域各种欠缺的基础知识和动手能力的课,谁叫我之前眼高手低只会动嘴忽悠用户呢(作为一个合格的销售工程师,画大饼忽悠客户是必备的能力,可不止我一个~)。

However, now that I have basically passed the novice period, my focus will slowly shift to various new application technologies. I feel a little excited when I think about it.

The content of the blog is original. Please indicate the source when reprinting! For more blog articles, you can go toSitemapUnderstand. The RSS address of the blog is:https://blog.tangwudi.com/feed, welcome to subscribe; if necessary, you can joinTelegram GroupDiscuss the problem together.

Comments

  1. Android Chrome 126.0.0.0
    3 days ago
    2025-2-09 14:45:38

    在国外建站,各种扫描、攻击、爬虫每
    天都少不了

    這是為什麼啊?難道是因為提交網站給谷歌或者必應,但是有人專門針對這兩個搜索引擎攻擊嗎?那國內的話怎麼又風險稍微低一點呢?

    • Owner
      葉珊
      Macintosh Chrome 132.0.0.0
      3 days ago
      2025-2-09 19:58:44

      因为国内网络和国外网络之间是有”wall”存在的,而”wall”是双向的:国内出去难,国外进来也难,所以,在国内建站被扫描攻击的几率是比国外建站要低不少的,当然,别人来访问你也难~,所以谷歌的爬虫对IP是国内的站点收录上都比较缺乏热情。另外扫描主要是针对IPv4公网地址,因为IPv4公网地址少,扫描也不费什么劲。

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠(ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ°Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
Emoticons
Emoji
Little Dinosaur
flower!
Previous
Next
       
error:
en_US