A forum on the NomadNetwork
Working, but there are many missing features and data loss may occur. This software is in an alpha state.
- Install and configure Nomad Network
- Download the source code
git clone https://codeberg.org/AutumnSpark1226/nomadForum ~/.nomadnetwork/storage/pages/nomadForum
You can change the folder after ./pages to your liking. Put the code in~/.nomadnetwork/storage/pages
if you only want the forum on your node. - cd into the folder. Use
git checkout tags/VERSION
to use a specific realease version (Once one is released) - 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/pages
on your filesystem is equivalent to/page
in 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 = True
to enable notifications ornotifications_enabled = False
to disable them. Enabling notifications requires additional setup! - Set
enable_update_checks = True
to enable update checks orenable_update_checks = False
to 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.py
Enter your username and password. - (Re)Start nomadnet. The forum should be available now.
Notifications work by running notify.py as background service.
- Modify
notify.py
- Set
propagation_node_address = "0c68a7b9d0e428440dbb550c1c397f89"
to your preferred LXMF propagation node.
- Setup
notify.py
to 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_enabled
toTrue
inmain.py
- 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 run./admin/migrate.py
- Run
admin/manage.py backup
to 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 addkey
to create and use a new key for encrypted data in the database. Only newly encrypted data will use this key. - Run
admin/manage.py rotatekeys
to 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.