Canonical: https://toolipedia.app/linux-server-config-generator

# Linux Server Config Generator

Generate a systemd service unit, Supervisor program, PM2 ecosystem file, logrotate rule, UFW commands or iptables rules from simple form fields.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Linux Server Config Generator

## About Linux Server Config Generator

Service files and firewall rules are short but easy to get wrong, and a typo can leave a server unreachable. This generator writes a systemd unit with the working directory, user, environment variables, restart policy and optional hardening, a Supervisor program section, a PM2 ecosystem.config.js, a logrotate rule with rotation count, compression and a post-rotate command, UFW commands that open ports and rate-limit SSH, or an iptables script that accepts loopback and established traffic before setting the DROP policy. Each result comes with the commands to install and check it.

## How to use Linux Server Config Generator
1. Choose what to generate: systemd, Supervisor, PM2, logrotate, UFW or iptables.
2. Fill in the name, command, folder and options, or the ports and SSH port for the firewalls.
3. Copy the file or commands, install them as shown and check the status before you log out.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- systemd service generator
- supervisor config generator
- pm2 ecosystem file generator
- logrotate config generator
- ufw rules generator
- iptables rules generator
- systemd unit file example

## Frequently asked questions

### Why does systemd need the full path of the program?

ExecStart does not search the PATH, so a bare name like node fails. Find the path with the which command, such as which node, and use that in the unit.

### How do I avoid locking myself out with a firewall?

The SSH rule is always written before the default deny policy, and rules run in order. Keep a second session open and test a new login before closing the first.

### What is the difference between delaycompress and copytruncate in logrotate?

delaycompress leaves the newest rotated log uncompressed so a program still writing to it is safe. copytruncate copies the log and empties the original in place, which needs no reload but can lose a few lines.

### Is Linux Server Config Generator free?

Yes. Linux Server Config Generator on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Linux Server Config Generator:
- [Crontab to systemd Timer Converter](https://toolipedia.app/crontab-to-systemd-timer)
- [Nginx config generator](https://toolipedia.app/nginx-config-generator)
- [IP Blocklist Rule Converter](https://toolipedia.app/ip-blocklist-rule-converter)
- [Dependabot Config Generator](https://toolipedia.app/dependabot-config-generator)
- [Systemd OnCalendar Tester](https://toolipedia.app/systemd-oncalendar-tester)
