# Django

**URL:** https://community.fly.io/c/django/26.md

[Latest](https://community.fly.io/latest.md) · [Categories](https://community.fly.io/categories.md) · [Tags](https://community.fly.io/tags.md)

---

## [About the Django category](https://community.fly.io/t/about-the-django-category/8538)

<div class="topic-metadata">

**Author:** [@Mark](https://community.fly.io/u/Mark)\
**Replies:** 1\
**Last updated:** [November 9, 2022, 5:07pm UTC](https://community.fly.io/t/about-the-django-category/8538 "2022-11-09T17:07:23Z")

</div>

All about Django apps running on Fly.io. Django is a popular Python-based web framework.

---

## [Celery Beat process hangs silently after several hours](https://community.fly.io/t/celery-beat-process-hangs-silently-after-several-hours/25444)

<div class="topic-metadata">

**Author:** [@driez17](https://community.fly.io/u/driez17)\
**Replies:** 17\
**Last updated:** [October 19, 2026, 7:43pm UTC](https://community.fly.io/t/celery-beat-process-hangs-silently-after-several-hours/25444 "2026-10-19T19:43:35Z")

</div>

Hi Fly.io Community, I’m running into a persistent issue with Django + Celery Beat on Fly.io and would love to get input from others who might have experienced similar problems. The Problem My celery beat process occas…

---

## [Health check consistently failing](https://community.fly.io/t/health-check-consistently-failing/28489)

<div class="topic-metadata">

**Author:** [@dalythe](https://community.fly.io/u/dalythe)\
**Replies:** 11\
**Last updated:** [August 20, 2026, 1:55pm UTC](https://community.fly.io/t/health-check-consistently-failing/28489 "2026-08-20T13:55:17Z")

</div>

I have been having this problem for the last day. I have not been able to pass a health check since I signed up. I have ssh to validate connectivity and that was successful but when I deploy via my GitHub Action, I get n…

---

## [Unable to deploy or scale machines suddenly](https://community.fly.io/t/unable-to-deploy-or-scale-machines-suddenly/23464)

<div class="topic-metadata">

**Author:** [@jafjaf](https://community.fly.io/u/jafjaf)\
**Replies:** 23\
**Last updated:** [January 16, 2026, 10:49am UTC](https://community.fly.io/t/unable-to-deploy-or-scale-machines-suddenly/23464 "2026-01-16T10:49:15Z")

</div>

Hi, was just trying to deploy an update for my app. Ran the usual flyctl deploy command and ran into this new error. Running \<app\> release\_command: ./manage.py collectstatic --noinput ------- ✖ Failed: error running …

---

## [Django Celery service healthchecks](https://community.fly.io/t/django-celery-service-healthchecks/26221)

<div class="topic-metadata">

**Author:** [@kulor](https://community.fly.io/u/kulor)\
**Replies:** 1\
**Last updated:** [October 17, 2025, 1:52pm UTC](https://community.fly.io/t/django-celery-service-healthchecks/26221 "2025-10-17T13:52:03Z")

</div>

I’m wanting to add healthchecks for my Celery services but it’s not clear how to do this from the docs. I’ve got the machine check working for deployment. It’d be great if this was also called for healthchecks but it is…

---

## [Server 500 Error - Django Deployment](https://community.fly.io/t/server-500-error-django-deployment/6728)

<div class="topic-metadata">

**Author:** [@maigi](https://community.fly.io/u/maigi)\
**Replies:** 10\
**Last updated:** [July 15, 2025, 8:06pm UTC](https://community.fly.io/t/server-500-error-django-deployment/6728 "2025-07-15T20:06:50Z")

</div>

Hey All, I just deployed my app, able to punch it through successfully after some debugging but it’s returning a 500 server error, not sure how to troubleshoot from here. https://datatibute-fly.fly.dev/

---

## [Can't seem to upload images in Volume](https://community.fly.io/t/cant-seem-to-upload-images-in-volume/25070)

<div class="topic-metadata">

**Author:** [@mesrefoglu](https://community.fly.io/u/mesrefoglu)\
**Replies:** 16\
**Last updated:** [June 7, 2025, 2:24am UTC](https://community.fly.io/t/cant-seem-to-upload-images-in-volume/25070 "2025-06-07T02:24:44Z")

</div>

I’m hosting Django (backend) on Fly and React (frontend) on Cloudflare. Here’s my frontend code to upload an image: export const createPostApi = async (imageFile, text) =\> { const formData = new FormData(); for…

---

## [Deploy fails: AttributeError: module 'marshmallow' has no attribute '\_\_version\_info\_\_'](https://community.fly.io/t/deploy-fails-attributeerror-module-marshmallow-has-no-attribute-version-info/24762)

<div class="topic-metadata">

**Author:** [@jamesmcelvenny](https://community.fly.io/u/jamesmcelvenny)\
**Replies:** 0\
**Last updated:** [May 4, 2025, 6:38am UTC](https://community.fly.io/t/deploy-fails-attributeerror-module-marshmallow-has-no-attribute-version-info/24762 "2025-05-04T06:38:40Z")

</div>

I’m updating a Django app that has been up on fly.io for several months. When I run the fly deploy it consistently fails with the error AttributeError: module 'marshmallow' has no attribute '\_\_version\_info\_\_' on the re…

---

## [An error occurred (403) when calling the HeadObject operation: Forbidden](https://community.fly.io/t/an-error-occurred-403-when-calling-the-headobject-operation-forbidden/24554)

<div class="topic-metadata">

**Author:** [@Simpson](https://community.fly.io/u/Simpson)\
**Replies:** 4\
**Last updated:** [April 12, 2025, 9:49am UTC](https://community.fly.io/t/an-error-occurred-403-when-calling-the-headobject-operation-forbidden/24554 "2025-04-12T09:49:58Z")

</div>

I have deployed the backend with django, which works fine, but I have one issue with the s3 bucket, which I have configured the secret and key in the project environment. Testing the backend on returns An error occurred …

---

## [I can't deploy a django app to the singapore region](https://community.fly.io/t/i-cant-deploy-a-django-app-to-the-singapore-region/24361)

<div class="topic-metadata">

**Author:** [@Joe\_Jain](https://community.fly.io/u/Joe_Jain)\
**Replies:** 1\
**Last updated:** [March 25, 2025, 1:18pm UTC](https://community.fly.io/t/i-cant-deploy-a-django-app-to-the-singapore-region/24361 "2025-03-25T13:18:54Z")

</div>

I’m getting this error below even though the Singapore region has no issues. :multiply: \[1/2\] Failed: timeout reached waiting for machine’s state to change \[2/2\] Waiting for job Error: timeout reached waiting for ma…

---

## [Django ALLOWED\_HOSTS error](https://community.fly.io/t/django-allowed-hosts-error/19896)

<div class="topic-metadata">

**Author:** [@shicholas](https://community.fly.io/u/shicholas)\
**Replies:** 4\
**Last updated:** [March 19, 2025, 3:24pm UTC](https://community.fly.io/t/django-allowed-hosts-error/19896 "2025-03-19T15:24:28Z")

</div>

I get a Sentry Error for an ALLOWED\_HOSTS error from our Django app deployed on Fly. DisallowedHost / Invalid HTTP\_HOST header: '146.70.54.85'. You may need to add '146.70.54.85' to ALLOWED\_HOSTS. How can I know which …

---

## [couldn't import Django from console](https://community.fly.io/t/couldnt-import-django-from-console/24178)

<div class="topic-metadata">

**Author:** [@catmanstudios](https://community.fly.io/u/catmanstudios)\
**Replies:** 2\
**Last updated:** [March 10, 2025, 8:27pm UTC](https://community.fly.io/t/couldnt-import-django-from-console/24178 "2025-03-10T20:27:01Z")

</div>

File “/code/manage.py”, line 8, in from django.core.management import execute\_from\_command\_line ModuleNotFoundError: No module named ‘django’ I just launched my first django app on the platform. It’s running, but I n…

---

## [Media files don't show on Django app in production mode on mounted device](https://community.fly.io/t/media-files-dont-show-on-django-app-in-production-mode-on-mounted-device/24060)

<div class="topic-metadata">

**Author:** [@Lukasz](https://community.fly.io/u/Lukasz)\
**Replies:** 4\
**Last updated:** [February 27, 2025, 11:13am UTC](https://community.fly.io/t/media-files-dont-show-on-django-app-in-production-mode-on-mounted-device/24060 "2025-02-27T11:13:09Z")

</div>

Hi, I am new to fy.io, the background - I have a running Django app on fly.io and it appears that there is incorrect setup with media files - it seem not to work properly in production mode. and it all comes to fly.toml…

---

## [Your (fly.io) og:image is broken](https://community.fly.io/t/your-fly-io-og-image-is-broken/24026)

<div class="topic-metadata">

**Author:** [@KTibow](https://community.fly.io/u/KTibow)\
**Replies:** 0\
**Last updated:** [February 23, 2025, 11:57pm UTC](https://community.fly.io/t/your-fly-io-og-image-is-broken/24026 "2025-02-23T23:57:23Z")

</div>

Django Beats has an og:image of https://fly.io/django-beats/assets/https://fly.io/static/images/default-post-cover.webp, which is a 404

---

## [Django app stopped working due to the postgres cluster got suspended](https://community.fly.io/t/django-app-stopped-working-due-to-the-postgres-cluster-got-suspended/23513)

<div class="topic-metadata">

**Author:** [@Accent24](https://community.fly.io/u/Accent24)\
**Replies:** 2\
**Last updated:** [January 16, 2025, 5:19am UTC](https://community.fly.io/t/django-app-stopped-working-due-to-the-postgres-cluster-got-suspended/23513 "2025-01-16T05:19:48Z")

</div>

Hell Guys. I have faced a strange issue. After my app successfully ran for 5 month and I gathered some data already it stopped to work! Just like this… it work till it doesn’t When the website opens I see the login pag…

---

## [Deployment error - Django app](https://community.fly.io/t/deployment-error-django-app/23458)

<div class="topic-metadata">

**Author:** [@neptunhiker](https://community.fly.io/u/neptunhiker)\
**Replies:** 4\
**Last updated:** [January 15, 2025, 6:55pm UTC](https://community.fly.io/t/deployment-error-django-app/23458 "2025-01-15T18:55:57Z")

</div>

Hi all, I have built a Django app and have deployed (via the CLI command ‘flyctl deploy’) that app many times successfully to live. The last successful deployment was yesterday and after minor changes to the Django code…

---

## [Fly ssh exits without error when running python manage.py shell](https://community.fly.io/t/fly-ssh-exits-without-error-when-running-python-manage-py-shell/23481)

<div class="topic-metadata">

**Author:** [@randallemery](https://community.fly.io/u/randallemery)\
**Replies:** 2\
**Last updated:** [January 15, 2025, 2:48am UTC](https://community.fly.io/t/fly-ssh-exits-without-error-when-running-python-manage-py-shell/23481 "2025-01-15T02:48:57Z")

</div>

Hi – I have a simple django project deployed on fly. It’s up and running successfully and I can sign up as a user. I want to promote it to a superuser using the django shell, so perform the commands below: fly ssh cons…

---

## [Cannot Deploy Django App](https://community.fly.io/t/cannot-deploy-django-app/23331)

<div class="topic-metadata">

**Author:** [@PythonStan](https://community.fly.io/u/PythonStan)\
**Replies:** 0\
**Last updated:** [January 6, 2025, 12:35am UTC](https://community.fly.io/t/cannot-deploy-django-app/23331 "2025-01-06T00:35:52Z")

</div>

Hello, I am unable to deploy my Django app. I get the following error. Also I passed the fly doctor and ran the Django deploy check with no issues. Any assistant would be greatly appreciated! See below for my fly.t…

---

## [Scale to zero worker](https://community.fly.io/t/scale-to-zero-worker/22854)

<div class="topic-metadata">

**Author:** [@patrickpy](https://community.fly.io/u/patrickpy)\
**Replies:** 4\
**Last updated:** [January 5, 2025, 8:34pm UTC](https://community.fly.io/t/scale-to-zero-worker/22854 "2025-01-05T20:34:39Z")

</div>

Hi there! I have a project where i need to convert some video files via ffmpeg, but those tasks are sporadic, at most once a day, I was thinking of using something like huey or celery to manage those tasks, but I’m not s…

---

## [Would Fly.io be a good fit for our SaaS product's needs? (Docker + Django + Postgres + Multi-Tenant)](https://community.fly.io/t/would-fly-io-be-a-good-fit-for-our-saas-products-needs-docker-django-postgres-multi-tenant/23025)

<div class="topic-metadata">

**Author:** [@DaveEthos](https://community.fly.io/u/DaveEthos)\
**Replies:** 2\
**Last updated:** [December 15, 2024, 10:04pm UTC](https://community.fly.io/t/would-fly-io-be-a-good-fit-for-our-saas-products-needs-docker-django-postgres-multi-tenant/23025 "2024-12-15T22:04:51Z")

</div>

We’re imminently launching a new SaaS product in a vertical (February). We have been planning on launching it on AWS, but would gladly pay a bit more for a service that is not as complicated to operate since we’re a smal…

---

## [Converting an excel to Pdf using spire.xls doesn't work in VM, but it's working on localhost](https://community.fly.io/t/converting-an-excel-to-pdf-using-spire-xls-doesnt-work-in-vm-but-its-working-on-localhost/22732)

<div class="topic-metadata">

**Author:** [@Martial](https://community.fly.io/u/Martial)\
**Replies:** 10\
**Last updated:** [December 2, 2024, 7:15pm UTC](https://community.fly.io/t/converting-an-excel-to-pdf-using-spire-xls-doesnt-work-in-vm-but-its-working-on-localhost/22732 "2024-12-02T19:15:01Z")

</div>

Hello, i want to convert a excel file into Pdf but the process hang at the following ligne of my function: workbook.SaveToFile("filename.pdf", FileFormat.PDF). The function works fine on locahost but when i deployed my…

---

## [Websocket scaling configuration issues](https://community.fly.io/t/websocket-scaling-configuration-issues/22748)

<div class="topic-metadata">

**Author:** [@giulianopenido](https://community.fly.io/u/giulianopenido)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 5:29pm UTC](https://community.fly.io/t/websocket-scaling-configuration-issues/22748 "2024-11-25T17:29:50Z")

</div>

Hi everyone, I’m having some issues with my Django Channels WebSocket application scaling configuration. I’ve set up connection-based scaling with a softlimit of 20 and hardlimit of 25 connections. However, the limits d…

---

## [ERROR Invalid HTTP\_HOST header: '\[IP\]:8000'. You may need to add '\[IP\]' to ALLOWED\_HOSTS](https://community.fly.io/t/error-invalid-http-host-header-ip-8000-you-may-need-to-add-ip-to-allowed-hosts/22709)

<div class="topic-metadata">

**Author:** [@rommel](https://community.fly.io/u/rommel)\
**Replies:** 5\
**Last updated:** [November 23, 2024, 10:19pm UTC](https://community.fly.io/t/error-invalid-http-host-header-ip-8000-you-may-need-to-add-ip-to-allowed-hosts/22709 "2024-11-23T22:19:53Z")

</div>

Hi there, I am trying Fly.io for the first time. I have a Django RESTFramework app that I’m trying to deploy. I have read the Django getting started doc, but I can’t seem to get the app to boot. The app runs fine on my …

---

## [Fly proxy error applies to a single page on django app. \[error\]\[PU01\] client problem: no host specified in headers or uri](https://community.fly.io/t/fly-proxy-error-applies-to-a-single-page-on-django-app-error-pu01-client-problem-no-host-specified-in-headers-or-uri/22340)

<div class="topic-metadata">

**Author:** [@wizIO](https://community.fly.io/u/wizIO)\
**Replies:** 6\
**Last updated:** [November 15, 2024, 5:37pm UTC](https://community.fly.io/t/fly-proxy-error-applies-to-a-single-page-on-django-app-error-pu01-client-problem-no-host-specified-in-headers-or-uri/22340 "2024-11-15T17:37:42Z")

</div>

... 2024-10-19T14:29:03Z proxy waw \[error\]\[PU01\] client problem: no host specified in headers or uri Hey guys, this might be one of the more strange situations you might read in a while; certainly is for me. The app is …

---

## [S3 HeadObject operation from Django is being routed to Tigris](https://community.fly.io/t/s3-headobject-operation-from-django-is-being-routed-to-tigris/22664)

<div class="topic-metadata">

**Author:** [@smulloni](https://community.fly.io/u/smulloni)\
**Replies:** 0\
**Last updated:** [November 13, 2024, 4:44pm UTC](https://community.fly.io/t/s3-headobject-operation-from-django-is-being-routed-to-tigris/22664 "2024-11-13T16:44:03Z")

</div>

I’m using S3 for object storage in a django app. Deploying my app configured to use s3 fails on some operations due to it using an endpoint url beginning with 'https://fly.storage.tigris.dev/". I have not configured this…

---

## [Volume Path and Django Media Root](https://community.fly.io/t/volume-path-and-django-media-root/13717)

<div class="topic-metadata">

**Author:** [@zip](https://community.fly.io/u/zip)\
**Replies:** 10\
**Last updated:** [October 8, 2024, 1:38am UTC](https://community.fly.io/t/volume-path-and-django-media-root/13717 "2024-10-08T01:38:02Z")

</div>

I have a new app that involves uploading images. I have tried all sorts of different combinations in fly.toml and my settings.py, but nothing has worked yet. Let’s pretend my app is named ‘fubar’. Here is what I am do…

---

## [How to migrate my views from my local postgres db to my postgres db in flyio](https://community.fly.io/t/how-to-migrate-my-views-from-my-local-postgres-db-to-my-postgres-db-in-flyio/22143)

<div class="topic-metadata">

**Author:** [@Rivert](https://community.fly.io/u/Rivert)\
**Replies:** 0\
**Last updated:** [October 4, 2024, 7:06pm UTC](https://community.fly.io/t/how-to-migrate-my-views-from-my-local-postgres-db-to-my-postgres-db-in-flyio/22143 "2024-10-04T19:06:19Z")

</div>

When I deployed my application, only the tables from Postgres database were migrated to Flyio, but not the views. Now my application is not working properly because the views are missing. Does anyone know how to do the v…

---

## [Invalid HTTP\_HOST header - settings properly configured](https://community.fly.io/t/invalid-http-host-header-settings-properly-configured/22011)

<div class="topic-metadata">

**Author:** [@mdlatt](https://community.fly.io/u/mdlatt)\
**Replies:** 1\
**Last updated:** [September 24, 2024, 11:52pm UTC](https://community.fly.io/t/invalid-http-host-header-settings-properly-configured/22011 "2024-09-24T23:52:26Z")

</div>

I seemingly have deployed my Django app with no issues. When I visit the site’s url, I get this error: Invalid HTTP\_HOST header: ‘legacy-htmx.fly.dev’. You may need to add ‘legacy-htmx.fly.dev’ to ALLOWED\_HOSTS. My set…

---

## [Handling env vars in a clean way in Django?](https://community.fly.io/t/handling-env-vars-in-a-clean-way-in-django/4029)

<div class="topic-metadata">

**Author:** [@David2](https://community.fly.io/u/David2)\
**Replies:** 6\
**Last updated:** [August 2, 2024, 10:06am UTC](https://community.fly.io/t/handling-env-vars-in-a-clean-way-in-django/4029 "2024-08-02T10:06:47Z")

</div>

I’m trying to deploy a Django app. To respect 12 factors as possible as I can, in my settings.py, I get multiple setting values from the environment. For example: SECRET\_KEY = os.environ\['DJ\_SECRET\_KEY'\] where SECRET\_K…

---

## [django.db.utils.OperationalError: could not translate host name "neighbornook-database.flycast" to address: nodename nor servname provided, or not known](https://community.fly.io/t/django-db-utils-operationalerror-could-not-translate-host-name-neighbornook-database-flycast-to-address-nodename-nor-servname-provided-or-not-known/20811)

<div class="topic-metadata">

**Author:** [@martinstavrakov](https://community.fly.io/u/martinstavrakov)\
**Replies:** 4\
**Last updated:** [July 13, 2024, 5:51pm UTC](https://community.fly.io/t/django-db-utils-operationalerror-could-not-translate-host-name-neighbornook-database-flycast-to-address-nodename-nor-servname-provided-or-not-known/20811 "2024-07-13T17:51:59Z")

</div>

Hello, I have a project running on django and postgres. When I run it on fly it works as I created a superuser and I can login to the admin page. However when I try running it locally or do a migration I get this error “…

[Next page](https://community.fly.io/c/django/26.md?page=1)
