Moving a Production App from Heroku to Proxmox
I moved an application from Heroku to a self-hosted Proxmox VM and learned that deployment is easy compared with backups, recovery, monitoring, and maintenance.


I started the Heroku migration with the kind of confidence that usually means I had underestimated the work. The plan looked short: create a VM, move the application, copy the environment variables, update the domain, and shut down the old setup. Heroku had made the existing deployment feel smaller than it really was. Once I moved it onto Proxmox, every hidden platform decision appeared in front of me.
The first version was deliberately boring
I did not want to run the application directly on the Proxmox host. That would have made the first deployment slightly quicker, but it would also have mixed application dependencies with the hypervisor and made future maintenance harder to reason about. I created a dedicated virtual machine and kept the host focused on virtualization.
Inside the VM, I used Docker Compose. The application container was separate from persistent data, and the deployment files lived in a small, readable directory rather than being scattered across manual shell commands. That choice mattered when I had to inspect the setup later. I could see the image, ports, volumes, restart policy, and environment file in one place.
Caddy sat in front of the application as the reverse proxy. It handled the public domain and HTTPS while the application stayed on an internal port. This was one of the first places where the migration stopped being a simple copy. Heroku had provided a public route with very little visible configuration. On the VM, I had to decide which port should be exposed, which service should receive traffic, and how the certificate would be renewed.
The first container started, but the application was not reachable from the domain. I checked the container logs first, then the VM firewall, then the DNS record. The mistake was ordinary: the application was listening correctly inside the VM, but the expected public path had not been allowed through the surrounding network rules. Nothing was broken in the code. I had simply moved the responsibility for the path between the internet and the process onto my own checklist.
Copying environment variables was not enough
Moving the environment values looked like the easiest part, and it mostly was. The annoying detail was that a variable can be present and still be wrong for a new environment. Database URLs, callback domains, allowed origins, file paths, and service endpoints all had to be checked against the new network layout.
I initially treated the old Heroku configuration as the source of truth. That was a false start. Some values were specific to the old deployment, while others were only there because Heroku had supplied a convention around the application process. I had to separate secrets from platform assumptions and then test the application flow by flow instead of trusting a successful container health check.
A container being marked healthy did not tell me whether a user could complete the important actions. I tested the public page, authentication, background work, database access, and the routes that depended on environment-specific URLs. One service came up after a restart but failed when it tried to reach a dependency because the internal address had changed. That took longer to diagnose than I expected because the initial logs showed a generic connection error rather than the useful part of the configuration mistake.
The real migration was failure recovery
Deployment was the visible part of the project. Recovery was the part that made me uncomfortable.
On Heroku, I had become used to process restarts being a platform feature. On Proxmox, Docker could restart a container, but that did not answer what happened when the VM disk filled up, the host lost power, the database became corrupted, or I deleted the wrong volume. A restart policy is not a backup. A Proxmox snapshot is not automatically an off-site copy. A server responding to a ping is not proof that the application is healthy.
I added VM snapshots to the maintenance routine, but I did not stop there. Persistent application data needed its own backup path, and those backups needed to leave the same physical machine. I also started paying closer attention to disk usage because Docker images, old logs, and database files can quietly consume the space that a small VM depends on. This was less exciting than configuring HTTPS, but it was more important.
The power-cut question stayed in my head longer than I expected. If the host came back after an outage, would the VM start, would Docker start, would the containers start in the correct order, and would the application recover without manual intervention? I tested pieces of that flow rather than assuming the answer was yes. The system was more reliable once I had replaced assumptions with actual checks.
Keeping the Proxmox host boring
The temptation with a self-hosted server is to keep adding useful services. The node has capacity, the tools are available, and another container can look harmless. I decided to resist that. The Proxmox host should do as little as possible beyond running the virtual machines and providing the infrastructure they need.
That separation made troubleshooting clearer. If the application had a problem, I could work inside its VM. If the VM had a problem, I could inspect the hypervisor and storage separately. I did not want application deployments, experiments, monitoring tools, and network utilities all competing for attention on the same host during maintenance.
Monitoring was another uncomfortable gap. Heroku had given me a useful operational baseline without forcing me to design it. With Proxmox, I needed to watch more than application logs. I cared about VM availability, disk space, container state, backup success, and the basic health of the host. I still check disk alerts more often than I would like because storage problems tend to become urgent without much warning.
There was also a tradeoff in convenience. Heroku let me spend more time inside the application and less time thinking about certificates, firewall rules, VM startup, and recovery procedures. Proxmox gave me control over the environment and the cost structure, but that control came with recurring attention. The work did not disappear. It moved from a platform dashboard into my own operating habits.
The migration succeeded, but the most useful outcome was not a faster page or a dramatic performance figure. It was a clearer understanding of what the application actually depends on. I now treat deployment as only one part of hosting. The more important question is what happens when the process stops, the disk fills, the host reboots, or I need to rebuild the machine from a clean starting point. Moving from Heroku to Proxmox gave me more control, but it also made me responsible for earning that control through backups, testing, monitoring, and deliberately boring infrastructure.

Rafiqul Islam Rabbi
Full-Stack & E-Commerce Architect building high-converting Shopify stores, WordPress platforms, and Next.js web applications.