Today's upgrade: Let's Encrypt auto-renew and much much more!

This morning’s system update went pretty smoothly, and we have some cool new stuff to announce:

Let’s Encrypt certificates with automatic renewal

You can now get an HTTPS certificate for your custom domain using Let’s Encrypt without all that tedious mucking around with dehydrated – and you don’t need to remember to renew the certificate either, or even set up a scheduled task to renew your certificate for you.

Just go to the new “HTTPS certificate” line in the “Security” section of the “Web” tab. You’ll see a pencil icon next to the kind of certificate you have (which will probably be “None” or “Custom”). Click the pencil, and you’ll see that there’s an option called “Auto-renewed Let’s Encrypt certificate”. If you select that and click “Save”, we’ll get a fresh certificate for your site from Let’s Encrypt – and well before it expires, our system will automatically renew it for you.

If you have a certificate that you’ve bought from some other organisation like Comodo or GoDaddy, you can also configure it from here – select the “Custom certificate” option, and you’ll get input fields where you can copy and paste the private key and the combined certificate.

We have detailed instructions with screenshots on the help site.

The old ways of setting up a certificate still work – you can use dehydrated, or get a certificate from a third party like GoDaddy, and upload everything using the command-line scripts.

MySQL 5.7

New accounts created from today will use MySQL 5.7. If you’re still on 5.6 and would like your databases moved over to a 5.7-compatible server, get in touch over – the move won’t happen until early next year, though.

Fixes for Firefox and Selenium from website code

Several people reported a problem where you could not run Selenium from website code from a Hacker account – you needed a Web Dev account or better. This was a bug, not a feature, so we fixed it :-)

CPU sharing enhancements

There was a problem where people who had used all of their CPU allowance could continue to use lots of server resources; this isn’t something that would have been useful for anyone or that we think anyone was doing deliberately – it would only happen if they started processes which did nothing and then restarted. So it just meant that if one person had a certain kind of bug in their code and then went into the tarpit, they’d use up CPU that could have been put to better use by people who were actually trying to run working code :-) We’ve put a fix in place to stop that from happening.

And that’s it!

Of course, there were the normal minor tweaks and bugfixes, but those are the highlights. A very happy holiday season to everyone, and we look forward to being able to show you some cool new stuff in the new year!

Always-on tasks

Always-on tasks are a new feature we rolled out in our last system update. Essentially, they’re a way you can specify a program and tell us that you want us to keep it running all the time. If it exits for any reason, we’ll automatically restart it – and even in extreme circumstances, for instance if the server that it’s running on has a hardware failure, it will fail over to a working machine quickly.

Read more…

Today's Upgrades: Always-On Tasks

Always-On Tasks

We are officially live with our always-on tasks! All paying customers will get one always-on task, and you can add more by customizing your plan on our accounts page. Our infrastructure will try to keep your script always running (ie. we will restart it if your script errors and stops etc). We’d love to know what you think- Just drop us a line using the “Feedback” link, or email us at!

Logging Improvements

We have also improved user experience working with log files. You can now access our API to delete log files (or wipe the file if your particular log file is currently in use), and we have better formatting in place when logging certain web app errors.

Other Stuff

We also optimized the editor that you can access from the ‘Files’ tab to make consoles within it start faster and to avoid scripts rerunning unintentionally.

Auto-renewing your Let's Encrypt certificate with scheduled tasks

This blog post is out-of-date – we can now manage all of your Let’s Encrypt certificates automatically. See this help page for details.

Let’s Encrypt certificates are really useful for custom domains – you can get HTTPS working on your site for free. Their one downside is that the certificate only lasts for 90 days, so you need to remember to renew it.

The good news is that you can set up a scheduled task to do that all for you – no need to put anything in your calendar.

Read more…

Turning a Python script into a website

One question we often hear from people starting out with PythonAnywhere is “how do I turn this script I’ve written into a website so that other people can run it?”

That’s actually a bigger topic than you might imagine, and a complete answer would wind up having to explain almost everything about web development. So we won’t do all of that in this blog post :-) The good news is that simple scripts can often be turned into simple websites pretty easily, and in this blog post we’ll work through a couple of examples.

Let’s get started!

Read more…

The PythonAnywhere newsletter, September 2018

Well, our last “monthly” newsletter was in September 2017. We must have shifted the bits in the period left one, or something like that :-)

Anyway, welcome to the September 2018 PythonAnywhere newsletter :-) Here’s what we’ve been up to.

Read more…

Force HTTPS on your website

One smaller feature we added in our last system update was the ability to force HTTPS without needing to change your code. Here’s a bit more information about why you might want to do that, and how it works.

Read more…

Python 3.7 now available!

If you signed up since 28 August, you’ll have Python 3.7 available on your account – you can use it just like any other Python version.

If you signed up before then, it’s a little more complicated, because adding Python 3.7 to your account requires changing your system image.

Read more…

New feature: self-installation of SSL certificates!

This blog post is out-of-date – we can now manage all of your Let’s Encrypt certificates automatically, and have a UI to upload custom certificates. See this help page for details.

Our system update last week added on an API to let you install HTTP certificates yourself instead of having to email us. We’ve been beta-testing it over the last seven days, and it’s now ready to go live :-)

You can either use it by accessing the API directly from your code, or by using our helper scripts (which you can pip install).

This is the first step towards a much improved system for HTTPS – watch this space for more information.

Read more…

System update this morning

We deployed a new version of PythonAnywhere this morning. Everything went pretty smoothly; there were a few problems with some hosted websites shortly afterwards (an error in a load-distribution algorithm put too many websites on some servers, and not enough on others) but some sharp-eye customers spotted the problem and let us know, and we were able to rebalance things and fix the issue quickly.

There are a couple of great new features in the new system, but we’re doing some last-minute testing before making them live – watch this space for more information :-)