·10 min read
Renode Starter Templates: Deploy Node and Python Apps With No Setup
A managed host has a narrow contract with your code. If the app meets it, "deploy" is a button. If it does not, you spend an evening reading console output. I wrote six public starter repos for RE:NODE, renode-template-static-site, -express, -nextjs, -fastapi, -telegram-bot and -discord-bot, so that the contract is already met on the first commit. This post goes through what is in them and why.
- Role
- Creator
- Period
- Oct 2026
- Status
- Six public template repos, one initial commit each (14 Oct 2026); not deployed by me for this post
- Stack
- Node 22, Express, Next.js, Python 3.12, FastAPI, discord.js, python-telegram-bot
The challenge
I built these for the hosting platform I worked on as a full-stack developer at Renode. The people who rent a server there are often not infrastructure people. They connect a GitHub repository and press start, and the platform has to run whatever is in it with no custom startup command, in a container where only one port is reachable from outside and only /home/container persists.
The hard part of a starter is not writing a hello-world. It is making every default agree with the platform, so the first deploy works and the first failure explains itself. A starter that binds to localhost, or reads a token that is not there, produces an evening of silent debugging, which is exactly what the template is supposed to prevent.
My responsibility
- Defining the four-rule contract from how the platform actually runs servers.
- Writing all six repos: the code,
package.jsonandrequirements.txt, the pinned runtime files,.gitignoreand.env.example. - Choosing, per stack, how the port is read and how the app starts.
- Writing the READMEs and the
AGENTS.mdandCLAUDE.mdnotes that tell a human or an AI tool the same rules. - Deciding what each template does when configuration is missing.
How I approached it
The contract
Every README in the set says the template "already follows every Renode rule". Reading the files, those rules come down to a few things:
- Listen on
0.0.0.0on the port inSERVER_PORT. It is the one port the server is given, and no other port is reachable from outside. - Expose a start command the platform can run without arguments:
npm run startfor Node, the file named on the Startup tab (app.pyby default) for Python. - Pin the runtime version in a file the repo carries.
- Keep secrets out of the repository.
Everything below is one of these four, repeated per stack.
Port from the environment
Express:
// The panel sets SERVER_PORT (and PORT) to this server's port. It is the only
// port reachable from outside, and 0.0.0.0 is the only address that is.
const port = Number(process.env.SERVER_PORT || process.env.PORT || 3000);
app.listen(port, '0.0.0.0', () => {
console.log(`Listening on 0.0.0.0:${port}`);
});The fallbacks matter for local work: without SERVER_PORT it uses PORT, then 3000, so npm run dev just works on a laptop. Binding 0.0.0.0 instead of localhost is the part people most often get wrong, because a process bound to loopback inside a container is unreachable from outside it.
FastAPI does the same thing in Python, and it puts uvicorn inside app.py rather than on a command line:
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("SERVER_PORT", os.environ.get("PORT", "8000"))))The docstring explains the choice: the Python egg runs the file named on the Startup tab, app.py by default, after installing requirements.txt. Keeping the bind address and port in the code means there is no startup command to get wrong.
Why the Next.js start script builds first
renode-template-nextjs 4e140b9 (Oct 2026) is where the contract bends most. The panel runs npm run start and nothing else, but next start without a build fails. So the script does both:
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next build && next start -H 0.0.0.0 -p $SERVER_PORT"
}The cost is plain: the first start runs npm install and next build on the server, which the README says takes a minute or two. The alternative was a separate build step for the user to configure, and that is the kind of setup these templates exist to remove. I also wrote the reason into the AGENTS.md of that repo, so an AI tool or a person editing the file sees why the start script must stay as it is: "next start without a build fails". For Express there is nothing to build, and start is just node server.js.
Why a missing token stops the process
Both bot templates check their token before anything else. In renode-template-telegram-bot f4eb7ee and renode-template-discord-bot b2ea283 (both Oct 2026) the code exits with a message that names the variable and the fix:
if (!token) {
console.error('DISCORD_TOKEN is not set. Upload a .env with DISCORD_TOKEN=... through the Files tab.');
process.exit(1);
}The Telegram version prints the same kind of message to stderr and calls sys.exit(1). The decision is that a first-time user will look at the console, so the console should say what to do. A bot that starts and quietly never logs in looks like a platform fault, and the user would blame the host, not the missing file.
Bots do not need a port
The two bot templates show where the contract bends. The Telegram bot uses long polling, so there is no port at all:
# Long polling: the bot asks Telegram for messages, so it needs no port.
application.run_polling(allowed_updates=Update.ALL_TYPES)The Discord template adds an optional health endpoint, only when the server has a port:
if (process.env.SERVER_PORT) {
http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify({ ok: true, ready: client.isReady() }));
}).listen(Number(process.env.SERVER_PORT), '0.0.0.0');
}If the server has a port, an uptime monitor gets something to ask. If not, nothing listens. The Discord client also asks only for the Guilds intent, which is enough for the /ping slash command it registers, so the template does not require a privileged intent switched on in the Discord developer portal. The Express template has GET /health and the Next.js one has app/api/health/route.js for the same reason.
Pinned runtimes
The Node templates carry a .nvmrc containing 22 and "engines": { "node": ">=22" }. The Python templates carry .python-version containing 3.12, and requirements.txt with exact versions, for example fastapi==0.143.0, uvicorn==0.54.0 and python-dotenv==1.2.4. The READMEs tie these to the runtime version you pick when ordering ("Nodejs 22", "Python 3.12"), so the version that runs on the server is the one you developed against. The Node starters also commit package-lock.json.
Secrets stay out of git
Each template ships a .env.example with a comment saying to copy it to .env on the server through the Files tab. .gitignore excludes .env and .env.* but keeps the example:
.env
.env.*
!.env.exampleThe code reads that file without extra dependencies in Node, using the built-in loader:
if (fs.existsSync('.env')) {
process.loadEnvFile('.env');
}Python templates use python-dotenv's load_dotenv(). Both are no-ops if the file is missing, so values set as Startup variables on the panel work too.
Static sites have no runtime at all
renode-template-static-site is plain HTML and CSS for a Web Hosting server. index.html sits at the repository root, which is what the web host serves, and there is nothing to build or start. The README warns that everything in the web root can be downloaded by a visitor, so no secrets belong there.
| Template | Runtime | How it starts | Port |
|---|---|---|---|
static-site | none | nothing to start, index.html at the root | none, served by the web host |
express | Node 22 | npm run start, which runs node server.js | SERVER_PORT, then PORT, then 3000 |
nextjs | Node 22 | npm run start, which builds and then serves | $SERVER_PORT in the start script |
fastapi | Python 3.12 | app.py, with uvicorn inside | SERVER_PORT, then PORT, then 8000 |
telegram-bot | Python 3.12 | app.py | none, long polling |
discord-bot | Node 22 | index.js | SERVER_PORT, only for the optional health endpoint |
Notes that a tool may rewrite, and a person may not lose
Each template has AGENTS.md, CLAUDE.md and a .renode/ folder. The notes repeat the contract: listen on 0.0.0.0 on SERVER_PORT, keep the start script, only /home/container persists, no root, no apt, no Docker. One line I stand behind: "Fix the code, not the startup command or the Docker image."
The design point is the markers. Everything between <!-- renode:start --> and <!-- renode:end --> may be replaced by the panel when "Keep AI context in the repository" is on, and the file says so, with a line that the owner's own notes go outside the markers. A generated block and hand-written notes can then live in one file without the generator ever deleting someone's work. The .renode/README.md states that nothing in that folder is read at server start and nothing secret is written there.
public starter repos
rules in the contract
deploy steps
All six READMEs share the same five deploy steps:
- 01
Create a repository
from the template
- 02
Order a server
matching plan and runtime version
- 03
Connect GitHub
on the GitHub tab, pick the repo and main
- 04
Upload .env
only if needed
- 05
Start
the console shows the install, then the app
0.0.0.0, read SERVER_PORT, make npm run start (or app.py) the real entry point, and pin the runtime version.Project journey
The git history of these repos is short, and I would rather say that than dress it up: each has a single feat: initial template commit on 14 October 2026. The journey is in the design decisions above, not in a long commit log.
Oct 2026
Express and static site
contract: SERVER_PORT, 0.0.0.0, no secrets in git (6f8c163, e920e0b)
Oct 2026
Next.js
start script builds before serving (4e140b9)
Oct 2026
FastAPI
uvicorn inside app.py, exact pinned requirements (a25951c)
Oct 2026
Telegram and Discord bots
clear exit on missing token, optional health endpoint (f4eb7ee, b2ea283)
Beyond the launch
There is nothing after the initial commits to report: no tags, no releases and no follow-up fixes in any of the six repos, and none has a CI workflow. I would not claim a maintenance history that is not there.
What I would add if I continued: a CI job per template that boots it with SERVER_PORT set and checks the health endpoint, in the way my yolk images are tested. Today the contract is kept by the templates being small, not by an automated check.
The outcome
Six public repos exist that a new Renode user can create a repository from: a static site, Express, Next.js, FastAPI, a Telegram bot and a Discord bot. Each has a pinned runtime, a start command that needs no arguments, a .gitignore that keeps .env out, and notes for people and AI tools that state the same rules. I make no claim about how many people used them.
Evidence
- Repositories: renode-template-static-site, renode-template-express, renode-template-nextjs, renode-template-fastapi, renode-template-telegram-bot, renode-template-discord-bot
- Commits:
6f8c163,e920e0b,4e140b9,a25951c,f4eb7ee,b2ea283, all dated 14 Oct 2026 - Files:
express/server.js,fastapi/app.py,telegram-bot/app.py,discord-bot/index.js,nextjs/package.json,nextjs/AGENTS.md, and.nvmrc,.python-version,requirements.txt,.env.example,.gitignorein each template - Docs: Next.js and Docker
- Not verified by me: the "a minute or two" first build time and the panel behavior (the connect flow, the marker rewriting) come from the READMEs. I did not deploy these templates for this post.
#renode#hosting#nodejs#python
Keep reading
Have a project in mind?