Deploying

Sources, auto-deploy, builds, variables, and how deployments, redeploys and rollbacks work.

Choose a source

A service's source type is fixed when you create it. To switch type, create a new service.

SourceWhat you provide
ImageA public Docker Hub or GHCR image with an explicit tag or sha256 digest, for example nginx:1.27-alpine. Nanpod pulls it as is.
GitHubA repository, branch and optional root folder. Connect GitHub first in Account settings → Git integrations. Nanpod reads the latest commit of the branch when you deploy or when you push with auto-deploy enabled.
UploadA .zip, .tar.gz or .tgz file, or a folder from your computer. To ship changes, choose a new version in the service settings, save, then deploy. The latest upload is kept, so later deploys rebuild it without uploading again.

Auto-deploy from GitHub

GitHub services have Auto-deploy enabled by default. Whenever you push to the service's configured branch, Nanpod queues a new deployment automatically:

  • Rapid consecutive pushes are coalesced so at most one pending trigger waits at a time, deploying the latest commit without wasting builds.
  • You can turn Auto-deploy off or back on per service in Service settings. When off, or for Image and Upload sources, select Deploy manually when you are ready.

Upload limits

  • At most 20 MB packed, 100 MB unpacked and 10,000 files and folders.
  • When you pick a folder, the browser skips .git/, node_modules/, .env and .env.* files (except .env.example), and paths listed in your .gitignore files.

How code is built

For GitHub and Upload sources, Nanpod builds an image in an isolated builder:

  1. If the source root has a Dockerfile, Nanpod builds it.
  2. Otherwise Nanpod detects the language and builds it for you. Node.js, Go, PHP, Python, Java, Rust and Ruby are supported.

If detection finds more than one language, set the primary language or the root folder. You can also set a custom build command. The build log shows the detected plan before the build starts. Builds are free and not billed as compute.

Port and health

Set the port your app listens on (1–65535). Nanpod sets PORT to that value, so apps that read PORT work without changes. Listen on 0.0.0.0, not 127.0.0.1. A deployment becomes Active only after the app answers on its port.

Variables

  • Up to 128 variables per service.
  • Keys are ASCII, at most 128 characters. Values are UTF-8, at most 4,096 bytes.
  • PORT and names starting with NANPOD_ are reserved.
  • Mark secrets as sealed. A sealed value can be replaced but never read back, by you or anyone else.
  • Variables that connect a database are managed by Nanpod. See Databases and volumes.

Deployments, redeploy and rollback

Each deployment records the exact image and configuration it ran. From the deployment history you can:

  • Deploy latest: build and run the latest saved configuration and source.
  • Redeploy: run the active deployment's image and configuration again, without rebuilding. Pending changes are not included.
  • Rollback: return to a previously active version. Your saved settings stay as they are, and the differences stay pending. Databases and files on volumes are not rolled back.

Older images are kept for 7 days after they stop being used, so you can roll back to recent versions.

Logs and metrics

  • Build logs and runtime logs are searchable for 7 days. Build logs keep up to 100 MiB per service; the oldest are removed first.
  • Metrics show CPU, memory and instances for the last hour or 24 hours, kept for 7 days at one-minute resolution.