01 / 12 Deploys, back to the chapter index

01Deploys

Six ways in.
One immutable build out.

Push to GitHub, GitLab or Bitbucket, run any Docker image, build your Dockerfile or ship a folder with k64 up. Every source goes through the same build, the same health checks and the same switch to live.

  1. 01Source
  2. 02Build
  3. 03Package
  4. 04Check
  5. 05Live
$ git push origin mainTo github.com:nibble-labs/cat-cafe.git  9c1e2b4..a3f9c21  main -> maink64     push received · cat-cafe · productiondetect  Node.js 22 from package.jsoninstall npm ci · 412 packages · cache reusedbuild   npm run build  done in 28.8 spackage #43 · sha256:7f3a…c2e1 · 41 MBcheck   GET /health 200 · 3 of 3 passedswitch  traffic → #43 · #42 drainedlive    https://cat-cafe.k64.app
Livecat-cafe.k64.app41.6 s

Detected without config

  • JSNode.js
  • BNBun
  • DNDeno
  • PYPython
  • GOGo
  • RBRuby
  • RSRust
  • PHPHP
  • JVJava
  • KTKotlin
  • EXElixir
  • NT.NET
  • STStatic sites
  • DFDockerfile
~40 s
median build for a typical Node app
€0
for builds, no build minutes, cache included
15+
languages detected, or your Dockerfile as written
6
sources, one pipeline, one deployment format

Service typesWeb servicesPrivate servicesWorkersCron jobsOne-off commandsStatic sites

02Databases

Four engines.
One click each.

PostgreSQL, MySQL, Valkey and FerretDB run next to your services, on the private network, in the same region. k64 sets the connection string on the services that use it and backs every database up daily.

  • Point-in-time recovery
  • Preview copies, if you opt in
  • Daily backups

Private by default. A database has no public address, only a name on *.k64.internal that your services resolve.

PGpostgres· cat-cafe · productionLive
$ k64 db add postgrescreate   PostgreSQL 17 · cdg · Parisprivate  postgres.k64.internal:5432linked   DATABASE_URL → web, workerbackups  daily · point-in-time recovery on Pro and Enterpriseready    postgres is live
Host
postgres.k64.internal
Port
5432
Variable
DATABASE_URL
Backups
Daily, encrypted
Connections18 of 100
Storage3.2 GB
Queries640 / s
postgres://cafe:••••@postgres.k64.internal:5432/cafe

Point-in-time recovery

Restore to any minute

Restore to Wed 14 Oct, 09:003 days ago · base: the daily backup of 14 Oct at 02:00, then the changes up to 09:00
  1. Base backup fetched
  2. Changes replayed
  3. postgres restored to that minute

For PostgreSQL and MySQL. Hobby keeps daily backups, without point-in-time recovery.

Copies for testing

Copy a Postgres or MySQL database from a snapshot in a few minutes, to try a migration on real data shapes. Writes stay in the copy. Preview environments, on Pro and Enterprise, start with empty databases, or with a copy if you opt in.

k64 db branch postgres-pr-128 --from postgres

Volumes

Persistent disks for uploads, models or a game world, backed up every day.

  • HobbyUp to 1 GB
  • ProUp to 1 TB per volume
  • EnterpriseCustom

€0.15 per GB-month · backups €0.05 per GB-month · prorated hourly, excl. VAT

03Preview environments

A preview environment
for every pull request.

Open a pull request and a full copy of your app comes up on its own URL, with its own Postgres or MySQL database, empty by default or copied from a snapshot if you opt in. Review the change running, merge, and the preview environment cleans up after itself.

mainfeat/weekend-menuPreview · pr-128waiting for the buildpostgres copy · pending#44 live
Add the weekend menu#128 · feat/weekend-menu → main
Open
  • BuildNode.js 22 · deployment built, 41 MB
  • Databasepostgres-pr-128 · copy of staging, 09:00 snapshot
  • URLpr-128.cat-cafe.k64.app
  • Variablesfrom staging, sealed ones not copied

k64 commented on #128Live at pr-128.cat-cafe.k64.app

  • Own URLpr-128.cat-cafe.k64.app, with TLS
  • Own databaseEmpty Postgres or MySQL, or a copy from a snapshot if you opt in
  • Cleans upDeleted when the pull request merges or closes
  • PlansPro and Enterprise

04Rewind

Rewind any deployment
in seconds.

Every deployment is an immutable, numbered build, kept in your project's deployment history. Pick an earlier one and traffic moves back to it in a few seconds, with no rebuild. Databases and volumes stay as they are, and newer deployments stay in the history.

Deployment historyweb · cat-cafe · production
cat-cafe.k64.app
#42
Opening hours on the home page9c1e2b4 · main · 1 h ago · 41 MB · immutable
k64 rewind 42
LiveTraffic on #42 in 2.1 s · no rebuild · #43 stays in the history
How far backPro keeps the last 90 · 43 of 43 here
  • HobbyRewind to the last 10 deployments
  • ProRewind to the last 90 deployments
  • EnterpriseRewind to any deployment
  • From anywhereThe Rewind button, k64 rewind or the API

05Auto-restart

Crashes restart
on their own.

Health checks watch every service. A crashed service restarts with exponential backoff, up to 9 times in 10 minutes. After that the service is marked crashed and you get an alert.

Restarts
Exponential backoff, up to 9 in 10 minutes
Then
Marked crashed, with an alert by email, Slack, Discord or webhook
Deploys
A new deployment takes traffic only after its health checks pass
workercat-cafe · node worker.js
Healthy
9 of 9 restarts left
    t + 0:00

    Zero-downtime deploys

    Traffic moves only to a healthy deployment

    Deployment #43 serves every request while #44 starts. Traffic moves once #44 passes 3 of 3 health checks, then #43 drains its open connections.

    06Scaling

    Scale out, scale up.
    Or scale to zero.

    Run 1 to 50 replicas per service and let the autoscaler follow CPU, memory or requests per second. Give each replica up to 32 vCPU and 64 GB RAM on Pro. Turn on scale to zero and an idle service goes down to zero replicas after 15 minutes, then wakes up on the next request in a few seconds.

    2,400 req/s

    Replica sizevCPU · GB

    Scale on

    to zero after 15:00 idle
    k64 scale web --autoscale 1-50
    Replicas14/ 50
    CPU each69%
    Cost now€0.58/ h
    Steady
    target 70% CPU per replica≈ €420 a month at this rate, excl. VAT
    • Horizontal1 to 50 replicas per service, behind one URL
    • VerticalUp to 32 vCPU / 64 GB RAM per replica on Pro
    • BillingPer second: €0.00000761 per vCPU, €0.00000381 per GB
    • Scale to zeroA service scaled to zero pays only for its storage

    07Regions

    Hosted in Paris.
    More of the EU soon.

    Every service runs in Paris today, and new projects start there. Frankfurt, Milan, Zaragoza, Stockholm and Dublin are next, all in the European Union. Apps, databases, volumes, backups and logs are stored and processed only in the EU.

    48.8566° N · 2.3522° E

    EU West · primary

    cdg · Paris

    Live, and the default for every new project. Services, databases, volumes, backups and logs run here.

    k64 scale web --region cdg
    1
    region live today, Paris
    5
    more coming, all in the EU
    0
    regions outside the EU, ever
    EU only
    where apps, data, backups and logs are stored and processed

    08Networking

    Private by default.
    Public when you say so.

    Each project gets its own private network. Services reach each other at name.k64.internal, and only the ones you expose get a public URL, with a certificate issued and renewed for you.

    Project network · cat-cafe

    Every public service speaks HTTP/2, with TLS terminated at the edge.

    Custom domain

    Any hostname. This demo only shows the record to create.

    DNS record to add at your DNS provider
    TypeNameValue
    CNAMEwwwcat-cafe.k64.app
    1. Added to web
    2. CNAME record found
    3. Certificate issued, renews on its own
    4. Live at https://www.cat-cafe.fr
    k64 domains add www.cat-cafe.fr
    HTTP/2 and HTTP/3WebSocketsTCP proxyDDoS protection at the edgeAutomatic TLS*.k64.internalStatic outbound IPs · Enterprise

    09Observability

    Logs, metrics, alerts.
    From the first deploy.

    Live logs from every service with search and filters. Metrics for CPU, memory, network, requests by status class, p50, p95 and p99 latency and error rate. Alerts go to email, Slack, Discord or a webhook, and everything exports over OpenTelemetry.

    Live

      Every level, every service, newest at the bottom.

      34%CPU · web · 2 replicas
      weblast 15 minutes

      Alert rule

      When
      p95 latencyonweb
      for 5 minutes
      Send to

        Log retention

        Hobby keeps 7 days · Pro keeps 30 days · Enterprise keeps 90 days. Logs are stored in the EU.

        OpenTelemetry export

        Send logs and metrics over OpenTelemetry to the tools you already run.

        10Config as code

        Your whole setup
        in one file.

        Describe services, databases, cron jobs and scaling in k64.toml at the root of your repo, and review changes like any other code. Edit the file below and the canvas follows.

        k64.tomlValid
        cat-cafecdg · Paris

          Variables per environment

          DATABASE_URL
          from postgresreference
          VALKEY_URL
          from valkeyreference
          NODE_ENV
          production
          SESSION_SECRET
          •••••••• sealed
          APP_NAME
          cat-cafeshared

          Sealed secrets can be read by your services. Nobody can display them again once they are set.

          The same settings from

          # the same project, from your terminal
          $ k64 link cat-cafe
          $ k64 db add postgres
          $ k64 scale web --autoscale 1-10
          $ k64 scale worker --scale-to-zero 15m
          $ k64 domains add www.cat-cafe.fr
          $ k64 env set APP_NAME=cat-cafe

          And from your pipeline, with the CLI and a project token.

          11Cron, workers, one-offs

          Jobs that run
          while you sleep.

          Schedule commands with standard cron syntax, keep background workers running without a public port, and start one-off tasks like migrations with k64 run.

          At 03:00, every day.

          Next runs · Paris time

            Shown in Europe/Paris, with UTC beside each run.

            The next 7 days7 runs

            Workers

            Long-running, no public port

            Queue consumers, bots and stream processors get the same deploys, logs, restarts and private network as web services.

            queue 4
            One-off commands

            Runs with the code and variables of the live deployment. The output streams to your terminal, and the machine goes away after.

            12Security

            Isolated by hardware.
            Encrypted at rest and in transit.

            Every service runs in its own microVM. Data is encrypted at rest with AES-256 and in transit with TLS 1.2 or later, and your apps, databases, volumes, backups and logs are stored and processed only in the EU, with a DPA for every customer.

            1. Each service runs in its own microVM, with hardware isolation and no kernel shared with its neighbours.

            Try AES-256

            AES-256-GCM · run 10 bytes
            IV …
            Same text, new IV · run 2…
            IV …

            Both decrypt back to the same text

            Encrypted in your browser with WebCrypto and a 256-bit key made in this tab, to show what AES-256 output looks like. Nothing leaves this page.

            At rest
            AES-256 · databases, volumes, backups
            In transit
            TLS 1.2 or later · every public request
            Where
            Apps, databases, volumes, backups and logs, only in the EU

            Compliance and controls

            • GDPR and a DPAFor every customer, under French law
              Every plan
            • EU data residencyApps, databases, volumes, backups and logs in the EU
              Every plan
            • EncryptionAES-256 at rest, TLS 1.2+ in transit
              Every plan
            • microVM isolationOne microVM per service
              Every plan
            • SSO/SAML and SCIMSingle sign-on and provisioning
              Enterprise
            • Audit logsWho changed what, and when
              Enterprise
            • Third-party pentestBefore launch, then every year
              Yearly
            • Bug bountySafe harbor, report to security@k64.dev
              Open
            • SOC 2 Type II, ISO/IEC 27001On the roadmap, neither is obtained yet
              In progress
            Read the security overview

            Push code. k64. It’s live.

            Start on Hobby with €5 of usage every month, hard-capped, no card required. Your first deploy is one command away.

            curl -fsSL https://k64.dev/install.sh | sh