See Casnode in production: Casbin Forum, with hundreds of real questions about Casbin, Casdoor, OpenAgent and Casvisor. Visit →
L

Collecting the formatting I use most, so new members can copy it.

Collapsible section

Click to expand

Hidden until someone opens it. Handy for long logs.

Code with highlighting

fmt.Println("hello from casnode")

Tables

Database driverName
MySQL mysql
PostgreSQL postgres
SQLite sqlite
SQL Server mssql

Emoji: 🎉 🚀 👍

Mention someone with @ and their user name, like @priya_r.

M

Most of our members won't open the forum every day. An email when someone replies to them or mentions them would bring them back to the discussion.

C

Yes, you can combine these with your words:

Filter Finds
@maria_dev posts by that user
#configuration topics in that category
tags:docker topics with that tag
in:title matches in titles only
in:messages your personal messages
status:open topics that are not closed
order:latest, order:likes, order:views sorting

For example postgres #configuration order:likes.

C

Every topic, category, tag and profile page is rendered on the server, so the full text is in the HTML. On top of that:

  • canonical URLs, Open Graph tags and DiscussionForumPosting structured data on topics
  • /sitemap.xml, and RSS at /latest.rss and /top.rss
  • robots.txt that keeps private pages out
  • ?page= links on lists and long topics that crawlers can follow
  • a topic URL with an old slug redirects to the current one

Set site_url on the Site Settings page, so that canonical URLs and the sitemap use your domain.

C

@lena_h three ways:

  1. On Admin → Users, open the user and turn on admin or moderator.
  2. Put their user names in admins in conf/app.local.conf (comma-separated).
  3. Admins of the Casdoor organization are forum admins automatically.

Moderators handle the review queue and flags and can close, pin, archive and move topics; admins can also change site settings, categories and users.

T

Done, the tables showed up on the first start. For anyone else: the database role needs CREATEDB, or create the database yourself beforehand.

C

Docker is the quickest. The repository has a Dockerfile, so build the image and run it:

git clone https://github.com/casnode/casnode
cd casnode
docker build -t casnode .
docker run -d -p 16900:16900 -v casnode-data:/app/data \
  -e casdoorEndpoint=https://door.casdoor.com -e clientId=<client id> -e clientSecret=<client secret> \
  -e casdoorOrganization=<organization> -e casdoorApplication=<application> -e admins=<your user name> \
  casnode

Then open http://your-server:16900. The only other thing you need is a Casdoor application for sign-in: its client ID and secret go in the variables above, and https://<your forum>/callback goes in its redirect URLs.

By default the data is a SQLite file kept, together with the uploads, in the casnode-data volume, which is fine for a trial.