Code from an AI
Claude Code: publish a site without leaving the terminal
In short
To publish projects straight from Claude Code, add Netrun as an MCP server with one terminal command — it is ready to copy on the setup page, with your access key already in it. After that, ask the agent to publish the project: it packs the folder, uploads it, waits for the build and returns an HTTPS address. The same chat ships updates, reads logs and restarts the app. The command is added once and works in every folder, and the agent cannot pay or delete projects.
Claude Code lives in the terminal and does almost everything itself: writes code, installs dependencies, starts the project. It always ends the same way though — with a localhost address that opens for you alone. What normally follows is a separate life: zip an archive, open a hosting dashboard, remember where environment variables live.
Netrun connects to Claude Code as an external service — one command, once, for every project. After that “publish this site” is as ordinary a request as “fix the styles”: the agent uploads the folder, waits for the build and names the address. Below are the steps, and what the agent will not do.
Create an access key#
Sign in to the Netrun dashboard, open the “MCP” section and create a personal access key. It is shown once, so copy it immediately. The key stands in for a password for your editor and can be revoked in the same section at any time; projects keep running.
Add Netrun with one command#
On the setup page pick Claude Code — there is a ready-made command with your key already in it, so you only copy and run it in a terminal. The command registers the server at the user level, which means every folder at once, so there is nothing to repeat per project. The only requirement is Node.js installed.
Make sure the site listens on the right port#
Locally an app usually listens on localhost and a port written into the code. On a server the platform assigns the port, so read it from the PORT environment variable and listen on 0.0.0.0. It is a one-line change and Claude Code makes it on request in seconds. A hard-coded port is the number one reason a project builds but the page stays blank.
Ask for a publish#
Write in the chat: “publish this site to Netrun”. The agent packs the folder, leaving out service directories such as node_modules, venv, dist and build, uploads it and follows the build. The platform detects the stack on its own — Python, Node.js, Go, Rust, PHP, static HTML, a Dockerfile or docker-compose — and builds it. At the end the agent returns a public address that already serves HTTPS.
Hand over secrets if the code needs them#
If the code reads keys from environment variables, the agent stops and asks you for the values instead of making them up. Answer in the chat: the values are stored encrypted and the project is rebuilt with them. The same goes for a database address and API keys for paid services.
Update and debug in the same place#
Every next change ships with “update the project” — the address stays the same, so nobody has to be told a new link. If something breaks, ask to check the logs: the agent reads the last lines of output and names the cause. It can also start, stop and restart projects, list them and report the account state; payment, renewal and deletion go through the dashboard only.
The terminal has already become the place where the whole project is written — it makes sense for the last step to happen there too. For a website the free plan carries you a long way: it sleeps while idle and wakes up by itself when someone opens the link. A background service or a bot needs the Pro plan with round-the-clock operation. The setup command and the list of agent actions are on the publish-from-your-editor page, and you can inspect a project for free first with the project check.
Common questions
Do I have to install Netrun for every project?
No. The setup command registers the server at the user level, so it shows up in every folder where you run Claude Code. There is nothing to repeat for a new project: open the folder and ask for a publish.
What exactly gets uploaded?
The contents of the project folder without service directories: the virtual environment, node_modules, build folders and caches stay with you. The rules match what the platform applies to a normal archive upload, and your .gitignore is respected too. Dependencies are installed again on the server during the build.
Can the agent delete a project or spend money?
No. Deleting a project, deleting files from persistent storage, paying and renewing a plan are closed for the key at the platform level — such a request is rejected even if the agent sends it. Everything irreversible or financial is done by you in the dashboard.
Does this work if the project was already published from the dashboard?
Yes. The agent sees the list of your projects and can update any of them: ask it to ship a new version into a specific project and the address is kept. The two ways are interchangeable — some releases can go from the editor, others from the dashboard.
Why did the page not open after publishing?
Usually the app listens in the wrong place: the port is written into the code, or it binds to localhost instead of 0.0.0.0. Ask the agent to read the logs and fix the startup — both changes are one line. The second most common reason is the app crashing at startup, which also shows up in the first lines of the logs.
Where is the access key stored?
In your Claude Code config on your machine, as an environment variable for that server. Netrun keeps only its fingerprint and cannot show the key again. If a key leaks, revoke it in the dashboard and create a new one.
Can I publish straight from Cursor, Claude Code or ChatGPT?
Yes. The dashboard has an “MCP” section: create an access key there and connect it to Cursor, Claude Code, Codex or any other AI editor — with one button or one command. After that you just tell the agent “publish this bot to Netrun”: it uploads the code folder, asks you for the token if the code needs one, waits for the build and gives you the link. “I fixed the greeting — update it” ships a new version, “why is the bot silent?” shows the logs. The agent cannot pay, renew or delete projects — that stays in the dashboard.
Which languages and technologies are supported?
Python, Node.js, Go, Rust, Ruby, PHP, Java, .NET, Deno, Bun, Elixir, static sites and bash scripts. You can bring your own Dockerfile or docker-compose, but more often the stack is detected from your code automatically.
Where can I see the logs and status of my project?
The project page shows the status, the logs and the event history — together they show what is happening with the project right now. The log view also reaches further back: scroll up and earlier lines load on their own.
How do I update the code of a project that is already published?
Open the project and upload a new version or update it from GitHub. The link stays the same, and your data is kept as long as it lives in persistent storage — the /data folder or a volume from your compose file.