Docs · Frameworks

Deploy Go, Ruby, PHP, Rust, Java & BoxLang.

Beyond Node and Python, Canner detects and runs six more runtimes from their standard manifest files. Same rules everywhere: read PORT from the environment, answer on /.

Running a server? Two rules

Static sites and standard frameworks (Next.js, Astro, Vite) need no changes — Canner handles it. If your app runs its own server:

Listen on $PORT — read the port from the PORT environment variable.
Respond on / within 30 seconds of starting — that health check flips your deploy to live. Set a different path in project settings if your root isn't servable.

Go

A go.mod at the root triggers a Go build: go build produces a static binary that runs directly. Read the port from the environment:

package main

import (
    "fmt"
    "net/http"
    "os"
)

func main() {
    http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
        fmt.Fprint(w, "ok")
    })
    http.ListenAndServe(":"+os.Getenv("PORT"), nil)
}

Ruby

A Gemfile triggers Bundler with gems vendored into the project. Rails apps start with rails server, Rack apps (config.ru) with rackup, and Sinatra with the entry file. Puma and other native gems compile fine during install, including gems that need the libyaml, SQLite, PostgreSQL, readline or libxslt headers. If a gem needs another system library, tell us.

Canner offers Ruby 4.0 (4.0.9), 3.4 (3.4.12) and 3.2 (3.2.3, the default). Pick one under Settings → Ruby version; a gem that needs a newer Ruby than your default (the install says depends on Ruby >= 3.3) is fixed there. A ruby line in your Gemfile moves the build to a series that meets it, and a newer .ruby-version does the same. If nothing we offer meets the line (for example ruby "3.3.0"), the build stops before installing and says what to change: use a range such as ">= 3.2", run bundle lock, and commit both files. Native gems are built for the series you choose, so changing it reinstalls them on the next deploy.

A Rails 8 app that uses Solid Cache, Solid Queue or Solid Cable needs no changes. Canner reads config/database.yml, creates an empty database for each extra connection (cache, queue, cable) and sets CACHE_DATABASE_URL, QUEUE_DATABASE_URL and CABLE_DATABASE_URL, which Rails reads by itself. With no release command set, bundle exec rails db:prepare runs before each new version starts and creates their tables, and SOLID_QUEUE_IN_PUMA=true runs the job queue inside the web process, so you do not need a separate worker project. A variable you set yourself always wins. These databases do not count toward your database limit, only toward your storage. Solid Cache, Queue and Cable replace Redis. On Live, the cache service is a Redis-compatible store on a socket; Sidekiq, which runs as its own process, needs a Redis you run elsewhere. The build log also lists any variable your code reads with no default that is not set yet.

Rails runs with RAILS_ENV=production, the development and test gems left out, and logs on standard output; set your own RAILS_ENV to change it. If the app has an asset pipeline (app/assets), rails assets:precompile runs as the build step. Add SECRET_KEY_BASE (or RAILS_MASTER_KEY) as an environment variable, and run migrations with a release command such as bundle exec rails db:migrate. If your Rails app lives in a subdirectory, set it as the project’s root directory: the install, the build and the release command all run there. For background jobs with GoodJob, see background jobs.

PHP

A composer.json (or a bare index.php) deploys as PHP. Canner offers PHP 8.2 to 8.5 and picks the version from the php requirement in composer.json. Laravel starts with artisan serve; anything else is served with PHP’s built-in server from public/ or the project root. Composer dependencies install automatically, and a Laravel app with a Vite front end gets its npm install and build in the same deploy.

Rust

A Cargo.toml builds with cargo build --release and runs the release binary. Rust builds are compute-heavy, so they need a paid plan (Live and up — Plans & limits). Axum, Actix, and Rocket all work — bind to the PORT env var.

Java

A pom.xml builds with Maven; a build.gradle or build.gradle.kts with a committed gradlew wrapper builds with Gradle (no wrapper, no build — Canner doesn’t install a system Gradle). The JDK is picked from your declared release (maven.compiler.release, sourceCompatibility, or a Gradle toolchain) — Java 17, 21, and 25 are available, defaulting to 21. Spring Boot apps need no extra config: SERVER_PORT and SERVER_ADDRESS are set for you via its relaxed env binding; anything else can read the plain PORT var.

BoxLang

BoxLang is a modern JVM language, CFML-compatible (the ColdFusion / Lucee successor). A box.json, server.json, Application.bx / Application.cfc, or a .bxm / .cfm template at the root is the tell. There is no build step — the BoxLang MiniServer serves your source directory and compiles templates on the fly. Modules declared in box.json are installed from ForgeBox automatically. For a ColdFusion or Lucee codebase — .cfm / .cfc files or an Application.cfc — Canner also installs the bx-compat-cfml layer automatically, which restores the legacy runtime semantics (date-mask letters, BIF signatures, the cfusion scope aliases) a migration relies on. The MiniServer reads the PORT var and trusts Canner’s proxy headers, so a database datasource, sessions, and cgi.remote_addr all work behind the edge. BoxLang runs on Java 21 and needs a paid plan (Live and up — Plans & limits).

Moving an existing ColdFusion or Lucee app? Deploy ColdFusion & CFML on Canner walks through the migration.