Auto Install GitLab on new Droplet Email is not working

February 3, 2015 2.6k views

I have setup 2 Droplets so far trying to get Gitlab working. I am using the Gitlab ready Ubuntu image for the auto-install when creating the droplet.

The first one was a %12,b server and gave 501 type errors, I did some research and came to the conclusion that I might need the 1gb of ram server. So I launched a new 1gb droplet with the same image and it had the same problem!

I then realized that a re-boot of the server fixed the problem so the 512mb server might of worked as well.

From this point it appeared on the surface everything was working good however when I created a new user account in Gitlab the only way to set a password is to let it email the user a password! Sounds fine except the email s would never send. It seems that the server may of not had Email setup or working by default!

As this pre-installed image was supposed to work out of the box according to all the tutorials I read, this email problem made no sense to me so I am assuming something is wrong with that prebuilt server image?

Anyone else use it to get Gitlab running and have similar issue?

The only thing I didn't do was I did not setup a domain name on that server for Gitlab but it is supposed to work on an IP as well. I'm not sure if that would affect the emails not being sent?

Any ideas on a fix maybe?

6 comments
  • I have tried the OneClick GitLab Install a couple times, I get nothing but errors....

    I followed the tutorial( https://www.digitalocean.com/community/tutorials/how-to-use-the-gitlab-one-click-install-image-to-manage-git-repositories ) which was emailed to me upon my first GitLab droplet creation. With or without making changes to the gitlab.rb, when I do "gitlab-ctl reconfigure" i get the following errors on a brand new droplet.

    http://pastebin.com/6ZtqrUd5

    Great service! ...but not exactly 1 click :)

    by Justin Ellingwood
    Git is the most popular distributed version control system in the world. GitLab is a git repository management system that can be used to mange repositories, users, access, and issues from within an easy-to-use web interface. In this article, we will cover how to use DigitalOcean's one-click GitLab installation image.
  • I am also having this issue, is there a resolution on this?

  • +1

    I also hit this issue with Gitlab emails not sending!
    (Note: I also had to work through the low RAM issue, which I eventually realized that Gitlab requires a minimum of 2GB before it can work correctly).

    It's clear that your deploy image needs tuning and/or the README which you drop on the box needs to be clearer about how to get this aspect of the configuration (email sending) successfully working post-install.

    Thanks.

  • Hi guys,

    I just used the OneClick Gitlab set up droplet and the only problem I ran into was also this.

    The solution (for me at least) was to add an SPF record to the DNS records for the droplet.

    You can do this by simply adding a TXT entry as follows:

    Record type: TXT
    Name: your dnshostname/ipaddress
    Value: v=spf1 ip4:<enter the ip address of your droplet> ~all

    For example. with my own domain I have an A record that aliases git.mydomain.com to my droplet's IP address. Then I created a TXT spf record with the name of the alias as it's name and the spf address as the droplets IP too.

    With this done I am now able to get past gmails spam filter as well as my own personal mail server (uses spamassassin).

    I hope this solves your issues.

  • For me the issue was that our mailserver was rejecting the mails because by default the droplet didn’t use a fully qualified domain for sending e-mails.

    So I've changed the “myhostname” entry in /etc/postfix/main.cf to e.g. mysubdomain.mydomain.com and restarted postfix with “postfix start” “postfix stop”.

    After that, the e-mails started to appear.

  • @team8f6a5b0b508 Great - that worked for me! Thanks.

1 Answer

This question was answered by @tenbroya:

Hi guys,

I just used the OneClick Gitlab set up droplet and the only problem I ran into was also this.

The solution (for me at least) was to add an SPF record to the DNS records for the droplet.

You can do this by simply adding a TXT entry as follows:

Record type: TXT
Name: your dnshostname/ipaddress
Value: v=spf1 ip4:<enter the ip address of your droplet> ~all

For example. with my own domain I have an A record that aliases git.mydomain.com to my droplet's IP address. Then I created a TXT spf record with the name of the alias as it's name and the spf address as the droplets IP too.

With this done I am now able to get past gmails spam filter as well as my own personal mail server (uses spamassassin).

I hope this solves your issues.

View the original comment

Have another answer? Share your knowledge.