mirror of
https://codeberg.org/AutumnSpark1226/nomadForum.git
synced 2026-05-08 07:27:45 +00:00
A forum for the NomadNet
- mupad 57%
- Python 34.3%
- Shell 8.7%
| admin | ||
| test | ||
| .gitignore | ||
| comment.mu | ||
| config.py | ||
| 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 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 - Create the default configuration file
./config.pyThe script will output the file path of the new config file. - Edit the config file (see below for available options)
- Create an admin account by running
admin/create_admin_account.pyEnter your username and password. - (Re)Start nomadnet. The forum should be available now.
Configuration options
The [general] section:
- Set
storage_path = YOUR_PATHto 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/nomadForumto 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 = nomadForumto give your forum a name. - Set
update_checks_enabled = yesto enable update checks orupdate_checks_enabled = noto 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. - Set
bypass_link_id_requirement_on_local_connection = yesto be able to load pages using -> on your node orbypass_link_id_requirement_on_local_connection = noto disable this. Please note that enabling this might be a potential security risk.
The [notifications] section:
- Set
enabled = yesto enable notifications orenabled = noto disable them. Enabling notifications requires additional setup! - Set
propagation_node = f141f039b3b88b7a2d5c6048c7adaafbto your preferred LXMF propagation node. - Set
socket_path = /tmp/nomadForum_socketto a path where the notification socket will be created.
[OPTIONAL] Enable notifications
Notifications work by running notify.py as a background service.
-
Modify the configuration file to enable notifications (see above).
-
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.
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
Code hosting
The code is available on codeberg, github and SparkN0de-git