this post was submitted on 28 Oct 2023
1 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hey guys,

I want to do my first little project. Asking the title question probably means I'm in over my head, but we shall see!

Here's what I want to do: On my raspberry pi 4 B 4GB (currently only running pihole), I want to host a small webapp to track game statistics for a game I play with friends somewhat regularly.

There should be: Authorization (login form), a database to keep track of the games played, a simple UI where a ranking and other stats are displayed and a form to enter new games.

The only thing I have experience with is SQL, Python and FastAPI (very little). The raspberry pi is running ubuntu server.

SO, what do I need to look into to get this off the ground? Here are my thoughts so far:

Docker to have everything working together and easy to deploy.

Cloudflare DNS so as not to expose my home network IP to the internet.

SQLite as a database to keep the game records.

FastAPI to handle requests.

React for frontend (also to learn about Javascript)

Nginx as a reverse proxy (not even sure what this means)

Am I missing something? Is what I want to do possible only with the technologies I listed?

Also, could you give some general advice on the security aspect? What do I definitely have to do so as not to endanger my home network? The webapp is only to be used by around 10 close friends.

Sorry for all the questions, I hope this is the right place and not too much.

top 4 comments
sorted by: hot top controversial new old
[–] desnudopenguino@alien.top 1 points 1 year ago

Django is a good py web framework. Sqlite should suffice for such a small app. Once you get a bunch of users and writing action, a rdbms like postgress might be required.

[–] issa62@alien.top 1 points 1 year ago
[–] xDerEdx@alien.top 1 points 1 year ago (1 children)

For small personal projects I like to use pocketbase. (https://pocketbase.io) It uses Sqlite under the hood and provides a good admin interface, allows static file hosting, creates an API for your tables automatically which you can secure with security rules and has several authentication providers built in.

Edith: typo

[–] w2g@alien.top 1 points 1 year ago

This seems super cool. I really like having an admin interface too, as I'm currently struggling to truncate a table out of a jupyter notebook with sqlalchemy haha

Am I understanding correctly that this would replace both sqlite and FastAPI in my original setup idea?