mirror of
https://codeberg.org/AutumnSpark1226/nomadForum.git
synced 2026-03-23 16:45:23 +00:00
A forum for the NomadNet
- mupad 58.7%
- Python 32.2%
- Shell 9.1%
| admin | ||
| test | ||
| .gitignore | ||
| comment.mu | ||
| delete_account.mu | ||
| delete_content.mu | ||
| index.mu | ||
| LICENSE | ||
| list.mu | ||
| login.mu | ||
| logout.mu | ||
| main.py | ||
| notify.py | ||
| post.mu | ||
| profile.mu | ||
| README.md | ||
| register.mu | ||
| requirements.txt | ||
| rules.mu | ||
| session.py | ||
| subscription_settings.mu | ||
| user_settings.mu | ||
| view.mu | ||
nomadForum
A forum on the NomadNetwork
Current status:
The forum has been running without a problem for some time now. See [https://codeberg.org/AutumnSpark1226/nomadForum/projects/40469](this project on codeberg) for the current status.
Selfhosting
Installation
- Install and configure Nomad Network
- Download the source code
git clone https://codeberg.org/AutumnSpark1226/nomadForum ~/.nomadnetwork/storage/pages/nomadForumYou can change the folder after ./pages to your liking. Put the code in~/.nomadnetwork/storage/pagesif you only want the forum on your node. - cd into the folder. Use
git checkout tags/VERSIONto use a specific release version - Install all requirements
pip install -r requirements.txt - Modify
main.py:
- Set
storage_path = "YOUR_PATH"to the path where all data should be stored. The path must not end with/. It is highly recommended to use an absulte path (like:/home/user/.nomadForum) - Set
page_path = "/page/nomadForum"to the path on your node. It must not end with/. The path~/.nomadnetwork/storage/pageson your filesystem is equivalent to/pagein this variable. Set it to folder path with the source code relative~/.nomadnetwork/storage/pages - Set
forum_name = "nomadForum"to give your forum a name. - Set
main_page_info = """..."""to display information on the main page - Set
notifications_enabled = Trueto enable notifications ornotifications_enabled = Falseto disable them. Enabling notifications requires additional setup! - Set
enable_update_checks = Trueto enable update checks orenable_update_checks = Falseto disable them. If enabled, the software will connect to this url and request the newest version. This behaviour is disabled by default. It might be changed to use reticulum in the future.
- Create an admin account by running
admin/create_admin_account.pyEnter your username and password. - (Re)Start nomadnet. The forum should be available now.
[OPTIONAL] Enable notifications
Notifications work by running notify.py as a background service.
- Modify
notify.py
- Set
propagation_node_address = "f141f039b3b88b7a2d5c6048c7adaafb"to your preferred LXMF propagation node.
- Setup
notify.pyto run as a daemon. This might work in many different ways depending on your system. A configuration file for systemd might look like this:
[Unit]
Description=NomadForum notification service
DefaultDependencies=no
[Service]
Type=simple
User=user
Group=group
ExecStart=/home/user/.nomadnetwork/storage/pages/nomadForum/notify.py
[Install]
WantedBy=default.target
Modify it to match your setup. Make sure to run the daemon as the same user that runs nomadnet.
- Start the daemon.
- Make sure to set
notifications_enabledtoTrueinmain.py
Updating
- cd into the source code folder.
- Use git to switch to the new version.
- Try loading a page. If you get
CRITICAL: Database migration required! Contact an admin!, you need to runadmin/migrate.py
Management options
- Run
admin/manage.py backupto create a database and key backup. The backup location will be printed. (You can also use the 'Create backup' button on the admin page) - Run
admin/manage.py addkeyto create and use a new key for encrypted data in the database. Only newly encrypted data will use this key. - Run
admin/manage.py rotatekeysto create and use a new key for encrypted data in the database. This will also reencrypt all existing data so only the new key is used.
Privacy / what admins can see
in nomadForum
- username
- posts, comments, display name, about page (this is public)
- if you are logged in (even when not shown on profile)
with direct database / file system access
Decryption is only possible with access to the key.secret file (or a backup of this file)
- encrypted password hash (it is possible to decrypt it (then the admin has a password hash)
- plaintext passwords (by adding a password logger script to the node)
- encrypted identities (it is possible to decrypt them) as well as their settings (autologin, notifications, etc.)
- the time you logged in (as long as you are logged in, the data is cleared on logout / automatic purge)
- default post styling
- notification subscriptions