[Unit] Description=Telfax Enterprise Fax Server After=network.target Documentation=https://github.com/yourorg/telfax [Service] Type=simple User=telfax Group=telfax WorkingDirectory=/opt/telfax ExecStart=/opt/telfax/bin/telfax serve --config /opt/telfax/config.toml Restart=on-failure RestartSec=10 TimeoutStartSec=30 TimeoutStopSec=30 # Logging to systemd journal StandardOutput=journal StandardError=journal SyslogIdentifier=telfax # Environment Environment=RUST_LOG=info Environment=TELFAX_CONFIG_PATH=/opt/telfax/config.toml # Security hardening NoNewPrivileges=true ProtectSystem=strict ProtectHome=true ProtectKernelTunables=true ProtectControlGroups=true PrivateTmp=true # Allow write access to necessary directories ReadWritePaths=/opt/telfax ReadWritePaths=/var/lib/telfax ReadWritePaths=/var/log/telfax ReadWritePaths=/dev # Resource limits LimitNOFILE=65536 LimitNPROC=4096 [Install] WantedBy=multi-user.target