Agent hosting & irouter
Hermes or OpenClaw on our server in Iran or abroad, or on your own; and the irouter command-line tool.
Hermes and OpenClaw are two well-known open-source agents, made by other developers, not by IranRouter. We install and prepare them for you: on a server we set up for you in Iran or abroad, or on your own server. The agent gets its own API key, and the costs come off your wallet in rial.
Where to start
- To build one: the agent wizard (coming soon). Every choice is priced in rial as you go. You can explore and price without signing in; you sign in to order.
- After ordering: in the panel, My agents. Each agent's state, cost and renewal, messengers, addresses, access, API key and events are there.
- Sizes, prices and the traffic each server includes: the agent hosting page (coming soon). We set these numbers, and that page always shows the current ones.
Where it runs
| Server | What to know |
|---|---|
| Our server in Iran | Stays connected to IranRouter even when the international internet is cut. Telegram is filtered in Iran and goes through an alternative route, so the web page or Bale is the main way to talk to it. |
| Our server abroad | Has the open internet, and Telegram works directly. If the link between abroad and Iran is cut, it cannot reach IranRouter until it is back. |
| Your own server | No server to buy: you run one line in your own server's terminal. If installing on your own server has a fee, the wizard shows it. |
- There is no city or data center to pick: just Iran or abroad.
- Each server runs one agent.
- On our servers your own model key is not accepted yet; choose the IranRouter key there.
How it gets installed
On our server
Nothing to do. We create the server, and the agent is installed and connected to IranRouter with a one-time token. You watch it live on the agent's page in the panel, and you need not keep the page open.
The first period is held on your wallet when you order and charged once the agent is ready. If the agent is never ready, it all comes back.
On your own server, with one command
- After ordering, press “Get the install command” on the agent's page in the panel.
- Run it in the server's terminal. The install needs root, and sudo is part of the command:
curl -fsSL https://iranrouter.com/v1/agent/install.sh | sudo sh -s -- ire-...You watch the install live on the same agent page.
- The ire-… token in the command works once and expires soon; the expiry is shown beside the command. The command is shown only once, and only the latest one you got works. If it has expired, get a new one.
- The server must run Ubuntu 22.04, 24.04 or 26.04, or Debian 12 or 13, with systemd, on x86-64 or arm64. IR_FORCE=1 makes it try another system, which we have not tested.
- The installer downloads only from IranRouter itself and checks every file's sha256 against our list; it takes nothing from GitHub, npm or PyPI.
- The agent's addresses point at the public IP the server installed from, and the agent's web page is served on this server's port 443 (port 80 only redirects to https). So both ports must be free and open to the outside.
On your own server, over SSH, by us
If we have switched this way on, the agent's page in the panel shows “Install over SSH, by us”. You give the server's address (a public IP or a domain name) and the user, and we connect once over SSH, run the same install as the command above, and leave. You watch it live on that page and in the agent's events.
- The key way: after you submit, you get one public key line to put in that user's ~/.ssh/authorized_keys. For a few minutes we try to connect every 30 seconds.
- The password way: you give that user's SSH password. It is used for that one connection only and kept nowhere after it. Password sign-in works only with sshd's password method; a server that accepts keyboard-interactive only must take the key way.
- After the install we remove our key ourselves and prove it: we connect again with the same key and the server must refuse us. The fingerprints of the keys left in authorized_keys are recorded in the agent's events. If the removal cannot be proven, the events say so and we ask you to remove our key line yourself; its private half is wiped on our side at once.
- Port 22 only. The user is root by default; any other user needs passwordless sudo (sudo -n).
- The first time we connect, we keep the fingerprint of the server's own key, and if it changes later we do not connect. If you reinstalled the server's operating system, tick “I reinstalled my server”.
The agent's API key
- Each agent has its own API key, made when it is installed. Its use is billed like any other key: from the plan or the wallet, as you chose in the wizard, with a daily spending cap if you set one. Once the cap is reached, the agent's key gets no answers until the next day.
- On the server, the key lives only in the agent's env file, which only root and the agent's own user can read, and it is never shown in full.
- To revoke it: “Revoke the key” on the agent's page, or sudo irouter revoke on the server. The agent stops reaching IranRouter at once, until it gets a new key (by reinstalling, or by rotating the key in managed mode).
- Deleting the agent revokes its key too.
- On your own server you may choose your own model key instead of an IranRouter key; then no IranRouter key is made for the agent. irouter has no way to put your own key in yet, so you set it in the agent's own settings yourself.
Our access after setup
| Mode | What it means |
|---|---|
| Set up and go | After setup we keep no SSH key and no management access on the server; only the agent's API key, which you can revoke any time. You update it yourself: sudo irouter update. |
| Managed by IranRouter | A small service, irouter-agentd, stays on the server. Only it connects, out to us over HTTPS, and it opens no port. It runs a fixed list only: restart, update the agent, rotate the key, fetch logs, apply settings and revoke the key. It runs no arbitrary shell command. It is a monthly add-on, and appears in the wizard and the panel only when it is offered. |
- Commands from the panel (restart, update, logs and the rest) work only in managed mode. Each waits for the server and runs with its next report.
- Log text fetched from the server is kept for one hour only.
- Switching back to “Set up and go” takes effect at once: the management service leaves the server and queued commands are cancelled. Nothing is refunded.
Emergency access
- Only if you allowed it on the agent's page. Support opens it with a stated reason, for a short time, and has only the same fixed list of commands. Every opening is recorded in the agent's events, and we tell you.
- Withdraw it any time, and an open window closes at once and its queued commands are cancelled.
- If you want our help yourself, run
sudo irouter grant-access <minutes>on the server, so support can act on the agent for the minutes you choose (we have an upper limit too). The window closes by itself on time; close it earlier from the agent's page.
Talking to the agent
The web page
- Each agent has its own web page at its own address, always behind a password. Your browser asks for a user name and password: any user name works, and the password is the web page password. After signing in, the browser stays signed in for up to 12 hours.
- Set or change the password on the agent's page in the panel (at least 12 characters, with at least 6 different ones), or on the server with sudo irouter web-password. Until one is set, the page stays shut. The password reaches the server once, and we do not keep it after that.
Telegram and Bale
- After paying, press “Connect a bot” on the agent's page and bring your own bot's token from BotFather. You get a code to send the bot from your own account; from then on, the bot answers that account only.
- The token reaches the agent's server once, sealed; we do not keep it and never show it again.
- On Telegram, if the agent's page offers “Make the bot for me”, open the link or the QR code on your phone and just tap Create; the bot is made in your own name.
- If your own server cannot reach Telegram without a proxy, give one when you connect the bot.
- Before you pay, the wizard shows the warning for each combination of server and messenger. The web page is always there.
The agent's addresses
- Each agent gets two addresses under our agents' domain: one for the web page and one for webhooks. You pick the name in the wizard (lowercase letters, digits and hyphens), or leave it empty and we make one up.
- Their HTTPS certificate is issued and renewed automatically once the server is connected.
- Extra addresses under the agent's main name can be bought; the price is in the panel. One bought mid-period is charged for what is left of that period, then renews with the server. Releasing one takes effect from the next renewal, and nothing is refunded for the rest of the period.
- A released name is not given to anyone else for a while.
Cost, renewal and traffic
- Monthly: one month paid in advance, renewed automatically while your balance allows. Hourly: priced per hour, with a few hours paid in advance from the wallet at a time. Monthly add-ons on an hourly server cost 1/720 of the month for each hour.
- It renews at the price of the order; later price changes do not touch this agent.
- The agent's API use is separate, billed like any other key, from the plan or the wallet.
- On your own server there is no server cost; only add-ons (such as managed mode or an extra address) are billed monthly. If the wallet cannot renew them, the add-ons end and nothing of yours on the server is touched.
- The monthly traffic each server size includes, domestic and international separately, is in the price table. We tell you as use reaches set shares of it. If you need more, buy a traffic pack on the agent's page; it is paid from the wallet, for the current traffic period.
- When traffic runs out, depending on the place it is one of two things, and the wizard says which before you pay: each extra GB is charged to the wallet, or after a warning and a grace period the server is powered off until you buy a pack. Either way, if nothing pays for it, the “wallet runs out” road below follows. The agent's data stays on the server.
If your wallet runs out
- Before it is due, we tell you with a panel notification and, depending on our settings, by SMS or e-mail.
- If the renewal is not paid, the agent stays on for a grace period. Top up within it, and the period is paid and nothing stops.
- After the grace period, the server is powered off. Its data stays, and you are not charged for the hours it is off. Top up, and a fresh period is paid from that moment and the server starts again.
- If it is still not topped up, the server and all its data are deleted after a waiting period we set, with a warning first.
Deleting an agent
- “Delete the agent” in the panel powers the server off at once, and it is wiped with all its data after a waiting period; the date shows on the agent's page. Until then you can cancel, and the server starts again. You are not charged in between.
- Paid, unused time is not refunded on deletion.
- An agent that was never ready is deleted at once, and the money held for it comes back in full.
- Deletion revokes the agent's API key and releases its addresses.
- On your own server nothing is powered off: the agent keeps running with its key until the deletion day. To cut it off now, revoke its key. On the day, its key is revoked and its addresses released.
- On your own server, the software stays there; remove it with
sudo irouter uninstall.
The irouter CLI
irouter is a single binary, and its terminal text is in English. It does two jobs: on an agent's server, installing and looking after the agent; on your own computer, running Claude Code, Codex, Hermes or OpenClaw with an IranRouter key.
On your own computer
curl -fsSL https://iranrouter.com/v1/agent/install.sh | sh irouter login --api https://iranrouter.com irouter claude
- The installer runs on Linux and macOS and puts irouter in ~/.local/bin; if that folder is not on your PATH, it says what to add. On Windows, download the file directly:
https://iranrouter.com/v1/agent/cli/irouter-windows-x64.exe - irouter login shows an address and an eight-letter code (like ABCD-EFGH), and a QR code for your phone in the terminal. Open the address, or go to Approve an irouter sign-in in the panel and enter the code. There you pick the workspace, the key's name, where it is paid from, a daily spending cap and the key's lifetime. Approving creates an API key just for this machine and hands it to that terminal only; you copy no key by hand.
- Approve only a code you yourself just saw in a terminal. If someone sent you a code, don't approve it. A code is valid for a few minutes; if it expires, run irouter login again.
- The key is saved in irouter/credentials.json under your user's config folder, readable by you only. irouter logout removes it from this machine, but the key itself remains; revoke it on the API keys page if you no longer need it.
- irouter claude, irouter codex, irouter hermes and irouter openclaw start that tool with IranRouter's address and key for that one run, and pass any further arguments to it untouched. The tool itself must already be installed.
On an agent's server
Run these with sudo:
| Command | What it does |
|---|---|
irouter enroll <token> | What the panel's install command runs: it enrolls the server and installs its agent. You rarely need it yourself. --replace replaces the server's current enrollment. |
irouter setup | Installs and configures again the agent this server enrolled for. --features a,b sets up other features than the ones ordered, --accept-risk accepts OpenClaw's own risk notice, and --force installs below the agent's minimum size. Another agent cannot go on this server: create a new agent in the panel for it. |
irouter status | What runs here and how it is: the agent and its version, the access mode, the key's last four characters, the services, health, the names and certificate, and the web password. |
irouter doctor | Checks what stands between this server and a working agent: reaching our API, disk space, the services, the agent's health, the key, the certificate, port 443 and the web password, with the fix beside each failure. |
irouter update | Installs the version IranRouter offers now. |
irouter web-password | A new password for the agent's web page; --generate makes one and prints it once. Sessions on the old password end at once. |
irouter grant-access <minutes> | Lets support act on this agent for the minutes you choose: the same fixed list of commands, no shell. |
irouter revoke | Ends IranRouter's part on this server: the key is revoked and removed, the server no longer talks to us, and managed mode and any emergency window end. The agent stays installed but can no longer reach models. |
irouter uninstall | Removes the agent and our services and revokes its key. The agent's own data (its memory and chats) stays, unless --purge, which removes it and the agent's user too. irouter itself stays and prints how to remove it. |
irouter version | irouter's version. |
irouter agentd and irouter edge are run by their own systemd services; you need not run them by hand. If something does not work, run irouter doctor first, and send its output with your support ticket.