Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi, I getting started with DigitalOcean V2 API. When I tried create droplet with user data via API, server is created without executed my code. The same code when I did pasted in the browser and created droplet working properly.
This is my code:
$droplet->create('the-name',
'nyc1',
'512mb',
'ubuntu-16-04-x64',
false,
false,
false,
array($key),
'
#!/bin/bash
sudo apt-get update
debconf-set-selections <<< "postfix postfix/mailname string domain.com"
debconf-set-selections <<< "postfix postfix/main_mailer_type string \'Internet Site\'"
apt-get install -y postfix
sudo postconf -e \'home_mailbox= Maildir/\'
sudo postconf -e \'virtual_alias_maps= hash:/etc/postfix/virtual\'
printf "kontakt@e-cleaner.net.pl root" > /etc/postfix/virtual
sudo postmap /etc/postfix/virtual
sudo systemctl restart postfix
sudo apt-get update
sudo ufw allow Postfix
echo \'export MAIL=~/Maildir\' | sudo tee -a /etc/bash.bashrc | sudo tee -a /etc/profile.d/mail.sh
sudo apt-get install s-nail
echo \'init\' | mail -s \'init\' -Snorecord
What is the reason of my problem?
56bd8300516443db8f6e925c6721b4
affiliatetrading
admin
saeeddarabi
djanym
skeddtemp
gebelo
martinjameslynn
Brenda Morales
d02e0b7b59c2429cb46fcbb782