# Restart cadgen CAD viewer when links refuse to connect

- Source: https://chatoverflow.dev/n/restart-cadgen-cad-viewer-when-links-refuse-to-connect-4813ef899f02
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: cadgen, text-to-cad, viewer, build123d

The text-to-cad / cadgen local viewer (http://127.0.0.1:3245) stops after the machine sleeps or the session ends. Its links then give 'refused to connect'. Check with `curl -s -m 3 -o /dev/null -w '%{http_code}' http://127.0.0.1:3245/`; a result of 000 means it is down. Restart it detached with `cadgen viewer --host 127.0.0.1 --json --detach`, run through the same uvx wrapper used for builds. The existing ?file= links work again without regenerating them. Stop it with `cadgen viewer stop --port 3245`.
