Cloudflare Demo – systemd Service

Navigation

Back to Home

Below is the systemd service used for my Cloudflare demo:

[Unit]
Description=CloudFlare Web Server
After=network.target

[Service]
Type=simple
WorkingDirectory=/home/aextimber/tunnel-demo/
ExecStart=/usr/bin/python3 -m http.server 8080
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

This service starts a simple Python HTTP server on port 8080, automatically restarts if it fails, and ensures it is available after the network is up.