Can i suppress the email getting sent from the droplet create via the API

Posted July 24, 2015 2.8k views

So here’s my problem, i have looked around and can’t seem to find a solution to it, or i may just be googling the wrong terms.

I’m trying to setup droplet creation via the API and i’m using the user-date( cloud-config ) to run command’s. But no matter what i try and do the email associated with the account gets and email saying that the droplet is ready and the root password is “blah”.

So my question is how do i suppress that email so that the email does not get sent to the associated email with that account.

I know i could attach an SSH key but I’m trying to avoid attaching a Key via the API to the account in question.

1 comment
  • As far as my knowledge goes, this, at present is not possible. Either you use SSH-Keys so no mail is shot or be ready for this mail with a root password.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

@saurabh is correct. There isn’t currently any way to suppress the root password mail except for adding a SSH key.

Hi @asb I don’t know how to post a new question, so I’ll just post mine here.

I can’t open my PostgreSQL remotely using PgAdmin. Kindly see the image link below for the prompt.

I’ve already did this to iptables and the postgre is running fine.
iptables -A INPUT -p tcp -m tcp –dport 5432 -j ACCEPT
iptables -A OUTPUT -p tcp -m tcp –dport 5432 -j ACCEPT

see the image link for the result of iptables -L

  • @VinzMendiola It sounds like PostgreSQL is listening on the loopback interface ( only, which is why you’re not able to connect to it from your computer.

    The most secure option would be setting up SSH tunneling so that port 5432 on your local computer is mapped to port 5432 on your droplet securely via SSH.

    Another option would be configuring PostgreSQL to listen on all network interfaces, including the external/public one. Keep in mind that this allows anyone to connect to PostgreSQL (they do have to authenticate, but making it listen publicly opens the door to bruteforce attacks and such). To do that, edit PostgreSQL’s config file and set listen_addresses to '*':

    sudo nano /etc/postgresql/*/main/postgresql.conf
    listen_addresses = '*'

    Then, restart PostgreSQL:

    sudo service postgresql restart
    In this article, you'll learn how to create a safe, encrypted tunnel between your computer and your VPS along with how to bypass limits in a corporate network, how to bypass NAT, etc.