Skip to main content
For a repository, the New app wizard reads the files and pre-fills the build, port, health path, variables and databases for you. The “New app” dialog opens with one input, “Import anything”. Paste or upload what you already have and Levelrail classifies it and shows a deployment plan preview before anything is created. The same flow is available from the CLI (levelrail-cli import), the HTTP API (POST /api/v1/imports/plan) and the MCP server (plan_import). A plan is a preview only. Deploying it uses the existing create, build and compose endpoints; there is no separate deploy path.

What you can paste

Classification is automatic. The web UI shows a “Looks like” hint while you type, and the server’s decision is final.

Repository detection

For a repo URL the plan reads a small, fixed set of files over HTTPS from the host’s raw-file endpoint (GitHub, GitLab including subgroups, Bitbucket, Gitea and similar). Nothing is cloned to disk and nothing from the repo is executed. Private repos cannot be read this way; connect them through a git provider first. Detection order:
  1. A compose file (docker-compose.yml, docker-compose.yaml, compose.yaml, compose.yml) whose services are all prebuilt images is planned as a compose deploy. A compose file that builds from source falls through to the next step with a warning.
  2. A root Dockerfile is planned as a Dockerfile build. The port comes from EXPOSE.
  3. Manifest files (package.json, go.mod, requirements.txt, pyproject.toml, Pipfile, pom.xml, build.gradle, Gemfile, composer.json, index.html) pick a Railpack build or a static site, with framework defaults for the port and a health check path guess (Next.js, Nuxt, NestJS, Express, Django, FastAPI, Flask, Spring, Rails, Sinatra, Laravel and others).
  4. If nothing matches and the repo is on a public host, Railpack’s own provider detection is tried.
The plan states why it chose the build method. Limits are set with environment variables on the control plane: Outbound requests use the same SSRF guard as webhooks: loopback, private and link-local addresses are refused unless APP_NOTIFY_ALLOW_PRIVATE_NETWORKS=true. Only http and https repo URLs are accepted.

Ruby and PHP

Railpack builds Ruby and PHP projects, and the import plan fills in what its start commands expect: Laravel runs php artisan migrate --force on every start. Set RAILPACK_SKIP_MIGRATIONS=true if the app has no database yet.

Buildpack apps

An app written for a buildpack platform, with a Procfile and no Dockerfile, is built with Railpack. Levelrail does not run Heroku buildpacks, does not read .buildpacks or project.toml, and has no buildpack layer to select.
  • Supported: a Dockerfile at the repository root (built with BuildKit), or a stack Railpack detects from files such as package.json, go.mod, requirements.txt, Gemfile or composer.json. See Ruby and PHP for the defaults the plan fills in.
  • Procfile: the web: line is used only to guess the port. Other process types (worker, release) are not run at deploy time. Describe them as services and hooks in app.yaml, or run levelrail-cli import config in the repository to get a first draft from the Procfile and app.json.
  • Dockerfile or Railpack: if the repository has a Dockerfile it wins, and the Dockerfile’s CMD or ENTRYPOINT is what runs. The Procfile does not override it. If you want Railpack, remove the Dockerfile or build from a subdirectory.
  • Build log: the first line names the builder that ran and why. A Dockerfile build says builder: Dockerfile (Dockerfile), or the path relative to the build context, for example builder: Dockerfile (deploy/Dockerfile.prod). A Railpack build says builder: Railpack (no Dockerfile in the repository). For a Railpack build, a second line appears when .buildpacks, project.toml or a Procfile is present. It lists the file names found and says .buildpacks and project.toml are not run as buildpacks. The line uses file names only, never file contents. Built and unit tested. Not yet proven on a real host: no real BuildKit build has been run with this line.
  • Not supported: custom buildpacks, buildpack-specific env such as BUILDPACK_URL, and languages Railpack does not detect. Add a Dockerfile for those.

Environment variables

For repos the plan scans .env.example, .env.sample, .env.template, env.example, .env.dist, compose environment: sections and Dockerfile ENV. Each variable is reported as:
  • required: the value is empty or a placeholder such as changeme, your_..._here, <...> or ${VAR}. Deploy is blocked until it has a value.
  • has default: a real-looking default exists.
  • secret: the name contains SECRET, TOKEN, PASSWORD, KEY and similar, or the value is a URL with credentials.
The plan never echoes a secret-looking default back. Secret values you enter are stored as encrypted secrets, not plain env vars. A -e NAME=value in a docker run command that looks secret is treated as required so you re-enter it.

Docker run flags

Supported: -p/--publish (host and container ports, optional IP and protocol), -e/--env, -v/--volume (named volumes and bind mounts), --restart, --name, -m/--memory, --cpus, --entrypoint, the image and its command, and --network (only noted). The command is tokenized (quotes, backslash escapes, backslash-newline continuations) and never run through a shell. Some inputs need care:
  • A host bind mount (-v /srv/data:/data) is flagged “needs root approval”, because only root may create one.
  • Mounting /var/run/docker.sock is flagged, since it gives the container control of the host.
  • -e NAME with no value takes its value from your shell in Docker; enter it in the plan instead.
  • --env-file cannot be read from here; paste its variables into the env table.
  • Only the first -p port is routed through the ingress; other published ports stay on the host.
Flags that are not supported are listed as warnings and ignored, never dropped silently:

Run an import

Open New app, paste into “Import anything” (or upload a compose file or Dockerfile), and choose Preview plan. The plan shows the source, the build method with its reason, an editable app name and container port, an env table with Required and Secret indicators and inline value inputs, volumes, a domain suggestion and warnings. Deploy stays disabled until every required variable has a value. Deploying a repo opens the live build log. The template, image, git and compose cards below the input remain available.

Troubleshooting

Plan shows the wrong build method or is missing settings

Likely cause: The detection algorithm looked at the wrong files, or the repository structure does not match a known provider pattern. How to confirm: Check the plan’s “detected as” reason. Look at the files listed in the plan and verify they match what you expected. Fix: If the detection is wrong, you can override the build method before deploying. For a git repo, switch to the dashboard or CLI and use --build-type dockerfile, --build-type railpack, or --build-type static to override the auto-detected method.

Unsupported providers

Symptom: the build fails with detected provider "deno", only node, golang, java, python, ruby, and php are supported. Cause: Railpack recognises more stacks than Levelrail has verified. Only the listed providers are accepted; others fail early instead of building something untested. Fix: add a Dockerfile to the repository and use --build-type dockerfile.

Repository could not be read

Likely cause: The repository is private and the control plane has no credentials for it. Or the repository URL is invalid, or the host is unreachable. How to confirm: The plan will fail with a message about the repository being unreachable or private. Fix: For private repositories, connect the git provider in Settings > Git integrations first, then paste the repository URL again. The control plane will read the repo through the authenticated provider. For public repositories, verify the URL and git host are correct and reachable.

Missing or invalid required environment variables

Likely cause: A required setting was not filled in, or the value is invalid. How to confirm: The plan shows which variables are required (marked with an indicator) and which have no value. Fix: Fill in all required variables before deploying. Secret variables will be stored encrypted. Non-secret values are stored as config.

Docker run command is not parsed correctly

Likely cause: The command has unsupported flags, or the syntax is incorrect. How to confirm: The plan shows warnings for unsupported flags and lists which ones were ignored. Fix: Remove unsupported flags from the command (they are listed in the plan). You can add them manually after the app is created in the dashboard or via the API.

Still stuck

For help with imports, check what was detected and why in the plan preview. If the detection is consistently wrong, you can also start from a known build type (git, image, or compose) instead of importing.
Last modified on November 8, 2026