Sharing pictures served up on a Raspberry Pi–a simple solution for short-term file sharing with friends.
To get the server to the internet, here is what I did:
- Set up an A record with my DNS provider
- Set up a cronjob for the porkbun-ddns script in order to keep the A record up-to-date
- Generated SSL files through my DNS provider and placed them on the Pi (at /etc/ssl)
- Port-forwarded port 443 through my router
At /etc/nginx/sites-available, replace the default file with these contents.
To reduce the time to display pictures, I generated smaller preview images and set up pagination.
The project is generated from the Vite, React, and TypeScript template. To run, use npm run dev. The application will be running at localhost:5173/picshare.
Future improvements can be made especially with security. Please use with caution.