1. Home
  2. Developer
  3. Server Config Generators

Server Config Generators

Fifteen config file tools in one place: Nginx, Docker, systemd, cron, firewall and SSH.

Runs in your browser · No upload

Pick a purpose and options to get an Nginx server block config file.

The 443 server block only passes nginx -t once the certificate files exist. Get the certificate first, then apply.
Nginx config
# nginx config for example.com (review before use) server { listen 80; listen [::]:80; server_name example.com www.example.com; location / { return 301 https://$host$request_uri; } } server { listen 443 ssl; listen [::]:443 ssl; http2 on; server_name example.com www.example.com; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_session_cache shared:SSL:10m; ssl_session_timeout 1d; ssl_session_tickets off; server_tokens off; client_max_body_size 10m; # note: add_header in a location block replaces these, so repeat them there if you add any add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 5; gzip_min_length 1024; gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml application/rss+xml image/svg+xml; # hide .git, .env and other dotfiles (keep .well-known) location ~ /\.(?!well-known) { deny all; } location / { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }
How to apply
# 1) save as /etc/nginx/conf.d/example.com.conf # 2) test the syntax, then reload sudo nginx -t sudo systemctl reload nginx # certificate with Let's Encrypt (run before enabling the 443 block) sudo certbot certonly --nginx -d example.com -d www.example.com
Review the generated config and check the syntax with nginx -t before using it on a production server. Never put secrets such as tokens or passwords into the config.

Your input is processed in this browser and never sent to a server.

How to use

  1. Pick the config file you want to build from the sets above. The tool opens right below it, and the part after # in the address changes so you can share the same view.
  2. Enter values such as the domain, port or start command, and choose the options. The config file is built from them.
  3. Copy the result or download it and put it on your server. To work in one tool alone, press “Open this tool on its own page”. Every tool also has its own page.

Which config do I need?

What you want to do Tool What you get
Point a domain at a web server, with HTTPS or a reverse proxy Nginx config generator A server block config file
Redirects, forced HTTPS or access limits on shared hosting .htaccess generator Apache rules
Decide what search and AI crawlers may read robots.txt generator, llms.txt generator Text files for the site root
Tell researchers where to report a vulnerability security.txt generator /.well-known/security.txt
Package an app as a container Dockerfile generator, docker-compose generator Dockerfile, compose.yaml, .env.example
Start a program automatically when the server boots systemd service generator .service and .timer files
Run a job at fixed times Cron expression generator, cron expression parser A cron expression and the next run times
Move a .env file to JSON, YAML or docker format .env converter Converted environment variables
Put a user name and password on a folder or page htpasswd generator A .htpasswd line
Open and close ports on the server Firewall rule generator ufw, iptables or firewalld commands
Save servers under short names for SSH SSH config generator ~/.ssh/config
Mail from your domain lands in spam DMARC and SPF generator TXT records for your DNS

Tools in this set

Set Tools
Web server and site files Nginx config, .htaccess, robots.txt, llms.txt, security.txt
Running and deploying apps Dockerfile, docker-compose, systemd service, cron generator, cron parser, .env converter
Access, security and mail htpasswd, firewall rules, SSH config, DMARC and SPF

Before you put a config on a server

  • Run a syntax check first. Nginx has nginx -t, Apache has apachectl configtest, compose has docker compose config, and systemd has systemd-analyze verify. Restart or reload only after it passes.
  • Keep the original. Copy the existing file before overwriting it, so you can roll back at once if something breaks.
  • Be careful with firewall and SSH rules over a remote session. A rule that blocks the SSH port you are using right now locks you out. Apply it while you still have console access.
  • Do not write passwords or keys into the file. Keep secrets in .env or a secret store and let the generated file refer to them by name.

Where does what you type go?

Every tool in this set calculates only in your browser. The domains, paths and passwords you enter and the config files that are produced are never sent to a server and are not stored.

Frequently asked questions

Where do I put the Nginx config I generated?

It depends on the distribution, but usually you place the file in /etc/nginx/sites-available/ and link it from sites-enabled/. On CentOS-style systems and in Docker images, a .conf file in /etc/nginx/conf.d/ is more common. Check it with nginx -t, then apply it with nginx -s reload.

Should I use .htaccess or an Nginx config?

It depends on the server software. On Apache shared hosting use .htaccess; on an Nginx server use an Nginx config. Nginx does not read .htaccess files. Your host’s documentation or the Server response header tells you which one you have.

Does blocking in robots.txt remove a page from search results?

No. robots.txt only stops crawlers from reading the page. If other sites link to it, the address can still appear in results. To remove a page from results, add noindex to the page. Do not also block it in robots.txt, because then crawlers cannot read the noindex.

What do the star (*) and slash (/) mean in a cron expression?

A cron expression has five fields: minute, hour, day of month, month and day of week. * means every value and */5 means every fifth. */5 * * * * runs every five minutes and 0 3 * * * runs every day at 3 a.m. If the server is not on your local time zone, the run time shifts, so check the server’s time zone.

Should I use a systemd service or cron?

A program that must stay running, or be restarted when it dies, belongs in a systemd service. A job that runs once at a set time fits cron or a systemd timer. If you want logs in one place through journalctl, a timer is convenient.

Should I use ufw or iptables?

Ubuntu uses ufw by default, and RHEL and Rocky use firewalld. Both drive the same kernel feature underneath, so stay with the one you already use. Adding rules through several tools can make them overwrite or conflict with each other.

Do I need both SPF and DMARC?

If your domain sends mail, yes, both are worth having. SPF lists which servers may send mail for your domain, and DMARC says what to do with mail that fails the checks. A safe path is to start DMARC at p=none, read the reports, and tighten it step by step.

My Docker image is too big. How do I shrink it?

Pick a small base image (alpine or slim) and use a multi-stage build so build tools stay out of the final image. A .dockerignore that keeps node_modules, .git and similar files out of the image helps a lot too.

For permission numbers use the chmod calculator, to read a certificate use the SSL certificate viewer, for response codes see HTTP status codes, and to check a live server use Network Diagnostics.

Can't find the tool you need?

Tell us what you want to do. We build the most requested tools first.