Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: Server


Web Application Development Checklist

This document comprehensively outlines the best practices framework for building highly available, secure, and efficient web services. At the security level, it emphasizes enabling modern encryption protocols such as TLS 1.3, HSTS, and OCSP Stapling, and strictly configuring CSP, Rate Limiting, and firewall rules to defend against XSS, DDoS, and brute-force attacks. In terms of network and system configuration, it recommends optimizing TCP congestion control algorithms, minimizing port exposure, disabling root password login, and reducing risks through SELinux and file permission controls. From an operations perspective, it is necessary to establish robust monitoring and alerting, snapshot backup, and automated scaling mechanisms to ensure rapid recovery of business continuity during failures or traffic spikes. In the DevOps workflow, static code analysis, unit testing, and containerized deployment should be integrated via CI/CD pipelines, leveraging Docker and Kubernetes for flexible scaling. The core of application development lies in eliminating underlying defects such as memory leaks, deadlocks, and SQL injection to ensure code quality. Additionally, attention must be paid to user experience, including responsive layout, multi-language and timezone support, and PWA compatibility, while strictly adhering to global and local compliance requirements such as GDPR and the Personal Information Protection Law, thereby achieving dual assurance of technical architecture and business value.

Views 553
Cloud Container Development Linux Server Service Web

Setup a Ubuntu apt mirror server

Ubuntu Mirror Why do this? I have many Ubuntu servers in my own data center at home. They need to update software packages every week. However, if every server connects to the Ubuntu official source, it will waste a lot of bandwidth. Therefore, I decided to set up an Ubuntu mirro...

Views 1,615
Cache Linux Mirror Server Ubuntu Web apt

Build your home data center using Docker Swarm Mode!

This article provides a detailed overview of the complete process and core concepts for building a Docker Swarm cluster. First, by configuring hostnames, installing Docker, and initializing the Swarm cluster, it addresses Overlay Network compatibility issues in vSphere environments, successfully establishing a highly available architecture with either one manager and two workers or all managers. Next, it deploys the open-source graphical interface Swarmpit for intuitive cluster state management and provides an in-depth analysis of the hierarchical relationships and interaction logic among Stack, Service, Task, Node, Volume, and Network. The article offers command-line management tips for these core resources, including deployment, monitoring, log viewing, and node maintenance operations. Finally, it demonstrates how to quickly deploy real-world business applications using YAML files, introduces solutions for implementing automated HTTPS with Caddy and building shared storage with GlusterFS, and provides a Systemd service script to ensure nodes automatically come online after a reboot, offering comprehensive and practical guidance for container orchestration in production environments.

Views 715
Cluster Container Docker Docker Swarm Linux Server Swarmpit bash

Put your data center to work with GPU compute power!

This article details the configuration and deployment process for vGPU in a VMware Horizon environment. First, disable cluster DRS/DPM to prevent migration deadlocks. Then, add Q/C series vGPU devices that support CUDA to the virtual machine in VCenter. When installing GRID drivers on the Linux client, you must use deb/rpm packages instead of the runfile. Configure `gridd.conf` and the license Token, and verify the authorization status using `nvidia-smi`. When installing CUDA, strictly avoid using the system package manager. You must install it via the runfile and uncheck `cuda-driver` to prevent overwriting the GRID drivers. Finally, manually configure the PATH environment variable. To ensure cross-host migration capability, plan the GPU memory splitting scheme in advance (such as 1/8 or 1/3 splits), enable the `vGPU.hotmigrate.enabled` option, and ensure that BIOS settings on all hosts (such as ECC, IO MMU, and SR-IOV) remain consistent. After configuration is complete, you can install cuDNN for AI model training or utilize `h264_nvenc` for video hardware-accelerated encoding. Additionally, the article introduces methods for monitoring temperature via `nvidia-smi` to optimize fan noise, and provides a troubleshooting guide for driver version conflicts, license expiration, and BIOS configuration errors, aiming to help users build a stable and efficient GPU computing environment.

Views 960
Ai CUDA NVIDIA Python Server Tesla Ubuntu VMware Vsphere vGPU

Self-host an AI image generation system (based on Stable Diffusion) for your friends

This article introduces advanced usage tips for Stable Diffusion and secure deployment strategies. First, leveraging the PNG Info feature allows you to quickly view and reuse the specific parameters used during image generation; it is recommended to experiment with different combinations of Checkpoints and LoRAs to master stylistic patterns. Second, to address the security risks of exposing local services to the public internet, the article proposes a simplified yet secure UI configuration strategy: disabling VENV to reduce deployment complexity, installing xformers to optimize performance, and modifying startup parameters to hide sensitive directories. Core security measures include using config.json to disable dangerous tabs such as Settings and Train, utilizing ui-config.json to restrict batch generation, fix prompts, and hide the negative prompt input box, thereby preventing resource abuse and the generation of non-compliant content, while simultaneously using user.css to hide irrelevant buttons and simplify the interface. Finally, it is recommended to use FRPC in conjunction with a Caddy reverse proxy to securely expose the service to the public internet, enabling encrypted communication and automatic TLS certificate management, ensuring that friends can conveniently access your AI painting service while protecting privacy and data security.

Views 382
Ai Self hosting Server Stable Diffusion Tune Web

Install your own NFS ESXi storage server ★

This article provides a detailed walkthrough of building a high-performance NFS storage server and integrating it into an ESXi environment. First, a GPT partition is created using `fdisk`, formatted with `mkfs.ext4`, and the partition UUID is obtained. Next, the `/etc/fstab` file is edited to configure persistent mount points, ensuring automatic mounting after system reboots. Subsequently, `nfs-kernel-server` is installed, `/etc/exports` is configured to expose shared paths with access restricted to specific subnets, and the firewall is opened on port 2049. For network configuration, a fiber-optic direct connection approach is adopted to isolate storage traffic and enhance performance. Multiple fiber-optic ports are bridged into an independent subnet using `bridge-utils`, `isc-dhcp-server` is deployed to provide dynamic IP allocation for this storage network, and 9000-byte jumbo frames are enabled to optimize transmission efficiency. Additionally, Cockpit and its navigator plugin are installed to provide a web-based server status monitoring interface. Finally, on the ESXi side, a dedicated storage virtual switch and VMkernel adapter are created, and an NFS storage mapping is added in vCenter. The article recommends using CrystalDiskBench for performance benchmarking to verify a transfer speed of approximately 1200 MB/s under a 10 Gbps network, ensuring the storage system meets the expected high-performance standards.

Views 746
Debian Dell ESXI IPMI Linux NFS Server Storage VMware Vsphere