[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6R24VGZMN4CF8TBGYGVXK06":3,"skill-same:01M6R24VGZMN4CF8TBGYGVXK06":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6R24VGZMN4CF8TBGYGVXK06","PocketBase Deploy",null,"Production deployment for PocketBase. Use when deploying PocketBase to a server, setting up Docker, configuring systemd, reverse proxy (nginx\u002FCaddy), TLS, SMTP, backups, S3 storage, rate limiting, or hardening for production. Provides ready-to-use configs.","Mishit18\u002Fclaude-code-templates","Mishit18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F244127857?v=4","01M6QXBYKWM76HSKYDNWSKKE41","Mishit Sharma","01M6QXBYRJ0CAVM51S1RTEKTZZ",1,"MIT","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-deploy\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,5,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"deploy","pocketbase","up","when","rate","for","reverse","smtp","caddy","s3 storage","docker","ready","use","tls","nginx","server","proxy","deployment","storage","2026-11-10 10:12:30",false,"---\nname: \"PocketBase Deploy\"\ndescription: \"Production deployment for PocketBase. Use when deploying PocketBase to a server, setting up Docker, configuring systemd, reverse proxy (nginx\u002FCaddy), TLS, SMTP, backups, S3 storage, rate limiting, or hardening for production. Provides ready-to-use configs.\"\n---\n\n# PocketBase Production Deployment\n\n## Single Binary Deployment\n\nPocketBase is a single binary. No runtime dependencies.\n\n```bash\n# Download\nwget https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\u002Fdownload\u002Fv0.X.X\u002Fpocketbase_0.X.X_linux_amd64.zip\nunzip pocketbase_*.zip\nchmod +x pocketbase\n\n# Run\n.\u002Fpocketbase serve --http=\"0.0.0.0:8090\"\n```\n\nData stored in `pb_data\u002F` (SQLite DB, uploaded files, logs).\n\n## systemd Service\n\n```ini\n# \u002Fetc\u002Fsystemd\u002Fsystem\u002Fpocketbase.service\n[Unit]\nDescription=PocketBase\nAfter=network.target\n\n[Service]\nType=simple\nUser=pocketbase\nGroup=pocketbase\nLimitNOFILE=4096\nRestart=always\nRestartSec=5s\nWorkingDirectory=\u002Fopt\u002Fpocketbase\nExecStart=\u002Fopt\u002Fpocketbase\u002Fpocketbase serve --http=\"127.0.0.1:8090\"\n\n# Security hardening\nNoNewPrivileges=true\nProtectSystem=strict\nProtectHome=true\nReadWritePaths=\u002Fopt\u002Fpocketbase\u002Fpb_data \u002Fopt\u002Fpocketbase\u002Fpb_hooks \u002Fopt\u002Fpocketbase\u002Fpb_migrations\nPrivateTmp=true\n\n# Memory limit (adjust to your server)\n# MemoryMax=512M\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\n# Setup\nsudo useradd --system --no-create-home pocketbase\nsudo mkdir -p \u002Fopt\u002Fpocketbase\nsudo cp pocketbase \u002Fopt\u002Fpocketbase\u002F\nsudo chown -R pocketbase:pocketbase \u002Fopt\u002Fpocketbase\n\n# Enable & start\nsudo systemctl daemon-reload\nsudo systemctl enable pocketbase\nsudo systemctl start pocketbase\nsudo systemctl status pocketbase\n\n# Logs\nsudo journalctl -u pocketbase -f\n```\n\n### File descriptor limit\n\nFor high-traffic deployments, increase the limit:\n\n```ini\n# In the [Service] section:\nLimitNOFILE=65535\n```\n\nAlso set system-wide in `\u002Fetc\u002Fsecurity\u002Flimits.conf`:\n```\npocketbase soft nofile 65535\npocketbase hard nofile 65535\n```\n\n### Go memory limit\n\nFor constrained environments:\n\n```ini\nEnvironment=GOMEMLIMIT=400MiB\n```\n\n## Docker\n\n### Dockerfile\n\n```dockerfile\nFROM alpine:latest\n\nARG PB_VERSION=0.25.0\n\nRUN apk add --no-cache \\\n    unzip \\\n    ca-certificates\n\n# Download and install PocketBase\n# NOTE: verify the checksum in production — see https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\nADD https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\u002Fdownload\u002Fv${PB_VERSION}\u002Fpocketbase_${PB_VERSION}_linux_amd64.zip \u002Ftmp\u002Fpb.zip\nRUN unzip \u002Ftmp\u002Fpb.zip -d \u002Fpb\u002F && rm \u002Ftmp\u002Fpb.zip\n\n# Copy hooks and migrations\nCOPY .\u002Fpb_hooks \u002Fpb\u002Fpb_hooks\nCOPY .\u002Fpb_migrations \u002Fpb\u002Fpb_migrations\n\nEXPOSE 8090\n\nCMD [\"\u002Fpb\u002Fpocketbase\", \"serve\", \"--http=0.0.0.0:8090\"]\n```\n\n### docker-compose.yml\n\n```yaml\nservices:\n  pocketbase:\n    build: .\n    ports:\n      - \"127.0.0.1:8090:8090\"  # bind to localhost only — expose via reverse proxy\n    volumes:\n      - pb_data:\u002Fpb\u002Fpb_data\n      - .\u002Fpb_hooks:\u002Fpb\u002Fpb_hooks\n      - .\u002Fpb_migrations:\u002Fpb\u002Fpb_migrations\n    restart: unless-stopped\n    healthcheck:\n      test: [\"CMD\", \"wget\", \"--no-verbose\", \"--tries=1\", \"--spider\", \"http:\u002F\u002Flocalhost:8090\u002Fapi\u002Fhealth\"]\n      interval: 30s\n      timeout: 5s\n      retries: 3\n\nvolumes:\n  pb_data:\n```\n\n## Reverse Proxy\n\n### Caddy (recommended — auto TLS)\n\n```\n# \u002Fetc\u002Fcaddy\u002FCaddyfile\nmyapp.com {\n    reverse_proxy localhost:8090\n}\n```\n\nThat's it. Caddy handles TLS certificates automatically via Let's Encrypt.\n\n### nginx\n\n```nginx\n# \u002Fetc\u002Fnginx\u002Fsites-available\u002Fpocketbase\nserver {\n    listen 80;\n    server_name myapp.com;\n    return 301 https:\u002F\u002F$server_name$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name myapp.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fmyapp.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fmyapp.com\u002Fprivkey.pem;\n    ssl_protocols TLSv1.2 TLSv1.3;\n    ssl_ciphers HIGH:!aNULL:!MD5;\n\n    client_max_body_size 50M;\n\n    # Block public access to the admin dashboard\n    location \u002F_\u002F {\n        return 403;\n    }\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:8090;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n\n        # SSE support for realtime\n        proxy_buffering off;\n        proxy_cache off;\n        proxy_read_timeout 3600s;\n    }\n}\n```\n\n**Critical for realtime**: `proxy_buffering off` and `proxy_read_timeout` must be set for SSE subscriptions to work.\n\n```bash\n# Let's Encrypt with nginx\nsudo apt install certbot python3-certbot-nginx\nsudo certbot --nginx -d myapp.com\n```\n\n## SMTP Configuration\n\nConfigure in Dashboard > Settings > Mail settings, or via hooks:\n\n```js\n\u002F\u002F pb_hooks\u002Fsettings.pb.js\nonBootstrap(function(e) {\n    var settings = e.app.settings()\n    settings.smtp.enabled = true\n    settings.smtp.host = $os.getenv(\"SMTP_HOST\")\n    settings.smtp.port = parseInt($os.getenv(\"SMTP_PORT\") || \"587\")\n    settings.smtp.username = $os.getenv(\"SMTP_USER\")\n    settings.smtp.password = $os.getenv(\"SMTP_PASS\")\n    settings.smtp.tls = true  \u002F\u002F STARTTLS\n    \u002F\u002F settings.smtp.authMethod = \"PLAIN\"  \u002F\u002F or \"LOGIN\"\n    settings.meta.senderName = \"My App\"\n    settings.meta.senderAddress = \"noreply@myapp.com\"\n    e.app.save(settings)\n    return e.next()\n})\n```\n\n## Security Hardening\n\n### Superuser MFA\n\nAlways enable MFA for superuser accounts in production:\nDashboard > Superusers > Auth options > MFA > Enable\n\n### Settings encryption key\n\nEncrypt sensitive settings (SMTP passwords, S3 keys) at rest:\n\n```bash\n.\u002Fpocketbase serve --encryptionEnv=PB_ENCRYPTION_KEY\n```\n\nSet `PB_ENCRYPTION_KEY` environment variable to a 32+ character random string. Once set, settings are encrypted in the DB. **Do not lose this key** — you won't be able to decrypt settings without it.\n\n### Rate limiting\n\nBuilt-in rate limiter (enabled by default). Configure in Dashboard > Settings > Rate limits, or:\n\n```js\nsettings.rateLimits.enabled = true\nsettings.rateLimits.rules = [\n    { label: \"*:auth*\", maxRequests: 10, duration: 300 },  \u002F\u002F 10 auth attempts per 5 min\n    { label: \"POST:\u002Fapi\u002Fcollections\u002F*\u002Frecords\", maxRequests: 50, duration: 60 },\n]\n```\n\n### Hide the Dashboard in production\n\n```bash\n.\u002Fpocketbase serve --http=\"127.0.0.1:8090\"  # bind to localhost only\n```\n\nAccess the dashboard only via SSH tunnel:\n```bash\nssh -L 8090:127.0.0.1:8090 user@server\n```\n\n## S3 Storage\n\nFor file uploads, offload to S3-compatible storage:\n\nDashboard > Settings > Files storage > S3\n\n```js\n\u002F\u002F Or via hooks:\nonBootstrap(function(e) {\n    var settings = e.app.settings()\n    settings.s3.enabled = true\n    settings.s3.bucket = $os.getenv(\"S3_BUCKET\")\n    settings.s3.region = $os.getenv(\"S3_REGION\")\n    settings.s3.endpoint = $os.getenv(\"S3_ENDPOINT\")\n    settings.s3.accessKey = $os.getenv(\"S3_ACCESS_KEY\")\n    settings.s3.secret = $os.getenv(\"S3_SECRET\")\n    settings.s3.forcePathStyle = true  \u002F\u002F for MinIO\u002FBackblaze\n    e.app.save(settings)\n    return e.next()\n})\n```\n\nCompatible providers: AWS S3, Backblaze B2, Cloudflare R2, MinIO, DigitalOcean Spaces, Wasabi.\n\n## Backups\n\n### Small databases (\u003C 1GB)\n\nUse the built-in backup feature:\n- Dashboard > Settings > Backups\n- Or via API: `POST \u002Fapi\u002Fbackups`\n- Auto-schedule: configure cron in Dashboard\n\n### Large databases\n\nThe Dashboard backup uses SQLite's online backup API (locks DB briefly). For large DBs, use:\n\n```bash\n# sqlite3 .backup command (hot backup, minimal locking)\nsqlite3 \u002Fopt\u002Fpocketbase\u002Fpb_data\u002Fdata.db \".backup '\u002Ftmp\u002Fbackup.db'\"\n\n# Then rsync to remote\nrsync -avz \u002Ftmp\u002Fbackup.db backup-server:\u002Fbackups\u002Fpocketbase\u002Fdata-$(date +%Y%m%d).db\n```\n\n**Never copy the `.db` file directly** while PocketBase is running — it may be in an inconsistent state.\n\n### Backup script\n\n```bash\n#!\u002Fbin\u002Fbash\n# \u002Fopt\u002Fpocketbase\u002Fbackup.sh\nset -euo pipefail\n\nBACKUP_DIR=\"\u002Fbackups\u002Fpocketbase\"\nDB_PATH=\"\u002Fopt\u002Fpocketbase\u002Fpb_data\u002Fdata.db\"\nDATE=$(date +%Y%m%d_%H%M%S)\n\nmkdir -p \"$BACKUP_DIR\"\n\n# Hot backup\nsqlite3 \"$DB_PATH\" \".backup '${BACKUP_DIR}\u002Fdata_${DATE}.db'\"\n\n# Also backup pb_data files (uploads, if not using S3)\ntar -czf \"${BACKUP_DIR}\u002Fpb_data_${DATE}.tar.gz\" -C \u002Fopt\u002Fpocketbase pb_data --exclude='pb_data\u002Fdata.db*'\n\n# Retain last 30 days\nfind \"$BACKUP_DIR\" -name \"data_*.db\" -mtime +30 -delete\nfind \"$BACKUP_DIR\" -name \"pb_data_*.tar.gz\" -mtime +30 -delete\n```\n\n```bash\n# Crontab: daily at 2 AM\n0 2 * * * \u002Fopt\u002Fpocketbase\u002Fbackup.sh >> \u002Fvar\u002Flog\u002Fpocketbase-backup.log 2>&1\n```\n\n## Health Check\n\n```bash\ncurl http:\u002F\u002Flocalhost:8090\u002Fapi\u002Fhealth\n# {\"code\":200,\"message\":\"API is healthy.\"}\n```\n\n## Deployment Checklist\n\n1. **Binary**: correct architecture (linux_amd64 \u002F linux_arm64)\n2. **systemd**: service enabled, LimitNOFILE set\n3. **Reverse proxy**: Caddy or nginx with TLS, proxy_buffering off for SSE\n4. **SMTP**: configured and tested (send a test verification email)\n5. **Superuser**: strong password + MFA enabled\n6. **Encryption key**: `--encryptionEnv` set for sensitive settings\n7. **Backups**: automated daily, tested restore procedure\n8. **Rate limiting**: enabled with sane defaults\n9. **File storage**: S3 configured if expecting many uploads\n10. **Monitoring**: health check endpoint monitored, journalctl logs reviewed\n11. **Firewall**: only 80\u002F443 exposed, 8090 bound to localhost\n12. **GOMEMLIMIT**: set if on constrained VPS\n\n","# PocketBase Production Deployment\n\n## Single Binary Deployment\n\nPocketBase is a single binary. No runtime dependencies.\n\n```bash\n# Download\nwget https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\u002Fdownload\u002Fv0.X.X\u002Fpocketbase_0.X.X_linux_amd64.zip\nunzip pocketbase_*.zip\nchmod +x pocketbase\n\n# Run\n.\u002Fpocketbase serve --http=\"0.0.0.0:8090\"\n```\n\nData stored in `pb_data\u002F` (SQLite DB, uploaded files, logs).\n\n## systemd Service\n\n```ini\n# \u002Fetc\u002Fsystemd\u002Fsystem\u002Fpocketbase.service\n[Unit]\nDescription=PocketBase\nAfter=network.target\n\n[Service]\nType=simple\nUser=pocketbase\nGroup=pocketbase\nLimitNOFILE=4096\nRestart=always\nRestartSec=5s\nWorkingDirectory=\u002Fopt\u002Fpocketbase\nExecStart=\u002Fopt\u002Fpocketbase\u002Fpocketbase serve --http=\"127.0.0.1:8090\"\n\n# Security hardening\nNoNewPrivileges=true\nProtectSystem=strict\nProtectHome=true\nReadWritePaths=\u002Fopt\u002Fpocketbase\u002Fpb_data \u002Fopt\u002Fpocketbase\u002Fpb_hooks \u002Fopt\u002Fpocketbase\u002Fpb_migrations\nPrivateTmp=true\n\n# Memory limit (adjust to your server)\n# MemoryMax=512M\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\n# Setup\nsudo useradd --system --no-create-home pocketbase\nsudo mkdir -p \u002Fopt\u002Fpocketbase\nsudo cp pocketbase \u002Fopt\u002Fpocketbase\u002F\nsudo chown -R pocketbase:pocketbase \u002Fopt\u002Fpocketbase\n\n# Enable & start\nsudo systemctl daemon-reload\nsudo systemctl enable pocketbase\nsudo systemctl start pocketbase\nsudo systemctl status pocketbase\n\n# Logs\nsudo journalctl -u pocketbase -f\n```\n\n### File descriptor limit\n\nFor high-traffic deployments, increase the limit:\n\n```ini\n# In the [Service] section:\nLimitNOFILE=65535\n```\n\nAlso set system-wide in `\u002Fetc\u002Fsecurity\u002Flimits.conf`:\n```\npocketbase soft nofile 65535\npocketbase hard nofile 65535\n```\n\n### Go memory limit\n\nFor constrained environments:\n\n```ini\nEnvironment=GOMEMLIMIT=400MiB\n```\n\n## Docker\n\n### Dockerfile\n\n```dockerfile\nFROM alpine:latest\n\nARG PB_VERSION=0.25.0\n\nRUN apk add --no-cache \\\n    unzip \\\n    ca-certificates\n\n# Download and install PocketBase\n# NOTE: verify the checksum in production — see https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\nADD https:\u002F\u002Fgithub.com\u002Fpocketbase\u002Fpocketbase\u002Freleases\u002Fdownload\u002Fv${PB_VERSION}\u002Fpocketbase_${PB_VERSION}_linux_amd64.zip \u002Ftmp\u002Fpb.zip\nRUN unzip \u002Ftmp\u002Fpb.zip -d \u002Fpb\u002F && rm \u002Ftmp\u002Fpb.zip\n\n# Copy hooks and migrations\nCOPY .\u002Fpb_hooks \u002Fpb\u002Fpb_hooks\nCOPY .\u002Fpb_migrations \u002Fpb\u002Fpb_migrations\n\nEXPOSE 8090\n\nCMD [\"\u002Fpb\u002Fpocketbase\", \"serve\", \"--http=0.0.0.0:8090\"]\n```\n\n### docker-compose.yml\n\n```yaml\nservices:\n  pocketbase:\n    build: .\n    ports:\n      - \"127.0.0.1:8090:8090\"  # bind to localhost only — expose via reverse proxy\n    volumes:\n      - pb_data:\u002Fpb\u002Fpb_data\n      - .\u002Fpb_hooks:\u002Fpb\u002Fpb_hooks\n      - .\u002Fpb_migrations:\u002Fpb\u002Fpb_migrations\n    restart: unless-stopped\n    healthcheck:\n      test: [\"CMD\", \"wget\", \"--no-verbose\", \"--tries=1\", \"--spider\", \"http:\u002F\u002Flocalhost:8090\u002Fapi\u002Fhealth\"]\n      interval: 30s\n      timeout: 5s\n      retries: 3\n\nvolumes:\n  pb_data:\n```\n\n## Reverse Proxy\n\n### Caddy (recommended — auto TLS)\n\n```\n# \u002Fetc\u002Fcaddy\u002FCaddyfile\nmyapp.com {\n    reverse_proxy localhost:8090\n}\n```\n\nThat's it. Caddy handles TLS certificates automatically via Let's Encrypt.\n\n### nginx\n\n```nginx\n# \u002Fetc\u002Fnginx\u002Fsites-available\u002Fpocketbase\nserver {\n    listen 80;\n    server_name myapp.com;\n    return 301 https:\u002F\u002F$server_name$request_uri;\n}\n\nserver {\n    listen 443 ssl http2;\n    server_name myapp.com;\n\n    ssl_certificate \u002Fetc\u002Fletsencrypt\u002Flive\u002Fmyapp.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fmyapp.com\u002Fprivkey.pem;\n    ssl_protocols TLSv1.2 TLSv1.3;\n    ssl_ciphers HIGH:!aNULL:!MD5;\n\n    client_max_body_size 50M;\n\n    # Block public access to the admin dashboard\n    location \u002F_\u002F {\n        return 403;\n    }\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:8090;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n\n        # SSE support for realtime\n        proxy_buffering off;\n        proxy_cache off;\n        proxy_read_timeout 3600s;\n    }\n}\n```\n\n**Critical for realtime**: `proxy_buffering off` and `proxy_read_timeout` must be set for SSE subscriptions to work.\n\n```bash\n# Let's Encrypt with nginx\nsudo apt install certbot python3-certbot-nginx\nsudo certbot --nginx -d myapp.com\n```\n\n## SMTP Configuration\n\nConfigure in Dashboard > Settings > Mail settings, or via hooks:\n\n```js\n\u002F\u002F pb_hooks\u002Fsettings.pb.js\nonBootstrap(function(e) {\n    var settings = e.app.settings()\n    settings.smtp.enabled = true\n    settings.smtp.host = $os.getenv(\"SMTP_HOST\")\n    settings.smtp.port = parseInt($os.getenv(\"SMTP_PORT\") || \"587\")\n    settings.smtp.username = $os.getenv(\"SMTP_USER\")\n    settings.smtp.password = $os.getenv(\"SMTP_PASS\")\n    settings.smtp.tls = true  \u002F\u002F STARTTLS\n    \u002F\u002F settings.smtp.authMethod = \"PLAIN\"  \u002F\u002F or \"LOGIN\"\n    settings.meta.senderName = \"My App\"\n    settings.meta.senderAddress = \"noreply@myapp.com\"\n    e.app.save(settings)\n    return e.next()\n})\n```\n\n## Security Hardening\n\n### Superuser MFA\n\nAlways enable MFA for superuser accounts in production:\nDashboard > Superusers > Auth options > MFA > Enable\n\n### Settings encryption key\n\nEncrypt sensitive settings (SMTP passwords, S3 keys) at rest:\n\n```bash\n.\u002Fpocketbase serve --encryptionEnv=PB_ENCRYPTION_KEY\n```\n\nSet `PB_ENCRYPTION_KEY` environment variable to a 32+ character random string. Once set, settings are encrypted in the DB. **Do not lose this key** — you won't be able to decrypt settings without it.\n\n### Rate limiting\n\nBuilt-in rate limiter (enabled by default). Configure in Dashboard > Settings > Rate limits, or:\n\n```js\nsettings.rateLimits.enabled = true\nsettings.rateLimits.rules = [\n    { label: \"*:auth*\", maxRequests: 10, duration: 300 },  \u002F\u002F 10 auth attempts per 5 min\n    { label: \"POST:\u002Fapi\u002Fcollections\u002F*\u002Frecords\", maxRequests: 50, duration: 60 },\n]\n```\n\n### Hide the Dashboard in production\n\n```bash\n.\u002Fpocketbase serve --http=\"127.0.0.1:8090\"  # bind to localhost only\n```\n\nAccess the dashboard only via SSH tunnel:\n```bash\nssh -L 8090:127.0.0.1:8090 user@server\n```\n\n## S3 Storage\n\nFor file uploads, offload to S3-compatible storage:\n\nDashboard > Settings > Files storage > S3\n\n```js\n\u002F\u002F Or via hooks:\nonBootstrap(function(e) {\n    var settings = e.app.settings()\n    settings.s3.enabled = true\n    settings.s3.bucket = $os.getenv(\"S3_BUCKET\")\n    settings.s3.region = $os.getenv(\"S3_REGION\")\n    settings.s3.endpoint = $os.getenv(\"S3_ENDPOINT\")\n    settings.s3.accessKey = $os.getenv(\"S3_ACCESS_KEY\")\n    settings.s3.secret = $os.getenv(\"S3_SECRET\")\n    settings.s3.forcePathStyle = true  \u002F\u002F for MinIO\u002FBackblaze\n    e.app.save(settings)\n    return e.next()\n})\n```\n\nCompatible providers: AWS S3, Backblaze B2, Cloudflare R2, MinIO, DigitalOcean Spaces, Wasabi.\n\n## Backups\n\n### Small databases (\u003C 1GB)\n\nUse the built-in backup feature:\n- Dashboard > Settings > Backups\n- Or via API: `POST \u002Fapi\u002Fbackups`\n- Auto-schedule: configure cron in Dashboard\n\n### Large databases\n\nThe Dashboard backup uses SQLite's online backup API (locks DB briefly). For large DBs, use:\n\n```bash\n# sqlite3 .backup command (hot backup, minimal locking)\nsqlite3 \u002Fopt\u002Fpocketbase\u002Fpb_data\u002Fdata.db \".backup '\u002Ftmp\u002Fbackup.db'\"\n\n# Then rsync to remote\nrsync -avz \u002Ftmp\u002Fbackup.db backup-server:\u002Fbackups\u002Fpocketbase\u002Fdata-$(date +%Y%m%d).db\n```\n\n**Never copy the `.db` file directly** while PocketBase is running — it may be in an inconsistent state.\n\n### Backup script\n\n```bash\n#!\u002Fbin\u002Fbash\n# \u002Fopt\u002Fpocketbase\u002Fbackup.sh\nset -euo pipefail\n\nBACKUP_DIR=\"\u002Fbackups\u002Fpocketbase\"\nDB_PATH=\"\u002Fopt\u002Fpocketbase\u002Fpb_data\u002Fdata.db\"\nDATE=$(date +%Y%m%d_%H%M%S)\n\nmkdir -p \"$BACKUP_DIR\"\n\n# Hot backup\nsqlite3 \"$DB_PATH\" \".backup '${BACKUP_DIR}\u002Fdata_${DATE}.db'\"\n\n# Also backup pb_data files (uploads, if not using S3)\ntar -czf \"${BACKUP_DIR}\u002Fpb_data_${DATE}.tar.gz\" -C \u002Fopt\u002Fpocketbase pb_data --exclude='pb_data\u002Fdata.db*'\n\n# Retain last 30 days\nfind \"$BACKUP_DIR\" -name \"data_*.db\" -mtime +30 -delete\nfind \"$BACKUP_DIR\" -name \"pb_data_*.tar.gz\" -mtime +30 -delete\n```\n\n```bash\n# Crontab: daily at 2 AM\n0 2 * * * \u002Fopt\u002Fpocketbase\u002Fbackup.sh >> \u002Fvar\u002Flog\u002Fpocketbase-backup.log 2>&1\n```\n\n## Health Check\n\n```bash\ncurl http:\u002F\u002Flocalhost:8090\u002Fapi\u002Fhealth\n# {\"code\":200,\"message\":\"API is healthy.\"}\n```\n\n## Deployment Checklist\n\n1. **Binary**: correct architecture (linux_amd64 \u002F linux_arm64)\n2. **systemd**: service enabled, LimitNOFILE set\n3. **Reverse proxy**: Caddy or nginx with TLS, proxy_buffering off for SSE\n4. **SMTP**: configured and tested (send a test verification email)\n5. **Superuser**: strong password + MFA enabled\n6. **Encryption key**: `--encryptionEnv` set for sensitive settings\n7. **Backups**: automated daily, tested restore procedure\n8. **Rate limiting**: enabled with sane defaults\n9. **File storage**: S3 configured if expecting many uploads\n10. **Monitoring**: health check endpoint monitored, journalctl logs reviewed\n11. **Firewall**: only 80\u002F443 exposed, 8090 bound to localhost\n12. **GOMEMLIMIT**: set if on constrained VPS\n\n",{"name":5,"description":7},"main","015422534a7457348a313b6381f0255d3364eb8c","cli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-deploy",0,"https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates","https:\u002F\u002Fgithub.com\u002FMishit18","2026-11-14 17:36:32",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add Mishit18\u002Fclaude-code-templates --skill \"PocketBase Deploy\"",{"tool":61,"command":62},"bunx","bunx skills add Mishit18\u002Fclaude-code-templates --skill \"PocketBase Deploy\"",{"tool":64,"command":65},"pnpm","pnpm dlx skills add Mishit18\u002Fclaude-code-templates --skill \"PocketBase Deploy\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fpocketbase\u002Fpb-deploy\u002FSKILL.md",true,[],[70,100,129,154,181,192],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":74,"licenseFileUrl":75,"sourceHtmlUrl":76,"categories":77,"keywords":81,"publishedAt":99},"01M6R194Y2CS39V9VPAVRVW1ZV","skill-creation-guide","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Fskill-creation-guide\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Fskill-creation-guide\u002FSKILL.md",[78],{"categoryNo":79,"categoryName":80,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,29,98,27],"skill creation guide","guide","creation","skill creation","workflows","create","update","capabilities","knowledge","tool","integrations","specialized","new skill","existing skill","users","with","Existing","2026-11-11 15:11:14",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":74,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":110,"publishedAt":43},"01M6R4ARN4W2VZRDERDTMN1KP0","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[111,112,113,114,115,116,117,118,119,120,121,122,123,124,36,125,126,127,29,128],"web artifacts builder","web","artifacts","artifacts builder","builder","frontend","css","components","react","routing","state management","state","file","Tailwind","single-file","ui components","multi","single",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":74,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":140,"publishedAt":43},"01M6R45GXREM5DP8T08MAC788H","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[136,139],{"categoryNo":137,"categoryName":138,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":108,"categoryName":109,"taxonomyType":21,"taxonomyTypeDesc":22},[141,142,143,116,144,145,112,146,147,148,149,150,151,152,153,97,29],"testing","webapp testing","webapp","screenshots","playwright","debugging","toolkit","browser","ui","logs","applications","behavior","local",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":158,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":43},"01M6R2GYJ470X8EB7R58V0B68K","think-tank","Run a Virtual Think Tank — a structured multi-persona debate — before planning or making architectural\u002Fdesign\u002Fstrategic decisions. Use this skill whenever the user is about to plan a system, make a technology choice, evaluate trade-offs, decide on an approach, or faces any decision where multiple perspectives would sharpen the outcome. Also trigger when the user says \"think tank\", \"debate this\", \"perspectives on\", \"trade-offs\", \"should I use X or Y\", \"help me decide\", \"before we plan\", or asks for pros\u002Fcons of competing approaches. This skill should run BEFORE any implementation planning begins — it produces a structured analysis that feeds into better plans.","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fthink-tank\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fthink-tank\u002FSKILL.md",[],[162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,27],"think tank","think","design","run","feeds","analysis","persona","plan","sharpen","virtual","decision","choice","decide","perspectives","outcome","me","debate","make","trade-offs",{"skillNo":182,"name":183,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":74,"licenseFileUrl":184,"sourceHtmlUrl":185,"categories":186,"keywords":188,"publishedAt":43},"01M6R2FSR55AVRFA9YZ8SC2GZG","skill-creator","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fskill-creator\u002FSKILL.md",[187],{"categoryNo":79,"categoryName":80,"taxonomyType":21,"taxonomyTypeDesc":22},[189,190,86,87,88,89,90,91,92,93,83,94,95,96,97,29,98,27,191],"skill creator","creator","new",{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":198,"publishedAt":43},"01M6R2FK42ZZ4HJTJVVK9WJBBP","ship-learn-next","Transform learning content (like YouTube transcripts, articles, tutorials) into actionable implementation plans using the Ship-Learn-Next framework. Use when user wants to turn advice, lessons, or educational content into concrete action steps, reps, or a learning quest.","https:\u002F\u002Fgithub.com\u002FMishit18\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fship-learn-next\u002FSKILL.md",[],[199,200,201,202,203,204,205,206,36,207,208,209,210,211,212,213,214,215,216,27],"learn","ship learn next","ship","next","framework","learning","read","write","advice","implementation","youtube","plans","quest","transform","actionable","action","lessons","youtube transcripts"]