Skip to content

Instantly share code, notes, and snippets.

@mcandre
Last active November 20, 2025 16:54
Show Gist options
  • Select an option

  • Save mcandre/d6904a214ea2387c0a57413c6d589864 to your computer and use it in GitHub Desktop.

Select an option

Save mcandre/d6904a214ea2387c0a57413c6d589864 to your computer and use it in GitHub Desktop.
ComfyUI Background Service
# asdf
# https://asdf-vm.com/
#
# ~/nfsshare/.tool-versions
python 3.14.0
# systemd
#
# /etc/systemd/system/comfyui.service
[Unit]
After=network.target
[Service]
User=<user>
WorkingDirectory=/home/<user>/nfsshare/ComfyUI
ExecStart=/home/<user>/bin/launch-comfyui
Restart=on-failure
[Install]
WantedBy=multi-user.target
# NFS server
#
# Debian family: nfs-kernel-server
#
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
# insecure pending Apple fixing their NFS support
/home/<user>/nfsshare 192.168.1.0/24(rw,sync,no_subtree_check,insecure)
#!/bin/bash
# chmod +x ~/bin/launcher-comfyui
unset IFS
set -eufo pipefail
export PATH="${HOME}/bin:${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
python main.py --listen '0.0.0.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment