Fly Machine API is ignoring autostart = false

I am creating a machine by sending the following JSON to the Machine API:

{
“name” : REDACTED,
“config” : {
“image” : REDACTED,
“env” : {
“APP_ENV” : “production”
},
“services” : [ {
“internal_port” : 65432,
“autostop” : “off”,
“autostart” : false,
“ports” : [ {
“port” : 65432
} ]
} ],
“auto_destroy” : false,
“guest” : {
“cpu_kind” : “shared”,
“cpus” : 1,
“memory_mb” : 512
}
}
}

I’ve set autostart = false, yet the machine starts immediately after creation anyway. How can I prevent this?

autostart is only for requests on the service, you are looking for skip_launch (in the top-level object).

Thanks. If I am using this machine solely through the Fly Proxy (via a private ipv6), and am starting the machine explicitly before usage, what do I set autostart to?

if you’re starting the machine explicitly before making any requests, the value of autostart doesn’t really matter as the proxy will never find a stopped machine on request and try to start it

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.