You got me on the right path. StateDirectory with unique names did the trick! Was able to get all three of the reserved proxy shares set up as services that start with my machine. Posting my general set up in the event that anyone else trying to run multiple reserved shares as a linux service finds the details helpful. NOTE TO ANYONE DOING THE SAME - ZROK_UNIQUE_NAME must be alphanumeric. That means NO dashes, otherwise the service will fail to start and you won't know the cause unless you journalctl the service
/opt/openziti/etc/zrok/zrok-share-ollama.env
ZROK_ENABLE_TOKEN="<my token>"
ZROK_ENVIRONMENT_NAME="<environment name for Ollama share>"
ZROK_TARGET="http://0.0.0.0:11434"
ZROK_UNIQUE_NAME="<my unique name for Ollama share>"
ZROK_BACKEND_MODE="proxy"
/etc/systemd/system/zrok-share-ollama.service
[Unit]
Description=Zrok Ollama reserved public share service
After=network-online.target
[Service]
Type=simple
DynamicUser=yes
StateDirectory=zrok-share-ollama
UMask=0007
Environment=PFXLOG_NO_JSON=true
ExecStartPre=/opt/openziti/bin/zrok-enable.bash /opt/openziti/etc/zrok/zrok-share-ollama.env
ExecStart=/opt/openziti/bin/zrok-share.bash /opt/openziti/etc/zrok/zrok-share-ollama.env
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
sudo systemctl stop zrok-share-ollama
sudo systemctl disable zrok-share-ollama
sudo systemctl daemon-reload
sudo systemctl enable zrok-share-ollama
sudo systemctl restart zrok-share-ollama
/opt/openziti/etc/zrok/zrok-share-ollama-webui.env
ZROK_ENABLE_TOKEN="<my token>"
ZROK_ENVIRONMENT_NAME="<environment name for Ollama WebUI share>"
ZROK_TARGET="http://0.0.0.0:11435"
ZROK_UNIQUE_NAME="<my unique name for Ollama WebUI share>"
ZROK_BACKEND_MODE="proxy"
/etc/systemd/system/zrok-share-ollama-webui.service
[Unit]
Description=Zrok Ollama-WebUI reserved public share service
After=network-online.target
[Service]
Type=simple
DynamicUser=yes
StateDirectory=zrok-share-ollama-webui
UMask=0007
Environment=PFXLOG_NO_JSON=true
ExecStartPre=/opt/openziti/bin/zrok-enable.bash /opt/openziti/etc/zrok/zrok-share-ollama-webui.env
ExecStart=/opt/openziti/bin/zrok-share.bash /opt/openziti/etc/zrok/zrok-share-ollama-webui.env
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
sudo systemctl stop zrok-share-ollama-webui
sudo systemctl disable zrok-share-ollama-webui
sudo systemctl daemon-reload
sudo systemctl enable zrok-share-ollama-webui
sudo systemctl restart zrok-share-ollama-webui
/opt/openziti/etc/zrok/zrok-share-litellm.env
ZROK_ENABLE_TOKEN="<my token>"
ZROK_ENVIRONMENT_NAME="<environment name for LiteLLM Proxy share>"
ZROK_TARGET="http://0.0.0.0:8000"
ZROK_UNIQUE_NAME="<my unique name for LiteLLM Proxy share>"
ZROK_BACKEND_MODE="proxy"
/etc/systemd/system/zrok-share-litellm.service
[Unit]
Description=Zrok LiteLLM reserved public share service
After=network-online.target
[Service]
Type=simple
DynamicUser=yes
StateDirectory=zrok-share-litellm
UMask=0007
Environment=PFXLOG_NO_JSON=true
ExecStartPre=/opt/openziti/bin/zrok-enable.bash /opt/openziti/etc/zrok/zrok-share-litellm.env
ExecStart=/opt/openziti/bin/zrok-share.bash /opt/openziti/etc/zrok/zrok-share-litellm.env
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
sudo systemctl stop zrok-share-litellm
sudo systemctl disable zrok-share-litellm
sudo systemctl daemon-reload
sudo systemctl enable zrok-share-litellm
sudo systemctl restart zrok-share-litellm