Skip to content

Translation out of date

The source content changed after this translation. See the Português version. View original

Server mode

hinow-cli serve: headless login, policy, port and systemd service.

Updated on Sep 16, 2026

hinow-cli serve starts HiNow Code without an interface: the local API and the bridge with HINOW Connect. It's like a server—a desktop in the office or a CI machine becomes available to receive your sessions from elsewhere, with no one in front of it.

hinow-cli serve --policy allow

With --policy allow, remote sessions run without asking: on a headless machine there's no one to answer a "may I?". Without the option, the policy saved with hinow-cli connect applies (the default is ask).

Running headless

The serve command accepts the same login options. With environment variables, nothing stays in history:

export HINOW_EMAIL=voce@empresa.com
export HINOW_PASSWORD='...'
hinow-cli serve --policy allow --organization "Minha empresa"

If the machine already ran hinow-cli login, just run hinow-cli serve.

Options

OptionWhat it does
--policy allow|ask|denyWhat happens when another machine of yours starts a session here
--port <n>Local API port (default: random). Useful with hinow-cli attach and run --attach
--hostnameListen address (default 127.0.0.1). Only open to the network with a password
--autoupdateInstalls new versions automatically when nothing is running and restarts (checks once a day)
--autoupdate-interval <min>Minutes between checks with --autoupdate (default 1440)
-u, -p, --code, --organization, --projectLogin, as in hinow-cli login

Local API password

The local API has no password by default and listens only on 127.0.0.1. If you open it to the network (--hostname 0.0.0.0), set HINOW_SERVER_PASSWORD (and, if you want, HINOW_SERVER_USERNAME).

As a service: start with the machine

To have the server start with the machine and restart automatically if it crashes, install it as a service. One command registers the service with the flags you choose, starts it immediately, and registers it for future boots:

hinow-cli login                                   # antes, com o mesmo usuário
hinow-cli service install --policy allow --port 4096 --autoupdate
hinow-cli service status
hinow-cli service restart
hinow-cli service uninstall

The flags after install are the same as for serve, and they are saved in the service. Credentials are not included: the service uses the login saved on the machine.

SystemWhat is created
LinuxUser systemd unit at ~/.config/systemd/user/hinow-serve.service (as root, /etc/systemd/system/). To start on boot without anyone logged in, it runs loginctl enable-linger; if sudo is needed, it will notify you. Logs: journalctl --user -u hinow-serve -f
macOSLaunchAgent at ~/Library/LaunchAgents/ai.hinow.serve.plist (as root, LaunchDaemon), with KeepAlive. Logs at ~/Library/Logs/hinow-serve.log
WindowsScheduled Task "HiNow Code server" that runs at your logon. Not yet tested on actual Windows

Verify

hinow-cli status
hinow-cli connect status

connect should show online · wss://connect.hinow.ai and bridge pid ... (serve). From then on the machine appears in the list of your other machines.

Auto-update

With --autoupdate, the server checks downloads.hinow.ai once a day (the first time, minutes after starting). If there's a new version, it only installs it when nothing is in progress: no sessions running, no approvals or questions waiting for an answer, no events in the last two minutes. If busy, it tries again every five minutes. Then it downloads the package for your variant, verifies the sha256, swaps the binary, and restarts: as a service, it just exits and systemd or launchd brings up the new version; outside a service, it re-executes itself with the same flags.

Without --autoupdate, serve does not update itself: run hinow-cli upgrade and hinow-cli service restart.

One bridge per machine

Only one process per machine talks to the hub. If you open the interface on the same machine, it takes over the connection and serve yields; when you close it, serve comes back automatically.