Python FastAPI Tutorial (Part 18): Deploy to a VPS - Security, Nginx, SSL, and Custom Domain

In this video, we'll be learning how to deploy our FastAPI application to a VPS (Virtual Private Server) so that it's live and accessible on the internet. We'll walk through the entire process, starting with a fresh Ubuntu server and hardening it with SSH key authentication, a firewall, and brute force protection. From there, we'll set up Nginx as a reverse proxy, enable HTTPS with a free SSL certificate from Let's Encrypt, point a custom domain to our application, and use systemd to manage the app as a service so it starts on boot and restarts automatically if it crashes. By the end of this video, you'll have a secure, production-ready FastAPI deployment with a real domain name. Let's get started... Timestamps: Skip to 42:11 if your server is already secure Skip to 59:05 for the FastAPI-specific deployment steps The code from this video can be found here: https://github.com/CoreyMSchafer/Fast... Full FastAPI Course:    • FastAPI Tutorials   Linode (with Referral): https://www.linode.com/lp/refer/?r=d1... NameCheap (with Referral): https://namecheap.pxf.io/nyBgR WSL (Windows): https://learn.microsoft.com/en-us/win... Git for Windows: https://git-scm.com/install/windows ✅ Support My Channel Through Patreon:   / coreyms   ✅ Become a Channel Member:    / @coreyms   ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel -    / coreymschafer   Facebook -   / coreymschafer   Twitter -   / coreymschafer   Instagram -   / coreymschafer   #Python #FastAPI

Python FastAPI Tutorial (Part 19): Deploy with Docker - Serverless Containers and Custom Domain
▶︎

Python FastAPI Tutorial (Part 19): Deploy with Docker - Serverless Containers and Custom Domain

Python FastAPI Tutorial (Part 17): Testing the API - Pytest, Fixtures, and Mocking External Services
▶︎

Python FastAPI Tutorial (Part 17): Testing the API - Pytest, Fixtures, and Mocking External Services

Python FastAPI Tutorial (Part 16): AWS S3 and Boto3 - Moving File Uploads to the Cloud
▶︎

Python FastAPI Tutorial (Part 16): AWS S3 and Boto3 - Moving File Uploads to the Cloud

How to Harden a Linux Server for Production | 9 Security Checks You Should Always Do
▶︎

How to Harden a Linux Server for Production | 9 Security Checks You Should Always Do

CANBUS – Networking so simple, even YOU can understand it!
▶︎

CANBUS – Networking so simple, even YOU can understand it!

Python Tutorial: UV - A Faster, All-in-One Package Manager to Replace Pip and Venv
▶︎

Python Tutorial: UV - A Faster, All-in-One Package Manager to Replace Pip and Venv

Python FastAPI Tutorial (Part 10): Authentication - Registration and Login with JWT
▶︎

Python FastAPI Tutorial (Part 10): Authentication - Registration and Login with JWT

Python FastAPI Tutorial (Part 15): PostgreSQL and Alembic - Database Migrations for Production
▶︎

Python FastAPI Tutorial (Part 15): PostgreSQL and Alembic - Database Migrations for Production

7 Authentication Concepts Every Developer Should Know
▶︎

7 Authentication Concepts Every Developer Should Know

Python FastAPI Tutorial (Part 13): Pagination - Loading More Data with Query Parameters
▶︎

Python FastAPI Tutorial (Part 13): Pagination - Loading More Data with Query Parameters

Python Pydantic Tutorial: Complete Data Validation Course (Used by FastAPI)
▶︎

Python Pydantic Tutorial: Complete Data Validation Course (Used by FastAPI)

Quickly Authenticate Users with FastAPI and Token Authentication
▶︎

Quickly Authenticate Users with FastAPI and Token Authentication

FastAPI Crash Course - Modern Python API Development
▶︎

FastAPI Crash Course - Modern Python API Development

Python FastAPI Tutorial (Part 7): Sync vs Async - Converting Your App to Asynchronous
▶︎

Python FastAPI Tutorial (Part 7): Sync vs Async - Converting Your App to Asynchronous

Python Tutorial: Ruff - A Fast Linter & Formatter to Replace Multiple Tools and Improve Code Quality
▶︎

Python Tutorial: Ruff - A Fast Linter & Formatter to Replace Multiple Tools and Improve Code Quality

Python FastAPI Tutorial (Part 12): File Uploads - Image Processing, Validation, and Storage
▶︎

Python FastAPI Tutorial (Part 12): File Uploads - Image Processing, Validation, and Storage

Anatomy of a Scalable Python Project (FastAPI)
▶︎

Anatomy of a Scalable Python Project (FastAPI)

How to Use FastAPI: A Detailed Python Tutorial
▶︎

How to Use FastAPI: A Detailed Python Tutorial

FastAPI SQLAlchemy Tutorial 2025 — Build a REST API with SQL
▶︎

FastAPI SQLAlchemy Tutorial 2025 — Build a REST API with SQL