Skip to main content

Deploy other application types

Choose the type that matches what you are deploying. The runtimes and database engines offered in your environment are the authority: if a choice is unavailable, read its reason before continuing.

ApplicationWhere to startSource build?
WordPressAdd a managed siteHosting installs it
MoodleAdd a managed siteHosting installs it
Static site, built front-end app, Node.js, Python, PHPAdd an app or static siteYour repository or ZIP
LaravelAdd an app or static site, or Laravel YAMLYour repository or ZIP
Ruby or RailsRuby YAMLYour repository
GoCompiled applicationsYour repository
RustCompiled applicationsYour repository
.NETCompiled applicationsYour repository
Supabase Auth, REST or RealtimeManaged componentsHosting installs them
InfisicalSecret managerHosting installs it

Java/JVM, Bun and Elixir/Phoenix are not offered as managed source runtimes. They must not be configured as another language to bypass the runtime choices. A container image you already publish can be run as a Container image application — see Container images. Where the platform does not yet have its managed image store configured, that choice is reported as unavailable with the reason, and the runtime choices your environment reports remain authoritative.

Before adding an application​

  1. Create an environment if you need a new one — see Create an environment. Empty Environment starts with capacity and no applications or database servers.
  2. For a type this page configures in YAML, open the environment's Services page and add the database engine it needs, then wait for the change to apply. WordPress and Moodle use MariaDB. The Laravel example below uses MySQL, and the Ruby and Supabase examples use PostgreSQL. Reuse a server already in the environment.
  3. For your own source, put the code, lockfile and hosting.yaml in GitHub, and connect GitHub under Company → Code sources → GitHub repositories. See Give Hosting your code.

An environment's configuration describes all the applications you manage through it. Add declarations to the existing document; do not replace it with a one-application example if it already has other members. Applications sharing an environment also share capacity and may share restart interruptions. Use separate environments when independent uptime or an isolation boundary is required.

WordPress and Moodle​

These are managed installations. You do not need a GitHub repository, Composer/npm commands or a release build to create them.

  1. Open Applications and choose Add application.
  2. Under What are you adding?, choose WordPress or Moodle, then Next. There is no code to choose; Hosting installs it.
  3. Under What we found, read what Hosting will install. Each line's change link opens the detail behind it, such as its name, version, size or intended domain. For WordPress, an intended domain is optional: enter it if you already know the final name, then complete DNS afterwards.
  4. Choose Review, check what it reserves from your pool, and choose Add followed by its name.
  5. Follow Overview until the application is serving. Open it from Applications, then use its Admin tab to find the sign-in address and reveal the password. Keep passwords out of screenshots, repository files and support messages.

You can also declare a managed site in Configuration → Edit configuration → YAML file. For WordPress:

version: "1.2"
applications:
website:
runtime: wordpress

For Moodle, change runtime: wordpress to runtime: moodle. Do not add install/run commands or a database binding: the managed recipe owns the site's files and database identity. Choose Preview changes, review the managed application creation, and apply the reviewed configuration. Saving a draft alone does not install the site.

For an existing WordPress site, first create the target and then follow Import a WordPress site. The upload/import path documented there is for WordPress; ask Support about moving an existing Moodle site.

Laravel​

Add an app or static site recognises a Laravel app — artisan and laravel/framework in composer.json — and sets it up for you: served from public/, installed without dev dependencies, its key generated, migrations run before each release, and a database offered. Use the YAML below only when you need more control than that.

Use a repository containing the Laravel application and its committed composer.lock. Change source.root if the application lives in a subdirectory. This example uses a MySQL server already added under Services; it declares one database and a pre-release migration command.

version: "1.4"
applications:
web:
runtime: laravel
source:
root: .
build:
install: [composer, install, --no-dev, --no-interaction, --no-progress, --prefer-dist, --no-scripts]
run:
command: [hosting-laravel-web]
port: 3101
healthPath: /up
env:
APP_ENV: production
APP_DEBUG: "false"
APP_KEY: {secret: app_key}
PORT: "3101"
DB_CONNECTION: mysql
DB_URL: {database: primary, field: url}
MYSQL_ATTR_SSL_CA: {database: primary, field: tls-ca-path}
CACHE_STORE: file
SESSION_DRIVER: file
QUEUE_CONNECTION: sync
release:
command: [php, artisan, migrate, --force]
timeoutSeconds: 300
env:
APP_ENV: production
APP_DEBUG: "false"
APP_KEY: {secret: app_key}
DB_CONNECTION: mysql
DB_URL: {database: primary, field: url}
MYSQL_ATTR_SSL_CA: {database: primary, field: tls-ca-path}
CACHE_STORE: file
SESSION_DRIVER: file
QUEUE_CONNECTION: sync
databases:
primary:
engine: mysql
application: web
secrets:
app_key:
description: Laravel application encryption key
required: true
  1. Import the repository YAML with Review repository YAML, or paste/upload it in the YAML editor.
  2. Preview and Save reviewed draft so the secret declaration exists. Supply app_key through the separate secret prompt. For an existing application, retain its original APP_KEY so encrypted data stays readable. For a fresh application, generate its key using Laravel's own local setup command.
  3. Preview again and apply. A required secret must have a value before apply. The database connection arrives through DB_URL; never copy a generated password into YAML.
  4. Follow Build and deploy. The release task runs migrations before the new web process serves. Check /up, sign-in and an operation that reads/writes your database.

hosting-laravel-web serves Laravel's public/ directory. The example runs synchronous jobs and uses file sessions/cache; adapt it to your application. Add a frontend asset build only if your project has one. Workers, scheduled commands and release tasks each need their own explicit environment bindings: the web process does not grant its secrets to them automatically. The Laravel process example covers those declarations.

If uploads or file sessions must survive a restart, declare persistent storage and mount it over the application's storage directory, such as /app/storage when source.root is .. See Configuration for volume declarations; adjust the mount to your source layout. Choose an offered version line through the form, or name it with runtimeVersion in a 1.14 or later configuration document (phpMinor in 1.11 to 1.13).

Ruby and Rails​

Use a repository with a committed Gemfile.lock and a Ruby version compatible with the runtime offered by Hosting. This Rails example expects PostgreSQL, Puma and an application health endpoint at /up. Change the commands and health path for another Ruby framework.

version: "1.5"
applications:
web:
runtime: ruby
source:
root: .
build:
install: [bundle, install]
run:
command: [bundle, exec, puma, -b, "tcp://0.0.0.0:3102"]
port: 3102
healthPath: /up
env:
RAILS_ENV: production
RAILS_LOG_TO_STDOUT: "true"
SECRET_KEY_BASE: {secret: secret_key_base}
DATABASE_URL: {database: primary, field: url}
release:
command: [bundle, exec, rails, db:migrate]
timeoutSeconds: 300
env:
RAILS_ENV: production
SECRET_KEY_BASE: {secret: secret_key_base}
DATABASE_URL: {database: primary, field: url}
databases:
primary:
engine: postgres
application: web
secrets:
secret_key_base:
description: Rails application signing and encryption key
required: true
  1. Add the PostgreSQL service before applying this document. Replace source.root if the app is nested.
  2. Import or paste the YAML, preview, and save a draft. Supply secret_key_base through the secret prompt, then preview and apply. Preserve the original key when moving an existing application. If the app uses encrypted Rails credentials, declare RAILS_MASTER_KEY as a separate secret and bind it to every process that reads those credentials.
  3. Follow Build and deploy. Check /up, the application's assets and a database-backed journey after the migration succeeds.

The migration command marks this example as Rails, so Hosting's Rails asset stage compiles its assets from the same release. A plain Rack application should use its own start command and omit the Rails migration and Rails-specific settings. A Procfile is not required when the YAML declares every process. Background workers use the existing workers declaration with their own secrets and database/cache bindings; the web process's environment is not inherited. Private gem dependencies also need working build-time package access: a runtime secret does not grant the builder private registry credentials.

Go, Rust and .NET​

These runtimes compile your repository into an artefact and serve it. Hosting builds the artefact, ships it in an immutable release and runs it from a shared runtime image, exactly as it does for Node, Laravel and Rails. What is different is that the build has to produce a file the runtime image can execute, and Hosting checks that before the release can be served.

Each example is a minimal server. Replace the commands with your own; the only fixed part is that run.command must name the artefact your build produces, because that is the file Hosting verifies.

Go — one statically linked binary. Your build must produce bin/server:

version: "1.13"
applications:
web:
runtime: go
build:
install: [go, mod, download]
command: [go, build, -trimpath, -ldflags=-s, -o, bin/server, .]
run:
command: [./bin/server]
port: 3000
healthPath: /health

Rust — one binary built with cargo install --root ., which writes it to bin/server:

version: "1.13"
applications:
web:
runtime: rust
build:
install: [cargo, fetch, --locked]
command: [cargo, install, --path, ., --root, ., --locked, --offline, --bin, server]
run:
command: [./bin/server]
port: 3000
healthPath: /health

ASP.NET Core — a framework-dependent publish tree. dotnet is the executable and lives in the image, so the declared target is the assembly:

version: "1.13"
applications:
web:
runtime: dotnet
build:
install: [dotnet, restore, --locked-mode, "-p:ArtifactsPath=/workspace/dotnet-artifacts"]
command: [dotnet, publish, -c, Release, --no-self-contained, --no-restore,
"-p:ArtifactsPath=/workspace/dotnet-artifacts", -o, bin/publish]
run:
command: [dotnet, bin/publish/Api.dll]
port: 3000
healthPath: /health

The -p:ArtifactsPath=/workspace/dotnet-artifacts value must appear on both restore and publish, and -o bin/publish must match the directory your run.command names. That pair is what keeps build intermediates out of the release:

  • Your application must read PORT itself. A compiled program does not read the port automatically. Listen on 0.0.0.0 at the port you declared, log to stdout and stderr, and exit on SIGTERM.
  • The build is offline after the install stage. Hosting fetches your dependencies once, in the install stage, and everything after it must resolve from that fetch. Go, Rust and .NET builds therefore refuse a dependency your committed lock file does not cover.
  • Commit your lock file. go.sum whenever your module has external requirements, Cargo.lock for Rust and packages.lock.json for .NET.
  • A Go project that needs CGO, or a Go version the pinned builder does not carry, is refused. Hosting does not download a different compiler during a build.
  • A Rust crate may only load the system libraries Hosting's runtime image publishes — the C library, libgcc_s, libm, OpenSSL and zlib. A crate needing anything else, including a C++ runtime or a database client library, is refused at build time with the library named. That is a deliberate limit: the runtime image is shared by everyone, so it cannot grow a library for one application.
  • .NET is framework-dependent. Native AOT, self-contained and single-file builds, and trimming are not offered, because each replaces the shared runtime with a copy per application.
  • These runtimes build 64-bit Linux (amd64) bundles today.

A refusal names the artefact, the shared library or the setting that failed, and appears in the build log for that stage. Nothing about a failed verification is served: a release that cannot be verified never activates.

Supabase components​

These are individually managed Auth, REST and Realtime services. Add PostgreSQL under Services first. Declare only the components you need; there is no repository build for these managed services.

version: "1.9"
applications:
auth:
runtime: supabase-auth
rest:
runtime: supabase-rest
realtime:
runtime: supabase-realtime
  1. Open Configuration → Edit configuration → YAML file and paste or upload the document.
  2. Choose Preview changes. Review the components and capacity, then apply. Hosting owns their images, commands, ports, shared PostgreSQL database and generated signing material; do not put those implementation settings in the component declarations.
  3. Follow Overview and each component under Applications until they serve. Each component has its own address. Configure your consumer for the actual Auth, REST and Realtime endpoints it uses; do not assume they share one hostname or that a single Supabase gateway was created.
  4. Open the Auth component's Admin tab and its Authentication settings to review registration and email confirmation. Registration starts closed. No mail relay is configured for these components: turning off Confirm addresses at creation leaves new users waiting for mail that cannot be sent.
  5. On the REST component, Served schemas on its Admin tab selects the PostgreSQL schemas it exposes. Review permissions and row-level security before serving customer tables. A selected schema alone does not create application tables or their policies.

To connect a repository application's backend, keep that application and the components in the same document and add service references under the consumer's env, using the keys declared above:

# Inside your backend application's env:
AUTH_URL: {service: auth, field: url}
REST_URL: {service: rest, field: url}
REALTIME_URL: {service: realtime, field: url}
SUPABASE_ANON_KEY: {service: auth, field: anonymous_key}
SUPABASE_SERVICE_KEY: {service: auth, field: service_key}

Use variable names your code actually reads. The anonymous key is publishable; the service key bypasses row-level security and belongs only in a trusted backend. Never put the service key in browser code, build.publicEnv or a screenshot. To read the publishable key through the supported client, use hostingctl application public-key <environment-uuid> <workload-uuid> --company <slug>. Runtime service references cannot be used as build-time references: a browser bundle that embeds public settings needs its own public build values and a rebuild when those change.

These components provide Auth, REST and Realtime, not Supabase Storage, Edge Functions or GraphQL. Check a real sign-in, authorized API call or socket subscription for the component your app uses; a healthy component alone does not prove your application has the correct policies or endpoint settings.

Infisical secret manager​

This creates a separate secret-manager application. It is distinct from connecting Hosting to an external secret manager that already exists.

  1. Add PostgreSQL and a compatible Redis service to the environment first. Infisical needs both.
  2. Open Applications, choose Add application, choose Secret manager, and follow the steps. Check its name and the allocation it reserves on Review, then choose Add followed by its name.
  3. Follow the application and environment status. Hosting provisions its database, encryption material and first account. Encryption and recovery material are retained independently of the instance.
  4. Open the application's address when ready. Initial administrator credentials are not exposed by the current WordPress/Moodle password controls; contact Support for initial access. Mail-dependent features require a configured relay.

Create this type through Add application. The published Hosting YAML schema does not accept runtime: infisical. Do not paste an arbitrary image or server command into another runtime to imitate it.

Build and deploy repository applications​

Laravel and Ruby declared in YAML follow this source and release journey:

  1. Import the repository YAML or edit it in Configuration, save required secret values separately, preview and apply the reviewed document.
  2. Open Applications, select the new application, then its Deploy tab. Select its connected repository and branch. Reviewing YAML did not make that build-source choice for you.
  3. Build the first release, read any failure at the stage it names, then deploy the successful release. Wait for it to serve and check its generated address. See Deployment failures.
  4. Enable Deploy automatically when this branch changes only if you want future pushes to build and deploy. People who can write to that branch can execute code beside the application's runtime secrets.

Use production commands and keep the process in the foreground. Ports must be free in the environment; change the examples' ports and listener settings together. Commands are argument lists, so put sequences requiring a shell into a repository script and call that script from the document.

Connect a domain​

After checking the generated address, open the new application's Addresses tab and choose Add a custom address. Set the record shown for that name at your DNS provider, then choose Check DNS. Wait for DNS, the certificate and the route to be ready before sending visitors there. Web addresses has the detail. Keep existing mail records intact, and publish no AAAA for a Home target.

Changing an address does not rewrite an imported application's content. Use the WordPress URL repair when needed; set other applications' public URL or allowed-host configuration through their own declared environment settings, apply the change and deploy again if a public URL was compiled into the build.