How to deploy n8n on fly.io?

Hi everyone,
I’m trying to deploy an application using my own Dockerfile on Fly.io, but I keep running into issues after deployment. The app builds successfully, but the UI breaks or doesn’t load correctly once deployed.

Here’s what I’m trying to confirm with someone experienced:

  1. What is the correct, reliable process to deploy an app directly from a Dockerfile on Fly.io?

  2. What are the exact steps to ensure internal_port in fly.toml matches the port exposed by the Dockerfile?

  3. Should I always run fly launch --no-deploy first when deploying from a Dockerfile?

  4. Is there anything special I should set in Fly secrets when the app requires environment variables?

  5. Is fly deploy --local-only preferred when using custom Dockerfiles?

  6. Are there common traps (esp. with ports, ENTRYPOINT/CMD, or auto-start/auto-stop machines) that cause the UI to fail after deployment?

If someone has a clean example of a correct fly.toml + Dockerfile setup, that would help a lot.

Thanks in advance.

I deployed n8n on fly.io and can attest it works.

It is not a simple process, it took some custom settings. Some of the questions you asked are typical fly.io practice which you could get answers from the fly docs and forum. Deploying n8n itself need some appdeploy expertise.

It isn’t particularly hard, but it isn’t trivial.

Is it possible for you to walk me through the deployment process? A detailed deployment guide would be extremely helpful.
Thanks in advance