- Home
- Skills
- DevOps & Cloud
- systemd
systemd
Author, harden, and debug systemd units for production services and scheduled tasks.
Free
systemd
Example session with this skill installed
I need a systemd service file for a Node.js app at /opt/api/server.js running as 'apiuser'. It needs to restart on failure, use 2GB max RAM, and have strict security hardening.
- Read your context and instructions
- Compiled the systemd
I have generated a hardened systemd service unit for your Node.js application. This configuration includes automatic restarts, resource limits, and filesystem isolation.
systemd Service Configuration
[Unit]
Description=Node.js API Server
After=network.target
[Service]
Type=simple
User=apiuser
Group=apiuser
WorkingDirectory=/opt/api
ExecStart=/usr/bin/node /opt/api/server.js
# Restart policy
Restart=on-failure
RestartSec=5s
# Resource Limits
MemoryMax=2G
LimitNOFILE=65535
# Security Hardening
PrivateTmp=true
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictNamespaces=true
# Allow writing to specific application paths if needed
# ReadWritePaths=/var/log/api-app
[Install]
WantedBy=multi-user.target
Next steps
- Save this content to
/etc/systemd/system/api-server.service. - Run
sudo systemctl daemon-reloadto register the new unit. - Start and enable the service with
sudo systemctl enable --now api-server.service.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Managing Linux services manually via scripts is error-prone and lacks native recovery, resource limits, and unified logging. Developers often struggle with correct unit file syntax, leading to services that fail to restart on crash or leak privileges.
What it does
- Generates hardened systemd service units for Node.js, Python, and Go applications.
- Configures timer units with cron-like scheduling and persistence for background tasks.
- Implements security best practices like
PrivateTmp,NoNewPrivileges, andProtectSystem. - Sets up socket activation to start services only when traffic arrives.
- Manages drop-in overrides to modify package-provided units without touching original files.
Frameworks & tools
Linux distributions using systemd (Ubuntu, Debian, CentOS, Fedora, RHEL), journalctl, and systemctl.
Why this beats prompting it yourself
Generic LLMs often forget to include essential Restart logic or LimitNOFILE settings required for production-grade stability. This skill enforces a security-first approach, ensuring every service is isolated and monitored correctly from the start.
Use cases
- Deploying a Node.js API with automatic restarts and logging to the system journal.
- Replacing fragile cron jobs with reliable systemd timers and randomized delays.
- Hardening an existing public-facing service to prevent filesystem access.
- Debugging startup failures using journalctl filtering and boot-level logs.
Known limitations
Does not support non-systemd init systems like OpenRC (Alpine Linux) or macOS launchd. Focuses on system management, not container orchestration like Docker.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
5 uses
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 2 months ago
- Free with an Agensi account
Permissions
What's inside
Frequently Asked Questions
New in DevOps & Cloud
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.