Go
Deploy Go services with Procfile-based workers, auto-detected databases and cron.
Step by step: Deploy Go to DigitalOcean · Deploy Go to Hetzner · Deploy Go to Vultr · Deploy Go to OVHcloud · Deploy Go to Scaleway · Deploy Go to UpCloud
- Detected from
go.modand built automatically, or built from your own Dockerfile. A module in a subfolder (server/go.modbeside afrontend/) is found and built from there automatically. - The binary must listen on
$PORT(and on all interfaces). - A known driver import (
github.com/jackc/pgx,github.com/lib/pq,github.com/go-sql-driver/mysql,github.com/redis/go-redis…) gets its database provisioned andDATABASE_URL/REDIS_URLinjected automatically; add one yourself from the app or canvas otherwise.
Workers: declare the process, Railyard scales it
Go has no framework convention for background work, so there’s nothing to auto-detect — declare a second process in a Procfile at the module root and it runs and scales independently of web.
web: ./server
worker: ./server -mode=worker
Both run the same built binary; your main() reads a flag or env var to decide which loop to run — one codebase and one build, several process types, the 12-factor model. Add or edit processes on the app’s Workers tab without touching the repo, and scale any of them from the CLI:
railyard scale my-app worker=2
For scheduled work, use Cron instead of a sleeping loop in worker — it runs your binary with a different flag on a schedule and keeps a run history.
Config and secrets
Everything your binary reads with os.Getenv is a plain env var: set it under Variables, or railyard env:set my-app KEY=VALUE from the CLI, and the same built binary runs unchanged from staging through production — dev/prod parity, not a recompile per environment. Point at a database or Redis running as its own service on the canvas with ${{redis.RAILYARD_PRIVATE_URL}} — resolved per environment. See Variables and secrets.
Deploy it
- From a repo: paste the Git URL, or pick it from the picker once GitHub is connected — Railyard detects and builds it automatically (or uses your own Dockerfile) and deploys on every push.
- From the CLI:
railyard create my-app https://github.com/me/my-app --port 8080, orrailyard deploy my-app --localto build with your own Docker and push a single image instead of using the team’s builder. - One click: add the deploy button to your README, or publish to the template catalog so anyone can launch it with its addons and variables already filled in.