Skip to content
Back to home

Configuration Guide for Low-Spec Cloud Servers

Table of Contents

Open Table of Contents

Server Configuration Overview

Recently, I purchased an affordable Alibaba Cloud ECS server with the following specs:

The specs are quite low-end. This article documents various issues encountered during use and their solutions.

Configuration Optimization

pnpm Configuration Optimization

Due to memory and CPU limitations, pnpm tends to hang during dependency installation. We need to limit concurrency and retry parameters:

# Limit concurrency to avoid memory exhaustion
pnpm config set concurrency 2

# Disable pnpm's automatic lock file updates to reduce disk IO load during installation
pnpm config set auto-install-peers=false

# Set retry count to improve success rate on unstable networks
pnpm config set fetch-retries 3

# Set retry factor to increase retry interval
pnpm config set fetch-retry-factor 2

# Set network timeout
pnpm config set network-timeout 60000

SSH Key Management

Use the keychain tool to centrally manage SSH and GPG key agents, enabling one-time unlock and multi-session sharing.

# Install keychain
# Debian/Ubuntu
sudo apt install keychain
# CentOS/RHEL
sudo dnf install keychain

Configure automatic loading by editing your shell initialization file (such as .bash_profile or .profile), and add the following content (adjust according to your actual key paths):

# Start keychain to manage SSH and GPG keys
if command -v keychain > /dev/null; then
    eval $(keychain --quiet --eval ~/.ssh/id_rsa)
fi

# If using GPG for signing or encryption, you can also manage it together:
eval $(keychain --quiet --eval ~/.ssh/id_rsa GPG_KEY_EMAIL@DOMAIN.COM)

Using the --quiet parameter avoids output prompts on each login (e.g., * Found existing ssh-agent: 1996), suitable for silent operation in production environments. Replace GPG_KEY_EMAIL@DOMAIN.COM with your GPG key’s associated email.

On first login, you’ll be prompted for the private key password. Subsequent new terminals or SSH sessions will automatically reuse the unlocked agent. Multiple shells share the same set of keys without needing to decrypt repeatedly.


This work is licensed under “CC BY-NC-SA 4.0”. For commercial use, please contact the site owner for authorization. For non-commercial sharing, please keep attribution and the original link. If you remix, transform, or build upon this material, you must distribute your contributions under the same license.

Share this post on:

Next Post
Unix-like System Setup Notes (macOS & Linux)