Deploy Phoenix on your own server.
Deploy Phoenix on a server you own: a mix release, migrations before each release, and LiveView sockets served over HTTPS on your domain.
- Build
- Railpack (auto)
- Start
- bin/server
- Port
- $PORT, set by Beep
- Pre-deploy
- bin/migrate
- Health check
- /health
Step by step.
Connect a server
Use Beep Cloud, a server in your own cloud account, or any Ubuntu or Debian VPS. Beep installs its runtime and agent and locks the server down: inbound traffic is denied, and app ports are reachable only from Beep’s edge.
Create a service from your repository
Pick the GitHub or GitLab repository and the branch to track. In a monorepo, set the root directory for this service; watch paths limit rebuilds to changes that touch it.
Let Beep build it
Beep detects Elixir from mix.exs. Generate release scripts with mix phx.gen.release, or add a Dockerfile. You can override the install, build or start command on the service.
Start command bin/serverListen on $PORT
Beep sets PORT for every service unless you set it yourself, and routes traffic from its edge to that port. Bind to 0.0.0.0 so the edge can reach the container.
config/runtime.exs port = String.to_integer(System.get_env("PORT") || "4000") config :my_app, MyAppWeb.Endpoint, http: [ip: {0, 0, 0, 0, 0, 0, 0, 0}, port: port]Add a database
Add managed Postgres (16 to 18, with pgvector and PostGIS), Redis or Valkey to the project, then reference its connection string from your service. References resolve at deploy time.
Environment variables DATABASE_URL=${{ postgres.DATABASE_URL }} SECRET_KEY_BASE=… PHX_HOST=app.example.comRun migrations before each release
Set a pre-deploy command. It runs before each release, so the schema is ready before the new version takes traffic.
Pre-deploy command bin/migrateSet a health check and deploy
Set the health check path to /health. Every push to the tracked branch builds and releases; traffic moves to the new version only once it passes, and rolling back re-releases an earlier image without a rebuild.
Add your domain
Every service starts with a URL on edge.usebeep.sh. When it works, point a CNAME for your domain at Beep; the certificate is issued and renewed for you. Each GitHub pull request also gets its own preview environment, removed when it closes.
Phoenix tips.
mix phx.gen.release creates bin/server and bin/migrate; use them as the start and pre-deploy commands.
Generate SECRET_KEY_BASE with mix phx.gen.secret and store it as a secret variable.
Add a small /health route that returns 200 and use it as the health check path.
Phoenix on Beep, answered.
Straight answers. Anything missing, ask us directly.
Do I need a Dockerfile to deploy Phoenix?
No. Beep detects Elixir from mix.exs. Generate release scripts with mix phx.gen.release, or add a Dockerfile. If your project already has a Dockerfile, you can build with that instead.
Where does the Phoenix app run?
On the server you connected: Beep Cloud, your own cloud account or any Ubuntu or Debian VPS. Beep bills per server, so databases, workers and previews on the same server add nothing to the plan.
Can I SSH into the server?
No, and that’s deliberate: Beep manages each host end to end so manual changes can’t drift from its setup. To debug, open a shell inside any container from the dashboard, next to its logs and metrics.
Where to run it.
Other guides.
Own your infrastructure again.
Plans from $1 a month, billed per server, never per service.
Early access · We’ll set up your workspace
Or talk to us →