Skip to content

AutumnSpark1226/nomadForum

Repository files navigation

nomadForum

A forum on the NomadNetwork

Status:

Working, but there are many missing features and data loss may occur. This software is in an alpha state.

Selfhosting

Installation

  1. Install and configure Nomad Network
  2. 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.
  3. cd into the folder. Use git checkout tags/VERSION to use a specific realease version (Once one is released)
  4. Install all requirements pip install -r requirements.txt
  5. 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 or notifications_enabled = False to disable them. Enabling notifications requires additional setup!
  • Set enable_update_checks = True to enable update checks or enable_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.
  1. Create an admin account by running admin/create_admin_account.py Enter your username and password.
  2. (Re)Start nomadnet. The forum should be available now.

[OPTIONAL] Enable notifications

Notifications work by running notify.py as background service.

  1. Modify notify.py
  • Set propagation_node_address = "0c68a7b9d0e428440dbb550c1c397f89" to your preferred LXMF propagation node.
  1. 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.

  1. Start the daemon.
  2. Make sure to set notifications_enabled to True in main.py

Updating

  1. cd into the source code folder.
  2. Use git to switch to the new version.
  3. Try loading a page. If you get CRITICAL: Database migration required! Contact an admin!, you need to run ./admin/migrate.py

Management options

  • 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.

Code hosting

The code is available on codeberg and on github

About

A forum for the NomadNetwork

Resources

License

Stars

Watchers

Forks

Releases

No releases published