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.
We have about 3,000 topics on a self-hosted Discourse. Moving would be much easier with an importer. Is anyone working on one?
+1. A daily or weekly digest would be great too, for people who don't want an email per reply.
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.
Yes, all of it is on Admin â Site Settings â Branding:
- logo and favicon
- brand, accent and header colors, each with a dark-mode variant
- fonts
- header links (
Label,URL|Label,URL) - the homepage banner: title, text, image and whether it shows the search box
- custom CSS for anything else
This demo uses the logo, the banner and the header links. Changes on that page apply right away.
Casnode sends https://<the address in the browser>/callback, so that exact URL has to be in the application's Redirect URLs in Casdoor. http vs https and www vs no www count as different addresses.
Also check casdoorOrganization and casdoorApplication: only users of that organization can sign in.
Put this in conf/app.local.conf:
driverName = postgres
dataSourceName = user=casnode password=secret host=localhost port=5432 sslmode=disable
dbName = casnode
On the first start Casnode creates the database if it's missing, then the tables. For MySQL it's driverName = mysql with dataSourceName = casnode:secret@tcp(localhost:3306)/, and mssql works for SQL Server.
Casnode doesn't move the data of the SQLite file into the new database, so either start fresh or copy it over with your own tools.
No Casdoor needed. You need Go 1.25+, Node.js 20+ and Yarn 1:
git clone https://github.com/casnode/casnode
cd casnode
echo "devSignin = true" > conf/app.local.conf
go run . # backend on http://localhost:16900, SQLite file casnode.db
cd web
yarn install
yarn dev # frontend on http://localhost:13900 with hot reload
Open http://localhost:13900/login and sign in as admin (or any user name). devSignin only answers requests from the same computer; never turn it on on a server.
The pages are in web/src/app, the components in web/src/components, and the translations in web/src/lib/locales.
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.
