Guides / Host a Django app for a client without becoming their sysadmin, with Django Cloud
Host a Django app for a client without becoming their sysadmin, with Django Cloud
You built the app. Now the client wants it live, and someone has to own the server, the certificate, the database backups and the 3 a.m. alert. If that someone is you, hosting turns a fixed-price project into an open-ended job. Here is how to ship a Django app for a client without becoming their sysadmin.
The real problem is ownership, not servers
Most hosting trouble on client work comes from three unanswered questions:
- Whose account is it? If the app runs in your account, the client depends on you. If it runs in theirs, they can always walk away with their data.
- Who pays? The bill should reach the party who benefits, without you fronting cloud costs.
- Who gets the alert? A hosting setup you have to babysit is a support contract you did not price.
Three ways to set it up
- Your account, billed through. Quick to start, but you carry the risk and the client cannot leave without a migration.
- The client's own AWS account, with a role for you. The client creates the account and a limited access role. You deploy through it. They pay AWS directly and can end your access by deleting the role.
- A managed platform with an account per customer. Someone else runs the account and the servers, and the app is still kept apart from other customers.
What to ask any host before you commit
- Can I see the bill and the resources, or only a dashboard?
- What happens to the running app if I stop paying you, or the client stops paying me?
- Can a failed release leave the site down? (It should not: the previous release should keep serving.)
- Can I roll back with one action?
- Where do the logs live, and can the client read them without calling me?
A small checklist for the first deploy
- Set
DEBUG = False, a realSECRET_KEYandALLOWED_HOSTSfrom environment variables. - Use PostgreSQL, not SQLite, for anything with real users.
- Keep secrets out of the repository; give the client a way to rotate them.
- Put the custom domain on HTTPS before launch day.
- Write down who is on call, and for what, in the contract.
Or skip it
Django Cloud gives each client app an AWS account of its own: yours to hand over on Self-hosted, or run for you on Fully managed. You deploy with one command, roll back in a click and read the logs in the dashboard.
pip install djangocloud-cli
djangocloud deploy
Free plans are available for students, AWS Activate startups, open-source, non-profit and research projects. See how Django Cloud compares with other ways to host Django.
Django is a registered trademark of the Django Software Foundation. Django Cloud is not affiliated with or endorsed by it. Found a mistake in this guide? Tell us and we will fix it.