bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward

How to migrate from Fly.io to a VPS

calendar_month May 26, 2026 schedule 8 min read visibility 47 views
person
Valebyte Team
How to migrate from Fly.io to a VPS
To successfully migrate from Fly.io to a VPS, you need to containerize your application with Docker, set up a reverse proxy (Nginx or Caddy) to handle SSL traffic, and move data from Fly.io Persistent Volumes to the virtual server's local SSD or block storage. This typically reduces hosting costs by 3–4 times while maintaining similar performance.

Why developers are choosing to migrate from Fly.io in 2026

Fly.io started as an innovative platform offering to run Docker containers "closer to the user" using Firecracker microVM technology. However, as projects grow, many face unpredictable pricing and technical limitations of the Fly Machines architecture. The main reason for a fly.io migration is the need for full control over the operating system kernel and resource predictability.

Limitations of Firecracker micro-virtualization

Fly.io uses Firecracker to run lightweight virtual machines. While this is excellent for serverless tasks, it imposes restrictions on system calls, specific kernel modules, and complex network configurations. In contrast, KVM virtualization on a VPS provides a full guest OS where you can tune sysctl parameters, use any file system, and have direct access to CPU resources without the overhead of platform abstraction layers.

Pricing transparency and hidden fees

While Fly.io seems inexpensive at the start thanks to its Hobby tier, costs for egress bandwidth and dedicated IPv4 addresses begin to rise sharply as you scale. Switching fly to vps allows you to fix your budget: you pay a fixed amount for a resource package (CPU, RAM, Disk, Traffic), regardless of the number of micro-requests or internal platform network reconfigurations.

For comparison, see how a similar migration process is described in our guide how to migrate from Heroku to VPS in 2026: a step-by-step guide, where infrastructure savings reach even more impressive figures.

Feature Comparison: Fly.io vs. Classic VPS

When choosing a fly.io alternative, it is important to understand the difference in resource allocation. Fly.io operates with the concept of CPU "Shares" for cheaper plans, while a high-quality VPS provider offers dedicated vCPUs based on modern processors with frequencies from 3.0 GHz.

Feature Fly.io (Shared CPU) Valebyte VPS (KVM) VPS Advantage
Processor (1 core) Shared (CPU scheduling queues) Dedicated/High Priority vCPU Stable FPS and response time
RAM From 256 MB to 2 GB (base) From 1 GB to 64 GB More resources for the same price
Disk Subsystem Network Storage (Volumes) Local NVMe SSD Low latency (IOPS)
Public IPv4 Paid ($2/mo and up) Included in price Savings on network addresses
Management CLI (flyctl) / Limited SSH / Full Root access Any software without restrictions

As seen in the table, a VPS wins in tasks requiring constant load. If your application is more than just a script running once an hour—but a full-fledged backend, database, or game server—classic virtualization will be more efficient. For example, when running heavy applications like the best server for Minecraft 2026, using Fly.io micro-containers is practically impossible due to high RAM consumption and the need for stable CPU performance.

Looking for a reliable server for your projects?

VPS from $10/mo and Dedicated Servers from $9/mo with NVMe, DDoS protection, and 24/7 support.

View Offers →

Technical preparation for migrate from fly.io: exporting data

The migrate from fly.io process starts not with buying a new server, but with auditing the current fly.toml configuration and extracting data from Persistent Volumes. Unlike Heroku, Fly.io allows attaching disks, and these are the critical point of migration.

Step 1: Analyzing the fly.toml configuration

Your configuration file contains environment variables, port settings, and scaling rules. You need to transfer this data to a docker-compose.yml or your new VPS system variables. Pay attention to the [env] and [[services]] sections.


# Example fly.toml for migration
app = "my-awesome-app"
primary_region = "ams"

[env]
  DATABASE_URL = "postgres://user:pass@host:5432/db"
  PORT = "8080"

[[services]]
  internal_port = 8080
  protocol = "tcp"

Step 2: Dumping the database from Fly Postgres

If you are using a managed Fly.io database, remember that it is essentially a regular application within their network. To create a dump, you need to forward ports via fly proxy:

  1. Establish a connection: fly proxy 5433:5432 -a my-db-app
  2. Perform the dump to your local machine: pg_dump -h localhost -p 5433 -U postgres my_database > dump.sql
  3. Upload the dump to the new VPS via SCP: scp dump.sql root@your-vps-ip:/tmp/

Step 3: Copying files from Persistent Volumes

The most difficult stage of fly.io migration is transferring static files (user uploads, logs). Since there is no direct SFTP access to Fly.io volumes, use a temporary container or the fly ssh console command.


# Archive data inside the Fly container
fly ssh console -C "tar -czf /tmp/data.tar.gz /data"
# Download the archive to your local machine
fly sftp get /tmp/data.tar.gz
rocket_launch Quick pick

Looking for a server that just works?

Valebyte VPS — NVMe, 24/7 support, deploy in 60 seconds.

View VPS plans arrow_forward

Setting up network infrastructure and fly to vps

One of the main advantages of Fly.io is Anycast IP, which routes the user to the nearest data center. When moving fly to vps, you get a static IP in a specific region. This provides predictable ping and simplifies DNS record configuration.

Region selection and network latency

If your audience is concentrated in Europe, choose a VPS in Amsterdam or Frankfurt. If in the US—New York or Chicago. Unlike Fly, where instances can "roam," on a VPS you know exactly where your data is physically located. This is critical for legal compliance (GDPR) and for low-latency tasks such as ML inference. You can read more about choosing resources for neural networks in the article Bare-metal vs VPS for ML inference on CPU: which is more profitable?.

Setting up Nginx reverse proxy to replace Fly Proxy

Fly.io automatically handles SSL (HTTPS). On a VPS, you need to set this up yourself using Certbot (Let's Encrypt) or use Caddy, which does it automatically. Example Nginx configuration for your application:


server {
    listen 80;
    server_name yourdomain.com;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Deploying the application on the new VPS

Once the data is transferred and the network is configured, it's time to launch the application itself. The best way to make a fly.io alternative easy to maintain is to use Docker Compose. This allows you to run the backend, database, and cache (Redis) with a single command, much like Fly does under the hood.

Creating docker-compose.yml

This file will replace your fly.toml. It is more universal and will work on any hosting provider.


version: '3.8'
services:
  app:
    image: your-registry/app:latest
    restart: always
    ports:
      - "8080:8080"
    env_file: .env
    volumes:
      - ./uploads:/data/uploads
  db:
    image: postgres:15-alpine
    restart: always
    environment:
      POSTGRES_DB: my_db
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:

CI/CD Automation via GitHub Actions

Many are used to fly deploy, which builds the image automatically. On a VPS, you can set up a similar process. Use GitHub Actions to build the Docker image and push it to the server via SSH. This maintains the same level of convenience you're used to on PaaS platforms. We described a similar automation setup for those who decided to migrate from Vercel/Netlify to VPS.

Performance optimization after migration

After completing the migrate from fly.io, you will notice that your application runs faster. This is due to the absence of "noisy neighbors" and more powerful CPU cores on KVM VPS. However, to get the most out of it, you should perform basic OS optimization.

  • Swap Setup: Fly.io often limits swap usage. On a VPS, you can create a Swap file on an NVMe disk, which prevents application crashes during short-term RAM consumption spikes.
  • TCP Optimization: For high-load web applications, increase the limits for open connections in /etc/sysctl.conf.
  • Docker Logging: Limit the size of Docker logs so they don't consume all disk space (on Fly this is managed by the platform, on VPS—by you).

For projects focused on high real-time performance, such as game servers, the absence of micro-stutters is crucial. If you plan to launch a gaming project, check out our recommendations in the article how to migrate from Render.com to VPS in 2026, as the network stack optimization principles are similar.

rocket_launch Quick pick

Looking for a server that just works?

Valebyte VPS — NVMe, 24/7 support, deploy in 60 seconds.

View VPS plans arrow_forward

Security and Backups

By moving to a fly.io alternative, you take responsibility for security. Fly.io isolates applications at its network level; on a VPS, you need to configure the Firewall yourself.

Setting up UFW (Uncomplicated Firewall)

Allow only necessary ports: SSH (22), HTTP (80), HTTPS (443). All other ports, including database ports, should be closed to the outside world.


ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Backup Strategy

On Fly.io, volume backups are done automatically (snapshots). On a VPS, we recommend using a combination of snapshots at the hosting provider level and scripts for daily DB dumps to cloud storage (e.g., S3-compatible). This ensures that even if a container is accidentally deleted, your data remains safe.

Conclusion

Moving from Fly.io to a VPS is a logical step for projects that have outgrown the prototype stage and require stable performance at minimal cost. By using Docker Compose and Nginx, you maintain deployment flexibility while gaining full control over resources and a transparent hosting bill at the end of the month.

Ready to choose a server?

VPS and Dedicated Servers in 72+ countries with instant activation and full root access.

Start Now →
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.