# How to deploy static files in django to render cloud

**URL:** https://forum.djangoproject.com/t/how-to-deploy-static-files-in-django-to-render-cloud/33653
**Category:** Deployment
**Created:** [August 8, 2024, 2:10am UTC](https://forum.djangoproject.com/t/how-to-deploy-static-files-in-django-to-render-cloud/33653 "2024-08-08T02:10:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![OluwamomiAkinbote](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/oluwamomiakinbote/32/23103_2.png) [@OluwamomiAkinbote](https://forum.djangoproject.com/u/OluwamomiAkinbote)
#### Post date: [August 8, 2024, 2:10am UTC](https://forum.djangoproject.com/t/how-to-deploy-static-files-in-django-to-render-cloud/33653/1 "2024-08-08T02:10:35Z")

</div>

Hello guys,

I deploy my django project to render, but the static files that contains Javascript code did not function in the live server, but works in local server, how can I solve this??

---

<div class="post-metadata">

### Author: ![onyeibo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/onyeibo/32/11494_2.png) [@onyeibo](https://forum.djangoproject.com/u/onyeibo)
#### Post date: [August 8, 2024, 2:15am UTC](https://forum.djangoproject.com/t/how-to-deploy-static-files-in-django-to-render-cloud/33653/2 "2024-08-08T02:15:56Z")

</div>

Setup STATIC\_ROOT and STATIC\_DIRS variables in your `project/settngs.py`. Make sure you provide the folders in your STATIC\_ROOT in the live server.

After doing the above, run the following on the live server:  
`./manage collectstatic --clear`

Confirm that your web server (nginx) has access to the folders you specified in STATIC\_ROOT
