Managed to change it, this is my ersatztv.service file, I added the variables in it instead of system variables:
[Unit]
Description=ErsatzTV Media Server
After=network-online.target
[Service]
# User and Group to run the service as
User=root
Group=root
Environment="ETV_STREAMING_PORT=8409"
Environment="ETV_UI_PORT=8410"
# Type of service
Type=simple
# Working directory where ErsatzTV expects its files
WorkingDirectory=/root/ersatztv/
# The main executable command
# Ensure the executable file 'ErsatzTV' is present in /opt/ersatztv
ExecStart=/root/ersatztv/ErsatzTV
# Restart policy for automatic recovery
Restart=always
RestartSec=5
# Standard output and error handling
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target