Server Skill
Production Linux server setup, configuration, and tuning — from fresh Droplet to fully hardened, optimised web server.
RULE: Show every command before running. For destructive ops (UFW enable, service restart), always confirm.
🚧 Status: Stub — implementation pending
This reference skill has the structure but the snippet content is still being filled in
(you'll see <!-- TODO --> placeholders below). It activates and tells Claude the topic
exists, but won't yield deep snippets yet.
Want to help? Pick any TODO, write the snippet, open a PR. See CONTRIBUTING.md.
Each contribution moves the skill closer to "Ready" status.
Capabilities
Nginx Configuration
PHP-FPM Tuning
SSL / Let's Encrypt (Certbot)
UFW Firewall Rules
Redis Setup & Tuning
MySQL / PostgreSQL Tuning
PM2 Process Management
DigitalOcean Droplet Setup
Quick Configs
Nginx performance baseline
worker_processes auto;
worker_rlimit_nofile 65535;
events { worker_connections 4096; multi_accept on; }
http {
sendfile on; tcp_nopush on; tcp_nodelay on;
keepalive_timeout 65; keepalive_requests 100;
gzip on; gzip_types text/plain text/css application/json application/javascript;
gzip_comp_level 5; gzip_min_length 256;
server_tokens off;
}
PHP-FPM pool calculation
RAM for PHP = Total RAM - OS (200MB) - MySQL (25%) - Redis (10%)
max_children = RAM for PHP / avg PHP process size (typically 30-50MB)
start_servers = max_children / 4
min_spare_servers = max_children / 4
max_spare_servers = max_children / 2
UFW baseline
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp comment 'SSH'
ufw allow 80/tcp comment 'HTTP'
ufw allow 443/tcp comment 'HTTPS'
ufw limit 22/tcp comment 'SSH rate limit'
ufw --force enable
1---2name: server3description: Linux server setup & tuning — Nginx, PHP-FPM, SSL/Certbot, UFW, Redis, MySQL/PostgreSQL, PM2, DigitalOcean Droplet4---56# Server Skill78Production Linux server setup, configuration, and tuning — from fresh Droplet to fully hardened, optimised web server.910**RULE: Show every command before running. For destructive ops (UFW enable, service restart), always confirm.**1112> **🚧 Status: Stub — implementation pending**13>14> This reference skill has the structure but the snippet content is still being filled in15> (you'll see `<!-- TODO -->` placeholders below). It activates and tells Claude the topic16> exists, but won't yield deep snippets yet.17>18> **Want to help?** Pick any TODO, write the snippet, open a PR. See [CONTRIBUTING.md](../../CONTRIBUTING.md).19> Each contribution moves the skill closer to "Ready" status.2021---2223## Capabilities2425### Nginx Configuration26<!-- TODO: Server blocks, upstream proxies, gzip, HTTP/2, rate limiting -->27<!-- TODO: nginx.conf tuning (worker_processes, worker_connections, keepalive) -->28<!-- TODO: Nginx as reverse proxy for Node/Python/PHP -->29<!-- TODO: Static file caching headers, try_files patterns -->3031### PHP-FPM Tuning32<!-- TODO: Pool config (pm = dynamic vs ondemand vs static) -->33<!-- TODO: max_children calculation based on RAM -->34<!-- TODO: PHP-FPM status page, slow log -->35<!-- TODO: opcache settings for production -->3637### SSL / Let's Encrypt (Certbot)38<!-- TODO: Certbot install, --nginx plugin, wildcard certs via DNS challenge -->39<!-- TODO: Auto-renewal, pre/post hooks -->40<!-- TODO: SSL hardening (TLS 1.2+, ciphers, HSTS, OCSP stapling) -->4142### UFW Firewall Rules43<!-- TODO: Basic ruleset (SSH, HTTP, HTTPS, custom ports) -->44<!-- TODO: Limiting SSH brute force with UFW rate limit -->45<!-- TODO: Allow by IP range, delete rules -->4647### Redis Setup & Tuning48<!-- TODO: Redis install, bind config, requirepass, maxmemory + eviction policy -->49<!-- TODO: Redis as PHP session handler, WP object cache -->50<!-- TODO: Redis persistence (RDB vs AOF), replication basics -->5152### MySQL / PostgreSQL Tuning53<!-- TODO: MySQL: innodb_buffer_pool_size, query cache (off in 8.0), slow query log -->54<!-- TODO: PostgreSQL: shared_buffers, work_mem, pg_stat_statements -->55<!-- TODO: Backup strategies: mysqldump, pg_dump, automated cron -->5657### PM2 Process Management58<!-- TODO: ecosystem.config.js, cluster mode, log rotation -->59<!-- TODO: PM2 startup systemd, monit integration -->60<!-- TODO: Zero-downtime reload, graceful shutdown -->6162### DigitalOcean Droplet Setup63<!-- TODO: Initial hardening (disable root, SSH key only, fail2ban) -->64<!-- TODO: Swap setup for low-RAM droplets -->65<!-- TODO: DO monitoring agent, droplet metrics -->6667---6869## Quick Configs7071### Nginx performance baseline72```nginx73worker_processes auto;74worker_rlimit_nofile 65535;75events { worker_connections 4096; multi_accept on; }76http {77 sendfile on; tcp_nopush on; tcp_nodelay on;78 keepalive_timeout 65; keepalive_requests 100;79 gzip on; gzip_types text/plain text/css application/json application/javascript;80 gzip_comp_level 5; gzip_min_length 256;81 server_tokens off;82}83```8485### PHP-FPM pool calculation86```87RAM for PHP = Total RAM - OS (200MB) - MySQL (25%) - Redis (10%)88max_children = RAM for PHP / avg PHP process size (typically 30-50MB)89start_servers = max_children / 490min_spare_servers = max_children / 491max_spare_servers = max_children / 292```9394### UFW baseline95```bash96ufw default deny incoming97ufw default allow outgoing98ufw allow 22/tcp comment 'SSH'99ufw allow 80/tcp comment 'HTTP'100ufw allow 443/tcp comment 'HTTPS'101ufw limit 22/tcp comment 'SSH rate limit'102ufw --force enable103```104105<!-- TODO: Add full interactive workflows for each capability above -->