Ask HN: Django hosting recommendations?

33 points by ryanx435 ↗ HN
Hey everyone. I've been looking for a webhost that allows me to run a Django app but ALSO has an email server that allows for my employees to have their work email on. The django app will also need the ability to connect to the email server to send account registration emails.

I really like heroku, but they don't have email hosting as an option. Hostgator has email hosting, but doesn't allow django apps.

any recommendations?

thank you

36 comments

[ 4.1 ms ] story [ 62.7 ms ] thread
I've used a couple sources in the past including Heroku.

I found Heroku at the time (this was more than two years ago) to be an adequate solution, but it was a little tedious and a little pricey. Nonetheless it had all sorts of easy integrations like Mailchimp and such that my Django application could easily use.

Today, with things like Digital Ocean, I wouldn't re-use Heroku for Django hosting. You also wrote that you'd like to roll your own email server, so I think that would cut out Heroku completely.

I think you'd be most interested in trying out Digital Ocean for a bit. Start with a $5 server and https://www.digitalocean.com/community/tutorials/how-to-use-... see if it works for you or not. $5 isn't much to lose on an experiment and if it works for you, you can spin up one of their other issues

I've always been happy with https://www.webfaction.com. Includes one-click installer for Django. Webmail options are basic. But they are an option, or users could receive mail through an email client. But I would also recommend forwarding mail services to https://www.fastmail.com.
webfaction is good, but no matter how much money you pay them they don't offer a phone or chat support. That's why we moved away from them. Otherwise, I think they are very good.
That's a fair knock. Email support system has been pretty good, though. At least very knowledgable support staff. But I can see where more would nice, particularly if paying at a certain level.
For my purposes, they have been quick to respond to questions via email, but I haven't had problems that required an immediate response via phone.
We've used Digital Ocean to host Django projects for years, with no issue!
You're limiting your options by insisting to have both app and email hosting with the same company. My suggestion is to investigate them separately.

For app hosting, fire and forget (Heroku, Amazon Elastic Beanstalk), shared hosting (like Webfaction and many others), VPS/dedicated server (like AWS EC2, Digital Ocean and many others).

Managed options will take a lot less effort and knowhow to keep a production app running, but cost more. Your own server (VPS) will get you more resources for the same price, but you'll have to configure and maintain everything yourself (app server, static files, database, load balancing, backups and recovery, monitoring, upgrades, security, performance, scaling, etc).

For company email, Office 365, Google G Suite, Rackspace Mail. Maybe Amazon WorkMail (I only know it exists).

Edit: I misunderstood that you're looking for email service. If you want to run your mail server yourself, you need 1) a computer you control (VPS/dedicated) and 2) to know what you're doing. Unless you have a good reason to do that, I suggest you outsource it and get on with your business.

>You're limiting your options by insisting to have both app and email hosting with the same company. My suggestion is to investigate them separately.

Even if you do have them with the same company you should have them installed on separate VPS. Sounds like OP wants it all on one server, which I would advise against.

Don't combine the two; outsource your email hosting (Google, etc) to save a lot of pain, and select your Django hosting from a large range of options, from Digital Ocean to Heroku to AWS.

No technical reason these two need to be hosted together, and the market has definitely not favored putting all these eggs in one provider.

>Don't combine the two

>No technical reason these two need to be hosted together

Sound advice. To me it sounds like maybe the OP wants both on the same VPS, which is a horrible idea. Even if you found one provider, still you should have separate VPS's for the email and Django app.

$5/month droplets with Digital Ocean would be my vote. You have the freedom to use whatever email server you want.
I host my Django app on Heroku and use Amazon SES to send email. On Amazon, I use WorkMail, which is built on top of SES and works seamlessly with it.
> The django app will also need the ability to connect to the email server to send account registration emails

Beyond the technical/architectural issues others have brought up, you should not be mixing transactional email with work email for a business. Use a transactional provider like Sendgrid/Mailgun/Mailchimp to manage your registration messages, and run the employee email through something entirely different (a separate server or GApps). It's only a matter of time before someone marks someone's sales email as spam and you end up not being able to send registration emails because Spamhaus has blacklisted your IP.

This might make your solution easier, as you can use an email addon with Heroku for transactional, and then get to choose whatever host you want for employee mail without having to be constrained by needing Django hosting as well.

Postmark another good provider. Moved everything the them after some php mail scripts failed to send without any notice.
I'd recommend you keep using Heroku, and use a service such as Mailgun for emails. The only change you'd need is to add SMTP parameters for mailgun/whatever in heroku and django config.

If you still want to host your own email server, perhaps setup a Digital Ocean instance and have the smtp credentials on heroku.

I used Zappa[0] and AWS Lambda to host a Flask application recently. After years of deploying Flask applications to VPSs behind Apache, I was pretty impressed by how simple it was to deploy a serverless app. Nice that there's no need to worry about security patches, OS updates, HTTPS cert renewals, etc. And so far it's waay cheaper for my usage too. If your Django app doesn't have too many dependencies, it might be worth considering. Then you can use AWS Simple Email Service (or any of the many third-party services already recommended) for the email needs.

[0] https://github.com/Miserlou/Zappa

Another voice for separating the two to separate servers -- separate hosting providers, even, if that ends up making sense.
don't use hostgator. discount hosting solutions, in general, are bad fits for django which kind of takes for granted that you have shell access to the server and know a little bout of unix sysadmin.

AWS EC2 is a great host but requires you to know how to admin the server a bit. Heroku is good for small deployments but the budget options don't scale very well. An AWS competitor like Rackspace or similar might be good too, especially if you're looking for lower prices.

as for email, get a business account (with custom domain) from gmail or something similar. you really don't want to be hosting your own email, not even for a small company. seriously that's a headache you just don't want to deal with if you don't strictly have to (legal compliance requirements, for example). it's not like it costs much to use a hosed solution for email.

the django app needs to connect to the email server? why? isn't the whole point of email that you send messages via SMTP and don't have to have a server-to-server connection? I think you may have some technical requirements you need to pin down with more rigor.

Many in the thread have said what I would say: Don't mix your email with the sending of transactional emails. If you're comfortable with Heroku I recommend staying there and using something like SES, SendGrid, or Mail Gun to send the account registration emails.

But, also remember, for most transactional email providers you could allow it to send as your employees if that is an important part of your needs. That way you can keep them separate and keep the ability to send email as your employees.

I use webfaction to host multiple wordpress sites and so far the performance and support is good. it support python / Django hosting

For email I think it's better to use email service like google apps, office 365, zoho mail or fastmail.

For account registration emails, it's better to use transactional email service like sendgrid, mandrill, mailgun, mailjet, or postmark.

I have been very, very happy with Webfaction for about 7 years now. Great support for Django. Basically everything you could ask for in a shared hosting solution. $10/m. They also offer non-shared plans from $20/m.

SSH access (even on the shared plan) is the killer feature for me. I also really appreciate the simplicity of their approach (domains + applications = websites).

Non-affiliate link: https://www.webfaction.com/

Affiliate link: https://www.webfaction.com/?aid=34899

I will second this! I have used them for quite some time and their customer support is extremely responsive! I also like having ssh access.
I've been really happy with Pythonanywhere, a PAAS (basically Heroku, but exclusively for Python). Pretty cheap, really easy to set up Django right out of the box, and great customer service (fast responses to emails and forum posts, even when they're less about the hosting and more about how to do something in Python or Bash).

My co-founder and I ran our startup on Pythonanywhere and used transactional email (although we used Mandrill) with no issues.

Amazon Lightsail [1] for Hosting, SES [2] for transactional emails, Workmail [3] for corporate email (though I'm not sure why your company email has to be in any way related to your app server.)

[1] https://amazonlightsail.com/ [2] https://aws.amazon.com/ses/ [3] https://aws.amazon.com/workmail/

But Lightsail is not Django hosting...
Call up your ISP and ask for a business account with static-IP address. I use a server on a static IP address from my Verizon FIOS ISP.

I get to run any size Django web server I want, and built a custom server for around $2000, and I get to host my own email server as well. I use a Mac Mini server to get the mail server running. Quite easy.