Serving the interwebz since
Warning! If you can see this text, your browser is too old to load some of the CSS styles.
Fuze Mediaboard is a self-hosted multimedia messaging platform.

Fuze Mediaboard 0.1.4 documentation/tutorial

Running a chat server may seem daunting, but hosting a basic instance is actually simple. As the tutorial progresses, you will start with running a local server, which will evolve into a platform viewable on the web.

Supported OS: FreeBSD, Linux, MacOS

A more condensed version for advanced users is available in the README on the GitHub page.

Getting started

Compiling from source

Prerequisites: Git, CMake, Boost 1.88, SQLite OR PostgreSQL.

First ensure that submodules are downloaded. Use this command:
git submodule update --init --recursive
Now, to compile the server:
cmake -B build
cmake --build build -D WITH_MAGICK=OFF
cmake --install build --prefix install

Running the server

When starting the program for the first time, add --create_owner to the command. Enter this link in your browser (you may be able to CTRL+click it) and enter your desired credentials.
Registration link
An invitation link will appear in the command-line output
Accepting the invitation
A registration form is shown when invitation is opened
After registering the owner account, you can now interact with the server
If you ever forget the password, you can simply run the create_owner command again. Note that it will not be the same account.

Making it public

Fuze mediaboard requires HTTPS for secure remote authentication. It is recommended to use a reverse proxy like NGINX. SSL certificates (required for HTTPS) can be obtained for free using Certbot.
Example NGINX config.

Ensure your IP is accessible to the outside world, using port forwarding if necessary.

Permissions

By default, only the owner can read and write messages.

  1. After logging in, click on the "Manage server" tab in the toolbar as an administrator.
  2. In the Manage permissions tab, click "Add group" and select "Public".
  3. Change setting to Allow for the permissions you want to grant.
Public permissions set in the Manage Server page
Granted read/write permissions to Public
Permissions can also be set on threads, which inherit from server-level settings.

Leaving a setting on Inherit means the permission will be searched by traversing up the inheritance tree (if applicable), and cascading down the group heirarchy until a non-inherited setting is found. If no permission setting is found by the time inheritance passes the server-level setting for Public, permission is denied.

If both a user and group permission are set on an object, the user setting takes priority.
Manage Users tab
Adding groups to a user on the Manage users page.
Manage Groups tab
In Manage groups you can add/delete groups, change their heirarchy, and dismiss members.

Optional: ImageMagick support

In order for thumbnails to work, the software needs to be compiled with ImageMagick.
Usually a custom build of ImageMagick is preferred, to ensure all required delegates are installed. FreeBSD's package is sufficient so you can install that via pkg, but Debian's apt package is not.
Refer to the ImageMagick section of README.md.

Configuration

Changes made to config.ini are read when the server starts. These options can also be passed directly in the command line, which will override what is set in the config file.

config.ini
server_portServes http://localhost:8300 by default. Change this if running multiple Mediaboard instances.
threadsNumber of async threads. Values greater than 1 should be used for testing only.
file_size_limit_mbFor limiting the maximum size of user-uploaded files and to prevent abuse.
favicon_url
site_name
show_watermarks
Cosmetic settings.
strip_metadataRemoves metadata from uploaded images (except SVG files).
thumbnail_file_exension
thumbnail_size
Format must be supported by ImageMagick. Please note that any change in this setting will not apply to existing thumbnails - those will have to be converted manually.
avif_thumbnails
heic_thumbnails
svg_thumbnails
webp_thumbnails
mp4_thumbnails
webm_thumbnails
Requires the respective formats to be installed in the instance of ImageMagick used - Use magick -list format to see if they are supported.
Video formats require ffmpeg.
sqlite_database_filePath to SQLite database file. Ignored when compiled with the PostgreSQL interface.
postgresql_host
postgresql_port
postgresql_user
postgresql_database_name
PostgreSQL database connection parameters. Only used when compiled with the PostgreSQL interface.

Embedding into a webpage

Fuze Mediaboard can be embedded inside of a page by using an iframe:
<iframe src="http://localhost:8300/"></iframe>

Using Fuze Mediaboard inside of an iframe
It can be shown with controls hidden by adding display=embed as a URL parameter:
<iframe src="http://localhost:8300/?display=embed"></iframe>
Iframe with display=embed
display=embed also works with individual threads - just add &thread=0 (with a valid thread ID) to the path. Embedding threads has a number of potential uses, for example adding comment sections on blog posts, or an artist uploading his/her latest work.

Optional: Using PostgreSQL as the database

Alternatively, you can build with the PostgreSQL interface instead:
cmake -B build -D FUZEDBI_USE_POSTGRES=ON

Set the following options in config.ini to correspond to the database: postgresql_host, postgresql_port, postgresql_user, and postgresql_database_name.

Start cluster

This may be skipped on certain Linux distros such as Debian. Check if the server is already running with systemctl status postgresql or service postgresql status
initdb -D /var/db/postgres/18/main/
pg_ctl -D /var/db/postgres/18/main start

Create database

su -
su postgres
createdb fuze_mediaboard
psql -d fuze_mediaboard
fuze_mediaboard=# CREATE USER mediaboard_server WITH PASSWORD '';
fuze_mediaboard=# GRANT ALL ON SCHEMA public TO mediaboard_server;
fuze_mediaboard=# \q
To import the database template, go back to your user account and run:
psql -U postgres fuze_mediaboard < database_template.sql
Add the following line to pg_hba.conf[documentation]. Insert it at the top of the table so that it won't be overridden by other settings:

local      fuze_mediaboard    mediaboard_server           password

mediaboard_server is the PostgreSQL user which interacts with the database named fuze_mediaboard.\ Set the environment variable FUZE_MEDIABOARD_PASSWORD with the same password used in the CREATE_USER statement earlier. Open a new terminal window or reboot your system to apply the change.

Here be photons