self-hosting images in a Next.js project - HELP
Unanswered
Cesky Terrier posted this in #help-forum
Cesky TerrierOP
I have a question about self-hosting images in a Next.js project.
I'm building a website that has a gallery section, and I can upload new images from a dashboard. The app is deployed on my own VPS, and I want to handle image storage myself — no third-party services.
What’s the best way to save and serve uploaded images in this setup?
I'm building a website that has a gallery section, and I can upload new images from a dashboard. The app is deployed on my own VPS, and I want to handle image storage myself — no third-party services.
What’s the best way to save and serve uploaded images in this setup?
5 Replies
American black bear
use minio
you host it using docker compose and you are probably going to need a database in which you store image data.
Cesky TerrierOP
thank you man , i will do that
Cesky TerrierOP
another questions : what are the options i have to store my images when i don't self host my Nextjs app ?
American black bear
Well you can still go for the MinIO + PostgreSQL hosted separatly, you have Amazon S3 which works similarly, Supabase Storage which uses Amazon S3 under the hood if I am not mistaken, you have Pocketbase file storage. These are just some I remember from the top of my head.
I highly recommend you try build your own as it is the most scalable solution and you learn a lot from it and have independent data. If you don't want the hassle go for Supabase or use some sort of CMS like PayloadCMS if the file upload is an admin only feature.
I highly recommend you try build your own as it is the most scalable solution and you learn a lot from it and have independent data. If you don't want the hassle go for Supabase or use some sort of CMS like PayloadCMS if the file upload is an admin only feature.