Skip to content

Manual Deployments

Deploy applications without Docker — Nebion clones your code, runs your shell commands directly on the server, and manages the environment lifecycle.

No Docker Required

Commands run directly on the server — no containers, no compose files

Developer-Controlled

Define your own deploy and destroy commands in .nebion.yml

Same Workflow

PR environments, manual environments, variables, actions — all work the same

Config as Code

One file: .nebion.yml with recipe: manual

When to Use

Use the manual recipe when your application doesn't use Docker — static sites, Node.js apps managed with PM2, compiled binaries, or any setup where you control the process directly.

Use the docker recipe (default) when your application runs in Docker containers with a docker-compose-nebion.yml file. See Project Configuration.

Setup

  1. Create a project with recipe "Manual"

    When creating a new project in Nebion, select Manual as the recipe. This cannot be changed later.

  2. Add .nebion.yml to your repository

    yaml
    recipe: manual
    
    tasks:
      deploy:
        - name: Install dependencies
          command: npm install
        - name: Build
          command: npm run build
        - name: Start
          command: pm2 restart ecosystem.config.js
      destroy:
        - name: Stop
          command: pm2 delete ecosystem.config.js
  3. Open a pull request

    Nebion clones your repository, writes environment variables to .nebion.env, and runs your deploy tasks in order.

.nebion.yml Reference

yaml
recipe: manual

tasks:
  deploy:
    - name: Start
      command: ./start.sh
yaml
recipe: manual

tasks:
  deploy:
    - name: Install dependencies
      command: npm ci
    - name: Build
      command: npm run build
    - name: Run migrations
      command: npx prisma migrate deploy
    - name: Start
      command: pm2 restart ecosystem.config.js
  destroy:
    - name: Stop
      command: pm2 delete ecosystem.config.js
    - name: Cleanup
      command: rm -rf node_modules dist

actions:
  restart:
    name: "Restart"
    command: "pm2 restart ecosystem.config.js"
  status:
    name: "Process Status"
    command: "pm2 status"
  logs:
    name: "Recent Logs"
    command: "pm2 logs --lines 50 --nostream"

Fields

FieldRequiredDescription
recipeYesMust be manual
tasks.deployYesCommands to run on deploy (in order)
tasks.destroyNoCommands to run before environment removal
actionsNoOn-demand commands (details below)

Task Fields

FieldRequiredDescription
nameYesShown in deployment logs
commandYesShell command to execute

Commands run in your project's working directory with all environment variables loaded from .nebion.env.

Deploy Tasks

Tasks under deploy run in order after Nebion clones your repository. If any task fails, the deployment stops and reports an error.

yaml
tasks:
  deploy:
    - name: Install dependencies
      command: npm ci
    - name: Build
      command: npm run build
    - name: Start
      command: pm2 restart ecosystem.config.js

Commands support multi-line scripts using YAML | syntax:

yaml
tasks:
  deploy:
    - name: Setup and start
      command: |
        npm ci
        npm run build
        pm2 restart ecosystem.config.js

Destroy Tasks

Tasks under destroy run when a PR is merged/closed or when an environment is deleted. Use these to stop processes and clean up.

yaml
tasks:
  destroy:
    - name: Stop processes
      command: pm2 delete ecosystem.config.js
    - name: Clean up
      command: rm -rf node_modules dist .next

Destroy tasks are optional. If not defined, Nebion removes the environment directory without running any commands.

Actions

Actions work the same as Docker recipe actions, except commands run directly on the server instead of inside a container. The service field is not used.

yaml
actions:
  restart:
    name: "Restart"
    command: "pm2 restart ecosystem.config.js"
  db-backup:
    name: "Database Backup"
    command: "pg_dump mydb | gzip > $NEBION_ACTION_OUTPUT/backup.sql.gz"
    result: file
FieldRequiredDefaultDescription
nameYes--Display name
commandYes--Shell command
resultNooutputoutput (show stdout) or file (downloadable)

File actions use $NEBION_ACTION_OUTPUT the same way as Docker actions. See Actions for details.

Environment Variables

All environment variables — system and custom — are written to .nebion.env in your project directory and loaded as environment variables for every command.

The same system variables are available:

NEBION_DOMAIN=example.com
NEBION_ENV_IDENTIFIER=42
NEBION_ENV_BRANCH=feature/login
NEBION_ENV_TYPE=pr

Differences from Docker Recipe

DockerManual
Repository files.nebion.yml + docker-compose-nebion.yml.nebion.yml only
Task phasespre-rollout / post-rolloutdeploy / destroy
Task executionInside containers (docker exec)Directly on server
RoutingAutomatic via TraefikYou manage it
Actions service fieldRequiredNot used
Recipe field in .nebion.ymlOptional (default)Required (recipe: manual)

Recipe is permanent

The recipe is set when you create the project and cannot be changed afterward. Create a new project if you need to switch recipes.

Validate before deploying

Deployment tasks must include at least one deploy task. If tasks.deploy is missing or empty, the deployment will fail with a clear error message.