nodemon Runtime

Host Node.js apps with automatic restart on file change using nodemon on Witchly.host. Ideal for rapid iteration and development.

The nodemon egg runs Node.js 24.x wrapped in nodemon — a utility that watches your files and restarts your app whenever you save changes. This is the same Node.js runtime, but with auto-reload built in.

When to use nodemon vs plain Node.js

  • Use nodemon when you’re actively developing — edit a file via SFTP or the File Manager, save, and your app restarts automatically.
  • Use plain Node.js for production — no unnecessary restart churn, saves a small amount of RAM.

Quick deploy

  1. dash.witchly.hostDeployLanguagesnodemon.
  2. On the Startup tab, set:
    • Git Repo Address — your repo URL
    • Bot js file — entrypoint (default index.js)
  3. Start.

Startup flow

npm install nodemon

# Pull latest if AUTO_UPDATE=1
if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == "1" ]]; then git pull; fi

# Install any extra packages
if [[ ! -z ${NODE_PACKAGES} ]]; then /usr/local/bin/npm install ${NODE_PACKAGES}; fi

# Run via nodemon — watches the filesystem and reloads on change
./node_modules/.bin/nodemon ${BOT_JS_FILE}

Variables reference

VariablePurpose
GIT_ADDRESSGit repo URL
BRANCHGit branch
USER_UPLOAD1 to upload via SFTP instead of cloning
AUTO_UPDATE1 to git pull on each start
BOT_JS_FILEEntrypoint (default index.js)
NODE_PACKAGESExtra npm packages to install
UNNODE_PACKAGESPackages to uninstall
USERNAME, ACCESS_TOKENPrivate repo credentials

How file-watching works

nodemon watches /home/container and restarts your process when any .js, .mjs, .json, or .ts file changes. You can customize this with a nodemon.json in your repo:

{
  "watch": ["src"],
  "ext": "js,ts,json",
  "ignore": ["node_modules", "logs"],
  "delay": 1000
}

The delay (ms) debounces rapid saves so nodemon doesn’t restart 5 times during a long save.

Typical workflow

  1. Connect via SFTP.
  2. Open your editor (VS Code + SFTP extension, or sshfs-mount the server).
  3. Edit a file, save — nodemon restarts automatically.
  4. Watch the console for errors.

Troubleshooting

  • Restart loop — your app is throwing on startup. Fix the error; nodemon will stop restarting once the crash stops.
  • Changes not detected — make sure you’re editing files inside /home/container, not a stale local copy; nodemon won’t pick up changes on the client side.
  • “command not found: nodemon” — happens if npm install nodemon failed on boot; run it manually from the Console tab.

Next steps