---
title: "Discussion on \"Hosting a Python Discord Bot for Free with Fly.io\" | Hashnode"
description: "Discussion on \"Hosting a Python Discord Bot for Free with Fly.io\". Intro\nAs Heroku is no longer going to be free after November 28, 2022, I am sharing another way to host a Discord bot 24/7 for free.\nYou will be able to host any kind of bot on Fly.io with few limitations by following the steps below. You can also op..."
url: "https://hashnode.com/posts/hosting-a-python-discord-bot-for-free-with-flyio/630c123856df9e8e5024ff4e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Hosting a Python Discord Bot for Free with Fly.io](https://jonahlawrence.hashnode.dev/hosting-a-python-discord-bot-for-free-with-flyio?utm_source=hashnode&utm_medium=feed)

Intro As Heroku is no longer going to be free after November 28, 2022, I am sharing another way to host a Discord bot 24/7 for free. You will be able to host any kind of bot on Fly.io with few limitations by following the steps below. You can also op...

Aug 29, 2022 · 4 min read · jonahlawrence.hashnode.dev  
Updated Sep 1, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#discord](https://hashnode.com/tag/discord)
-   [#discord-bot](https://hashnode.com/tag/discord-bot)
-   [#fly](https://hashnode.com/tag/fly)
-   [#hosting](https://hashnode.com/tag/hosting)

## Written by

[Jonah Lawrence](https://hashnode.com/@DenverCoder1)

@DenverCoder1 · Denver, CO

  
[View profile](https://hashnode.com/@DenverCoder1)

Full Stack Developer and YouTuber

💻 Full Stack Dev 🎨 UI designer 🎓 Student 📺 Youtuber @ youtube.com/DevProTips 🐙 git.io/DenverCoder1

## Responses 1

Markdown supported · ⌘↵ to post

[Mike Rezl](https://hashnode.com/@LetsTalkUFOs)

[Nov 30, 2022](https://hashnode.com/posts/hosting-a-python-discord-bot-for-free-with-flyio/630c123856df9e8e5024ff4e/comment/6387e1c31f3c9e4d363e0d1c)

Great instructions! Unfortunately, they're not working for me at the moment.

I had to run:

`flyctl launch --name --myappname --region sea --org myorgname`

to actually launch the app successfully. Then when I try to deploy it, I get this error:

`==> Building image with Docker --> docker host: 20.10.12 linux x86_64 Sending build context to Docker daemon  2.092kB Error failed to fetch an image or build from source: error building: Error response from daemon: invalid reference format`

Not entirely sure, but I'm assuming there's something wrong with the Dockfile. Here's all that's in mine:

`FROM python:3.10 WORKDIR /bot COPY requirements.txt /bot/ RUN pip install -r requirements.txt COPY . /bot CMD python main.py`
