How do serverless functions work on deploybase?
Updated
Serverless functions on deploybase run alongside your static site but are served from their own hostname — a function named scan in a project called eu-check is reachable at scan-eu-check.fn.deploybase.eu, while the site itself lives at eu-check.sites.deploybase.eu. You write the function code in a functions/ directory in your repository, and it is bundled and deployed automatically on push. Functions are currently in beta and available on paid plans.
The deployment model: one push, two outputs
The key thing to understand is that a site and its functions are deployed together but published separately. When you push, deploybase builds the static output and bundles the functions in the same run, then puts each on its own link.
The documented example build (eu-check, a website with one function, 26 September 2026) shows the sequence:
| Stage | Time | Detail |
|---|---|---|
| Queued | 1.7 s | waited in the build queue |
| Cloned | 0.0 s | repository fetched |
| Built | 13.6 s | tsc --noEmit && vite build, 5 modules transformed |
| Uploaded + bundled | 7.4 s | 12 files uploaded, 1 function bundled |
| Live | 32 s after push | site and function both reachable |
Output was 12 files / 181.7 KB, framework vite with npm, deployment ba65d07. So the practical expectation is: a small site with one function goes live in roughly half a minute, and the function is part of that same deployment rather than a separate service you configure.
Where the code lives and how it gets a URL
- Put function code in the
functions/directory of your repository. The docs state plainly: "code infunctions/runs beside it." - Naming follows a fixed pattern:
<function-name>-<project-name>.fn.deploybase.eu. The example functionscanin projecteu-checkbecomesscan-eu-check.fn.deploybase.eu. - Your static site keeps its own address:
<project-name>.sites.deploybase.eu.
This separation matters for how you wire things up. Because the function is on a different origin from the site, calls from your frontend go to the function's hostname rather than a relative /api/... path. Plan your fetch URLs and any CORS settings around that.
Which deployment routes support functions
deploybase offers three ways to publish, and they are not equivalent for functions:
- Push from Git — the documented path for functions. Connect GitHub, GitLab, Bitbucket, Codeberg, or Forgejo, push, and every push updates the site while
functions/is bundled alongside it. Every branch also gets a preview link. - Drag and drop — upload a folder containing
index.html(up to 250 MiB on the free plan). This is described as "no build, no repository," so there is no repositoryfunctions/directory to bundle from. - Ask your AI agent — Claude, Cursor, or any MCP client can set up and deploy a project, but this route "needs a Git repository for now."
If functions are the point of your project, the Git route is the one the documentation supports.
Current stage and access conditions
Two constraints are stated directly in the source material and are worth checking before you plan around them:
- Beta. Functions are labelled beta in the build output and in the deployment descriptions.
- Paid plans only. "Functions are in beta on paid plans." The site advertises "free to start" and flat pricing in euros, with a pricing page at
https://deploybase.eu/pricing— but the free tier is not described as including functions.
So the working assumption is: you can start a static site for free, but you need a paid plan to use functions, and the feature may change while in beta.
What this means in practice
If you want a static site plus a small amount of server-side logic — a form handler, a scan endpoint, a webhook receiver — deploybase's model is: keep the function in functions/, push, and call it at its own fn.deploybase.eu hostname. You get branch previews and instant rollback on the same deployment, and the whole chain is named and traceable in the build log.
If you need functions on a free plan, or you want to deploy functions without a Git repository, the current documentation does not describe a supported path. In those cases, either move to a paid plan and a Git-connected project, or look at the drag-and-drop route for static-only sites.