---
title: "Using web sockets on Next.js | NO third party solution"
url: https://daily.dev/posts/using-web-sockets-on-next-js-no-third-party-solution-svhxli6ij
source_url: https://www.youtube.com/watch?v=9DEvkYB5_A4
type: video:youtube
source: "Fly.io"
published: 2025-02-27T16:21:09.593Z
updated: 2025-02-27T16:21:20.092Z
tags: ["webdev", "typescript", "serverless", "nextjs"]
reading_time: 9
upvotes: 126
comments: 5
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Using web sockets on Next.js | NO third party solution

**[Fly.io](https://daily.dev/sources/flydotio)** · 9 min read · 126 upvotes · 5 comments

## Summary

Learn how to implement WebSockets in a Next.js application without using third-party services by leveraging traditional servers on Fly.io. The post explains the setup and configuration required to create a custom server for handling WebSocket connections, illustrated with a simple chat application example.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=9DEvkYB5_A4>

## Community discussion

Top comments from developers on daily.dev.

**@petecapecod** · 0 upvotes

> This is a cool video 🙌🏻 good point that serverless and web sockets kind of do the opposite things.
>
> Interested to see the work around.

**@masculin** · 0 upvotes

> Great one.

**@zzeurcher** · 0 upvotes

> This is great

**@samirbettahar57** · 0 upvotes

> What about websockets without nextjs 🤔😆

**@jasonetorres** · 0 upvotes

> great content from Annie as per usual

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#typescript](https://daily.dev/tags/typescript), [#serverless](https://daily.dev/tags/serverless), [#nextjs](https://daily.dev/tags/nextjs)

[View this post on daily.dev](https://daily.dev/posts/using-web-sockets-on-next-js-no-third-party-solution-svhxli6ij)
