Moonglade

Modern Markdown blogging with AI-powered localization and search.

Tag: Ubuntu


Install Nextcloud on an Ubuntu 20.04/22.04 server ★

This article details the complete deployment process for a Nextcloud server, from basic configuration to advanced optimization. First, it is necessary to modify `overwrite.cli.url` in `config.php` and set up Cron mode to automate background tasks. Second, it is recommended to install practical plugins such as two-factor authentication, task management, and notes. To expand storage capacity, create a new partition, format it, and mount a large-capacity hard drive, while ensuring that the data directory migration and permission settings are correctly configured. Additionally, the article covers region settings, preview feature optimization, and mail server configuration. It focuses on installing and configuring the Redis caching system, including APCu local caching and distributed lock settings, to resolve performance warnings and improve system efficiency. To prevent data loss, write an automated backup script to regularly sync the application directory, data files, and database to independent storage. Finally, a Caddy reverse proxy configuration solution is provided for specific needs, along with a guide for setting up a GPU acceleration environment if using the Recognize app, aiming to build a high-performance, secure, and easy-to-maintain private cloud environment.

Views 691
Apache2 Certbot IT Linux MySQL Nextcloud PHP Storage Ubuntu Web


Run Linux Desktop experience in Docker container

This article provides an in-depth analysis of the key software package dependencies required to run a Linux desktop environment within a Docker container. It begins by identifying `gnome-shell` as a core component, noting that its dependencies include specific configurations such as the Ubuntu wallpaper. The article then clearly distinguishes between the roles of `gnome-core` and `ubuntu-desktop`, explaining that Ubuntu installs the latter by default rather than the former, and lists core application dependencies, including the file manager, terminal, and settings center. Additionally, it highlights Ubuntu-specific GNOME Shell extensions, such as `ubuntu-dock` for the taskbar, application indicator support, and desktop icon management tools. Finally, it compares the dependency differences between `ubuntu-desktop-minimal` and the standard `ubuntu-desktop`. The former provides a basic environment for minimal installations, while the latter adds more standard components on top of that foundation. By mapping out these dependency chains, readers can clearly understand how to build a fully functional yet lightweight Linux desktop environment in Docker, enabling convenient testing and experience of the desktop system without the need for a local installation.

Views 978
Docker Gnome Linux Remote Management Ubuntu desktop

Ubuntu 22.04 Network Diagnostic Handbook

This article introduces a complete process for troubleshooting unknown network traffic and bandwidth usage issues in an Ubuntu system. First, use `ip link show` to identify the network interface to be monitored. Then, utilize tools such as `dstat`, `iftop`, and `nload` to monitor overall network traffic and bandwidth usage on specific interfaces in real time. To pinpoint the source of resource consumption, the article recommends using `nethogs` to view traffic by process. It also notes that when a process ID appears as unknown (such as processes inside Docker containers), you should switch to using `tcpdump` to capture and analyze specific network packets. Next, use the `ss` command to check the occupancy status of specific ports, and combine it with the `ps` command to confirm the corresponding process ID and the location of the executable file. Finally, for identified anomalous IP addresses, the article guides you to use `iptables` and `ip6tables` commands to block inbound and outbound traffic. It particularly emphasizes that for IPv6 addresses, since attackers can easily change their addresses, it is recommended to block the entire subnet to enhance defense, thereby helping users effectively diagnose and resolve abnormal network bandwidth issues.

Views 2,102
Linux Netplan Network NetworkManager Networkd Ubuntu


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,597
Cache Linux Mirror Server Ubuntu Web apt

Deploy a standalone Docker application on the server

This article provides a detailed overview of the complete process and best practices for deploying and managing Docker containers in a virtual machine. First, it guides users on configuring GPG keys to support the Pass password manager and setting up Docker credential storage to enable passwordless login for Docker Desktop. Second, it emphasizes the planning of persistent container volumes, highlighting the importance of mounting host directories to ensure data consistency and sharing. It also provides configuration references for commonly used containers and scripts for running them as non-root users. Additionally, the article explains port mapping, using restart policies to ensure containers start automatically with the host, and safely upgrading containers by deleting and recreating them. For scenarios involving multiple container dependencies, it recommends using Docker Compose to define service networks and volumes, combined with systemd for automated management. Finally, the article summarizes the need to manage the VM and containers separately in hybrid deployments and suggests a gradual transition to a containerized architecture to ensure system stability and maintainability.

Views 405
Container Docker Linux Ubuntu VM bash