Python MineOS App Market Server Reimplementation
Python re-implementation of the server side of the MineOS App Market
Ensure Python 3 is installed on your computer, and use pip to install this project with the command listed below:
pip install git+https://github.com/CoolCat467/MineOS-Market-Server.git
Configuration file locations follow the XDG Base Directory Specification.
Main configuration file lives at $XDG_CONFIG_HOME/mineos_market_webserver/config.toml
, or $HOME/.config/mineos_market_webserver/config.toml
if unset.
In the main configuration file you can change things like what port(s)
the webserver is hosted on, hypercorn configuration, and enabling
SSL support!
Database records live in $XDG_DATA_HOME/mineos_market_webserver/records/
, or $HOME/.local/share/mineos_market_webserver/records/
if unset.
ids.json
is for remembering what the next ID for publications and reviews should be.
login.json
is for remembering login token -> username associations that expire after some time.
messages.json
is for remembering messages sent between users.
publications.json
is for remembering publication data.
reviews.json
is for remembering reviews on publications and votes on reviews.
users.json
is for remembering user data. Passwords are hashed with sha3_256.
Run the server:
mineos_market_server
Go to URL http://<IP_of_host>:3004
, or whatever port you have set in the main configuration file.
Important Note: If you don't enable SSL support, login credentials are sent to server in clear text!
If you would like to enable SSL support, it's a bit tricky but it's doable, successfully tested in production, and completely free!
- Make sure your internet router is set to have the machine running the webserver to have a static ip address. This does not need to be a publicly accessible ip address.
- Create a free account with duckdns
- Add a domain with a name of your choice and set the ip to the static ip address of the machine running the webserver.
- Install certbot on the machine running the webserver.
(https://certbot.eff.org/instructions)
When it asks
software
, tell themother
. For my installation, I ended up installing it with pip. - Install the certbot duckdns plugin for certbot
- Either run certbot from duckdns plugin's README or run /scripts/cert_create.sh with your details.
- Setup autorenewal from certbot wiki or look at /scripts/cert_renew.sh
- Uncomment SSL lines in the webserver configuration file (see section above) and edit as needed for your particular setup.