Skip to main content
Betadocs
DocsStatusSupportPricing
  • Introduction
    • Introduction to Webgune
    • How Webgune works
    • Creating an account
    • Creating your first project
    • Exploring the dashboard
  • Deployment

    • Deploying from GitHub
    • Deploying a Docker image
    • How builds work
    • Deployments and rollback
    • Environment variables
    • Custom start command
    • Health check
    • Database migrations

    Web apps

    • Web applications
      • Supported frameworks
      • Next.js
      • React / Vite
      • Node.js
      • Python
      • PHP
      • Go

    Bots & workers

    • Discord bots
    • Workers

    Docker

    • Docker
      • Writing a Dockerfile
      • Public Docker images

    Databases

    • Databases
      • PostgreSQL
      • MySQL
      • MariaDB
      • MongoDB
      • Redis

    Observability

    • Logs and monitoring
    • Web terminal

    Scaling

    • Availability and scaling
    • Persistent volumes
    • Backups and restore
    • Sleep mode

    Platform

    • One microVM per service
    • Network and isolation
    • Platform security
    • Deploying a template
      • Template catalog
    • Free subdomains
    • Custom domains
    • Buying a domain
    • Hosting DNS for a domain bought elsewhere
    • Managing your DNS records
    • SSL certificates
    • Redirects
    • Shared projects
      • Roles and permissions
    • Real-time collaboration
    • Continuous deployment
      • The kx712.yml file
    • VS Code extension
    • Plans and pricing
    • Payments and invoices
    • Account or per-project subscription
    • API reference
    • API keys
    • Webgune CLI
    • MCP server
    • JavaScript / TypeScript SDK
    • Support tickets
    • Status page
    • AI assistant
    • FAQ
    • Limits and resources
    • Account security
    • Best practices
    • Troubleshooting

Getting started

How Webgune works

Open as Markdown

This page follows a deployment from end to end: from the push to the page shown to a visitor, then what Webgune does when something goes down. Each part links to the page that details it.

From code to a live service

  1. 01Buildisolated machine, 1 h at most
  2. 02Imageproject registry, unique ID
  3. 03Startone micro-VM per instance
  4. 04Checkthe port accepts a connection
  5. 05Switchtraffic moves to the new version
  • Not ready within 15 min, or crash loop : the previous image is put back into service
From push to live

1. The build

The builder clones the repository (10 minutes at most), detects the language and framework, installs dependencies from your lock file, then builds the application. If you chose Dockerfile mode, it builds the repository's Dockerfile instead.

The build runs in its own isolated machine, without privileges. It has Internet access to download dependencies and no access to any internal service: neither your database nor your API. It is stopped after one hour. An already built Docker image skips this step (How builds work).

2. The image

The build's result is an image. It gets a unique identifier, taken from the commit, and joins the project's registry. The project's Registry tab lists each service's images. One of these images is put back online during a rollback, with no new build.

3. Startup

Each instance of the service starts in its own lightweight virtual machine, with its own Linux kernel. It sees neither the server that hosts it nor other customers' services. Three cases stay in a standard container, including services that mount a persistent volume (One microVM per service).

4. The check

Webgune considers an instance ready when its port accepts a connection. The first attempt happens 5 seconds after startup, then every 10 seconds. The deployment succeeds when all instances run the new version and are ready.

This check does not know your application's state: a port opened before initialization finishes counts as ready. Connect to the database before opening the port (Health check).

5. The switchover

For a site or an API, the new instance starts while the old one still serves visitors. Traffic switches over when the new one is ready. The old one then receives SIGTERM and has 30 seconds to finish its in-flight requests.

For a bot or a worker, the old instance stops completely before the new one starts. The pause lasts a few seconds.

If the new version does not start

Webgune puts the previous image back in service in two cases: the new version crashes in a loop at startup, or it is not ready after 15 minutes. During all that time, a site or an API keeps responding with the old version. The deployment is marked as failed and the panel gives the reason.

If your application changed its database schema before failing, the old version may no longer be able to read it. This case is covered in Database migrations.

Service types

TypeExamplesInstancesUpdateEntry point
Siteshowcase site, Next.js, portfolio1 at rest, more depending on load; always 1 in "Simple service"no downtimedomain name
APIREST backend, GraphQL1 at rest, more depending on load; always 1 in "Simple service"no downtimedomain name
BotDiscord botalways 1 (one per shard)the old one stops firstnone, the bot connects on its own
Workersending email, processing queuesalways 1the old one stops firstnone
DatabasePostgreSQL, MySQL, MariaDB, MongoDB, Redis1maintenance windowinternal address in the project

A bot never has two instances: two connections to Discord with the same token get disconnected or answer twice. The pause during its update is therefore intended.

A site or an API that mounts a persistent volume also runs as a single instance, because a volume attaches to only one instance at a time.

The path of a visit

  1. The visitor enters the site's address.
  2. The request reaches the entry point, the only server visible from the Internet. Its firewall lets through only the public ports.
  3. The router reads the domain name, finds the matching service and terminates the HTTPS connection with the domain's certificate.
  4. The request reaches one of the service's instances, which sends back the response.

Internet

  • Visitorbrowser or app
HTTPS, public ports only

Entry point

  • Firewallonly server visible from the Internet
  • Routerreads the domain, terminates HTTPS
encrypted tunnel

Webgune servers

  • Instance 1service micro-VM
  • Instance 2service micro-VM
The path of a visit

Between the entry point and the servers, traffic travels through an encrypted tunnel. The visitor's real address is passed to your application in the X-Forwarded-For header.

With several instances, two successive requests from the same visitor do not necessarily reach the same one. Sessions kept in memory therefore do not work: put them in the database or in Redis.

A service's resources

Each instance receives your plan's CPU and memory, with a cap of 2 CPUs and 4 GB. A quarter of the CPU and half of the memory are reserved for it, even when the server is busy. It rises to its maximum as soon as it needs to.

At the CPU maximum, the service slows down. At the memory maximum, it is stopped with code 137 then restarted (Limits and resources).

When something goes down

EventWhat Webgune does
The service crashesIt is restarted. If it crashes in a loop, the delay between two restarts increases
The service crashes in a loop after a deploymentWebgune tries a repair based on the cause (wrong port, insufficient memory, missing variable), then puts back the last healthy image. As a last resort, the service is stopped and marked as failing
The service exceeds its memoryIt is stopped (code 137) then restarted
The service exceeds its CPUIt slows down, without being stopped
A server goes downIts services are restarted on another server. A service with several instances keeps responding in the meantime
The new version does not startThe previous version is put back in service

A service's availability mode is set in Availability and scaling.

Sleep mode

A staging or development service with no visits is stopped after a delay that depends on your plan, from 15 minutes to 8 hours. The next visit wakes it in a few seconds. Production services, bots, workers and databases do not go to sleep (Sleep mode).

What remains your responsibility

  • An up-to-date lock file in the repository.
  • An application that listens on PORT and 0.0.0.0, and opens its port only once ready (Health check).
  • Database migrations compatible with the previous version.
  • No data to keep on the service disk: a volume or a database.
  • Secrets in environment variables, never in the repository.

The full list is in Best practices. If something goes wrong, start with Troubleshooting.

Updated on November 20, 2026

Introduction to WebgunePreviousCreating an accountNext

On this page

From code to a live service1. The build2. The image3. Startup4. The check5. The switchoverIf the new version does not startService typesThe path of a visitA service's resourcesWhen something goes downSleep modeWhat remains your responsibility
© 2026 WebguneBack to the site