By jeffcohen
I’d like to take a snapshot of an existing droplet to save me the time of reinstalling and configuring a new droplet from scratch. But I don’t want to copy the service definitions - or at least, I can’t have them start up automatically when I turn on the new droplet, because the new server will need different web server configurations and I don’t want duplicate background jobs to be running when I start the new Droplet.
Any advice?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Heya,
You can use any snapshot created from a Droplet to create new Droplets in any region where the snapshot is available. Following this page here:
https://docs.digitalocean.com/products/snapshots/how-to/create-and-restore-droplets/
Now, if you don’t want the services to start automatically, what you can do is disable them on the current Droplet, not stop but disable. The disable means that when you start your server those services won’t start automatically and then make the snapshot. After that re-enable them.
Also, even if those services start on the new Droplet it shouldn’t be a problem as there won’t be any DNS pointed to it YET.
Heya, @jeffcohen
Yes, you can snapshot the droplet, but to avoid conflicts on the new one, disable any services that auto-start before taking the snapshot:
Then take the snapshot. After creating the new droplet from it, adjust configs as needed before re-enabling services. This prevents issues like duplicate jobs or port conflicts.
Regards
When creating a new Droplet from a snapshot in platforms like DigitalOcean, the default behavior is to restore everything exactly as it was—including running services. However, if you want to set up a new Droplet without automatically starting the old services, there are several strategies you can use.
Option 1: Disable Services Before Taking the Snapshot The most reliable method is to stop or disable critical services (e.g., Apache, Nginx, MySQL) on the original Droplet before creating the snapshot. Use commands like:
arduino CopyEdit
sudo systemctl disable nginx sudo systemctl stop nginx
This prevents them from auto-starting when the snapshot is deployed as a new Droplet.
Option 2: Use Recovery or Rescue Mode
If the snapshot already exists, create the Droplet, then immediately reboot into Recovery Mode (or Rescue Mode) via your provider’s dashboard. Mount the filesystem and manually edit the service startup configurations, such as disabling services using systemctl
chrooted into the Droplet’s root.
Option 3: Modify Services on First Boot
Add a first-boot script (using cloud-init
or a custom script) that disables or modifies services right after the new Droplet starts. This is useful for automating the process at scale.
Option 4: Rename or Mask Service Units
Before snapshotting, you can rename or mask service files in /etc/systemd/system/
to prevent them from launching automatically on boot.
This approach ensures your new Droplet boots cleanly, giving you full control over which services to start and when.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.