Home Data Center Series: A Complete Guide to Building a Personal Blog from Scratch (Minimum Cost)
本文最后更新于 151 天前,其中的信息可能已经有所发展或是发生改变,如有失效可到评论区留言。

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.

However, as the simplified Chinese Internet environment becomes increasingly closed and domestic search engines are extremely unfriendly to personal blogs, a large number of personal bloggers who have set up websites in China have stopped updating. The technical content previously created by a large number of authors has been monopolized by a few leading APPs, and under the continuous erosion of capital, they have embarked on the path of charging. The spirit of "free sharing" has suffered a serious blow in the simplified Chinese Internet.

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?


Do you still remember the bad consequences of not knowing the destiny in the Investiture of the Gods? When Shen Gongbao's classic quote "Daoyou, please stay" came from behind, if you knew the destiny in advance, you would run without looking back, and you would naturally be able to avoid the disaster and not have to go through the Investiture of the Gods.


In view of this, I came up with the idea of writing a "Complete Guide to Building a Personal Blog from Scratch (Lowest Cost)" (due to the Chinese nation's fondness for dragons, I originally wanted to give it a name like "Building a Blog from Scratch - A Full Set of Services", but finally gave up). On the one hand, I hope to provide novice friends with a complete guide to building a personal blog from scratch, so that they can avoid some bottomless pitfalls (small pits are inevitable, experience is gained through losses); on the other hand, it is also a general summary of the relevant experience I have gained in building the website over the past year.

Of course, this "lowest cost" is not absolute, it depends on each person's specific situation: if you choose a dynamic blog that requires database support, such as WordPress, you need a host, which can be local hardware or a cloud host. Whether it is hardware or cloud hosting, there must be a cost, but with the support of the "home data center" concept that I have always advocated, any existing hardware in your home (NAS, idle hardware, etc., as long as docker can be installed) can be used, so the "lowest cost" depends on the cost of your idle hardware; of course, if you don't have idle hardware at home or don't want to use the hardware at home, you can also use the cloud host to build a dynamic personal blog. In this case, the lowest cost depends on the price of the cloud host; or, if you choose to use a static blog and use a free hosting service, you can achieve zero cost. However, even if the money can be zero cost, the time and energy spent on learning are indispensable.

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

Section 1: Do you really want to embark on the exciting journey of "personal blogging"?

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.

Note: For a discussion on whether you need a personal blog, please refer to my previous article "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.

At this point, do you have questions about "Safety Tips" like the following:

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

I have already discussed some basic common sense about domestic website building (buying domain names, buying cloud hosts, and filing) in the "Guide to Avoiding Pitfalls", so I will not repeat it here. Generally speaking, when building a website in China, it is basically necessary to purchase a domestic cloud host and then use it to obtain domain name filing qualifications (this is originally used to limit the optional methods of website building, so as to achieve the purpose of controlling the scale of domestic websites. However, the purpose of buying a cloud host is to obtain a filing code. If you can get the filing code directly, you don’t have to buy a cloud host). Since you already have a cloud host, I suggest that novice friends directly use the cloud host to use WordPress to build a blog. This way, the learning cost of building a website is the lowest (how low? Just read one article: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 pagesThe "Local Deployment" section of the , you can directly use the local page it provides (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.

Note 4: In theory, in order to register and purchase a cheap cloud host (for example, the minimum requirement for Tencent Cloud to obtain a registration code is a lightweight server), one often has to face the following embarrassment: the performance of the cheap cloud host is a problem, and the cloud host with good performance is too expensive, which is very confusing. Originally, for this problem, my "home data center" solution was supposed to make a shining debut: using high-performance hardware devices at home instead of cloud hosts to deploy various applications (including dynamic blogs) for publishing. However, this solution requires a public IP address. Considering that many friends' home broadband does not meet this requirement, and now the three major operators are also very strict about using home broadband to build websites, I will not formally mention this usage. However, if a friend has this condition and wants to challenge it, there are some precautions. For details, please refer to the article: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.

Note 1: Baidu search engine is now very cautious about including personal blogs, so the idea of "building a website in China and relying on Baidu search engine to attract traffic" is basically difficult to achieve.

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.

Note 1: If you choose to build a website abroad, there is a famous name that you can't avoid: Cloudflare, commonly known as the "good man", provides one-stop services for building websites, such as free CDN, free DDoS protection, free web application firewall, free object storage, etc. Although these free functions have various limitations, they are completely sufficient for general personal webmasters under normal circumstances. It can be said that learning the basic use of Cloudflare is a compulsory course for personal webmasters. So how can you quickly understand the value of Cloudflare to personal webmasters? Please refer to the article:Home Data Center Series CloudFlare Tutorial (I) CF related introduction and its benefits to personal webmasters).

Note 2: Even if you choose to build your website in China, you can still use Cloudflare's "Custom Hostname" function to take advantage of the great man's package of free services (the prerequisite is that you already have a domain name that is fully hosted on Cloudflare, and you can think of the "Custom Hostname" function as a buy-one-get-one-free gift). The only problem is that for domestic visitors, the CDN of the great man may be a negative optimization, and it cannot be compared with the experience of domestic CDN (in order to solve this problem, a variety of folk means have emerged: preferred IP, preferred domain name, etc., but to be honest, the effect is limited, and I do not recommend these troublesome and ineffective methods). In addition, the status of the domain name accessed by the "Custom Hostname" method is similar to that of the former "tongfang maid" (not legitimate, not a formal concubine), so it is impossible to fully enjoy all the functions that the domain name officially hosted on Cloudflare can enjoy (such as worker acceleration or some deeply integrated functions).

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

When building a website abroad, my "home data center" solution can finally come into play. The most critical supporting technology is the tunnel mentioned above. It does not require a public IP address and is a fully encrypted tunnel based on the TCP protocol. It is safe and affordable, and is really a powerful tool for building a website using the home data center method.

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.

Note 3: For more information about what you can do with a home data center, please refer to my previous article "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.

Note: For detailed steps on how to use cloudflare R2 to build an image hosting service, 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".

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

It is not easy to make good use of these free features. It requires personal bloggers to devote a lot of energy to learn relevant knowledge (such as WAF, DDoS protection, worker acceleration method, etc.). It is best to follow the professional "cloudflare learning map" and systematically learn cloudflare's overall solution. Theory + practice is the most efficient and impressive way of learning.

Then, regarding the "cloudflare learning map", do you have questions like the following:

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

The content in the previous part of the article actually only revolves around the center of "infrastructure". The purpose is to make the blog have the most basic accessibility and security. In the project, it means: computer room construction, wiring, equipment installation and debugging, etc. However, after the blog is built (acceptance passed), the center will naturally shift from "infrastructure" to "operation and maintenance".

So this part will briefly introduce several main knowledge points that I think are related to blog "operation and maintenance".

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.

The above are just the most important ones that I think are most relevant to daily "operation and maintenance". In fact, there are more complex and more interesting ways to play. For example, when the "home data center" loses power or the Internet is disconnected, the cloud host automatically takes over the blog service as a disaster recovery site (see article: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

For me, this article is a general summary of my work on personal blogs and related technical fields from the end of August last year to now. It can be seen that in the past year, I have been mainly doing infrastructure construction centered around "building a personal blog". To put it bluntly, I am actually making up for the lack of basic knowledge and hands-on skills in related fields. Who told me that I had high expectations but poor skills and could only fool users with my mouth? (As a qualified sales engineer, it is a necessary ability to make big promises to fool customers, and I am not the only one~).

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.
No Comments

Send Comment Edit Comment


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