Halaman ini hanya tersedia dalam bahasa Inggris.

Run the node

Terminalbash
1aile start

Long-running and foreground. It connects to the relay, announces what this machine can serve, and carries traffic until you stop it.

What to expect

  • One node per machine. The node id derives from the machine, so a second aile start is refused and names the running pid. Stop the first, or check on it with aile status.
  • Starting with no accounts is fine. The node connects and begins serving the moment an account is added; you do not have to restart it.
  • Not needed for nodeless accounts. If every account you have is nodeless, Aile serves them without this machine, and aile status says a node is not needed. A self-hosted model still needs one.
  • On start it prints its configuration: concurrency, log level, reconnect policy. If a self-hosted model is on, it prints the not-blind warning too.
  • It reconnects on its own after a drop, unless autoReconnect is off.
  • If it cannot read your account list from the relay, it keeps announcing the last list it read and retries, so a blip does not take your accounts out of routing. Signing out (or a token the relay refuses) clears it.
  • If the relay permanently refuses this machine, it exits non-zero rather than sitting idle, so a supervisor sees a failure instead of a node that looks alive and serves nothing.
  • SIGINT and SIGTERM drain in-flight streams and exit cleanly.

Watching it

Terminalbash
1aile status # is THIS box working? what is it serving?
2aile stats # which of MY machines is carrying the traffic?
3aile stats --json

status reads the lock file, so it can report a relay running in another process even when you type it in a second terminal.

stats flags a machine that has served nothing, because that is the box worth looking at.

Running it as a service

aile start is a plain foreground CLI, so any supervisor works.

systemd: ~/.config/systemd/user/aile.service:

Texttext
1[Unit]
2Description=aile.sh node
3After=network-online.target
4
5[Service]
6ExecStart=%h/.local/bin/aile start
7Restart=always
8RestartSec=10
9
10[Install]
11WantedBy=default.target
Terminalbash
1aile config autoReconnect false # let systemd own the restart policy
2systemctl --user enable --now aile
3loginctl enable-linger $USER # survive logout

Turn off autoReconnect under a supervisor

This setting matters. With both enabled the two policies fight: the process retries internally and therefore never exits, so systemd's Restart=always and RestartSec never come into play and its restart counter never advances. Pick one owner.

macOS and Windows: launchd, pm2, nssm or Task Scheduler all work the same way. The process handles SIGINT/SIGTERM by draining, so a normal stop is clean.

Tuning

The settings that matter most for a node under load:

KeyDefaultWhat it does
maxConcurrent4Streams this machine carries at once (1–64).
idleTimeoutMs300000How long a stream may go silent before it is dropped.
maxPendingBytes262144Backpressure ceiling per stream.
logLevelinfosilent, error, warn, info, debug.

The relay itself lets a stream that has started sit silent for up to 10 minutes, because a reasoning model can think for minutes mid-answer. This machine's own idleTimeoutMs (5 minutes by default) cuts a provider socket silent for longer; raise it if you serve long-thinking models.

Changes take effect on the next aile start. Full list: Configuration.

Several machines

One account can run many nodes. They share your price sheet and your connected accounts; what differs is which box is free when a request arrives. Sign each one in with the same token: a fresh aile login on one machine signs the others out. See Install the CLI.

Callers can pin either half: x-aile-sharer selects you and lets the relay pick whichever of your machines is free, x-aile-node selects one box. In the CLI those are aile sharers --seller and --node.

Contributing without an account

Terminalbash
1aile donate

Runs the same node, unpaid, with no account. Nothing accrues and nothing can be claimed later: callers still pay the normal rate, and you are donating the earnings. A donor token is the only copy, because there is no identity to prove; lose it and the machine enrols again as a new donor.