Move from Render

Moving a Render service to velixir takes four steps: create the app, bring its environment variables, move the database, and switch the domain. Services on Render's native runtimes move with no code changes, because velixir builds your source without a Dockerfile.

Before you start

  • Install the velixir CLI and run velixir login.
  • Install the Postgres client tools (pg_dump, pg_restore, psql) locally.
  • Pick a quiet window for the database copy. Writes made on Render after the dump won't be carried over.

1. Create the app and deploy it

From your service's source directory:

velixir init
velixir deploy

velixir detects the language and builds the app. Your app must listen on 0.0.0.0 on the port in PORT, which Render web services already do. If your Render service used a custom start command, put it in a Procfile as web: <command>.

  • Background workers and cron jobs. Run each one as its own velixir app from the same source, starting the worker instead of the web server.
  • Pre-deploy commands. Run migrations as part of your start command, before the server starts.
  • Build-time variables. Environment variables reach the app when it runs, not while it builds.

2. Bring your environment variables

Copy the variables from your Render service's Environment page (and any environment groups it uses) into a .env file, one KEY=value per line. Then:

velixir env import .env --secret

Or paste the same lines into Import from a .env file on the app's Environment tab. Leave out DATABASE_URL and the Redis URL for the services you're replacing, so the managed services you bind next take over. See Environment variables.

3. Dump your Render database

Use the External Database URL from your Render database's page:

pg_dump -Fc --no-acl --no-owner "<render external database url>" > latest.dump

Move your Postgres data

  1. Create the database on velixir in the same project as the app, from the dashboard or with velixir db create. Pick a plan with room for your data, and the same Postgres major version you run today or a newer one (15, 16 and 17 are available). Leave External access on so you can restore from your machine.

  2. Get its public connection string:

    velixir db connect <database-id> --external
    

    Or copy the External connection string from the database's page in the dashboard.

  3. Restore your dump into it:

    pg_restore --no-owner --no-acl --verbose -d "<velixir external connection string>" latest.dump
    

    --no-owner --no-acl matter: your database's role owns everything it creates but isn't a superuser, so ownership and grants from the old host can't be replayed. An extension that needs a superuser to install may fail to restore; tell us which and we'll help.

  4. Bind the database to your app from the database's page in the dashboard, or with velixir db bind <database-id> --app <app-id>. The app then gets DATABASE_URL pointing at the in-cluster address. Remove any DATABASE_URL you imported from the old host first, or your value wins over the binding.

The connection passes straight through to Postgres, encrypted end to end. If a single step (a large index build, say) runs for more than five minutes without sending anything, the connection can drop. For big databases, restore in parts (pg_restore --section=pre-data, then data, then post-data), or open a ticket and we'll help you run it.

Key Value (Redis)

Create a Valkey cache from the dashboard or with velixir cache create, and bind it to the app. Valkey speaks the Redis protocol, so Redis clients work unchanged.

4. Switch the domain

Redeploy with velixir deploy, check the app on its velixir.run address, then add your domain on the app's Domains tab and point DNS at velixir. See Custom domains. Keep the Render service running until DNS has moved over.

Questions about a specific setup? Open a ticket from the dashboard and we'll help you move it.