Platform settings
Platform settings are general settings that can be changed only by updating the file appsettings.json or by setting ENV variables in your docker compose.
When you change a platform setting you need to restart piBlog.
The EVN names are the same of the property in the appsettings.json file (i.e. PlatformMode); for settings that are represented by objects use __ to navigate the object (i.e. Smtp__Host).
Main settings
PlatformMode
Possible values:
SingleUser: your installation will have only one user and no other user can be created.
Use this value for a personal blog.Community: your installation can have multiple users, each user has his personal blog.
PlatformMode: 'SingleUser'
OwnerUsername and OwnerPassword
Sets the owner username and password.
The owner is the user with the highest level of permissions in the system.
This user is created when piBlog is first started.
OwnerUsername: 'admin'
OwnerPassword: 'password'
Smtp
Smtp settings are required for any operation that requires a confirmation email:
- Password reset
- User registration
Smtp__Sender: '<emailAddress>'
Smtp__Host: '<smtpHost>'
Smtp__Port: 587
Smtp__Security: 'Auto'
Smtp__Username: '<userName>'
Smtp__Password: '<password>'
DatabaseType
Possible values:
SQLite: use SQLite database. TheDatabaseConnectionStringsetting is ignored.DatabaseType: 'SQLite'Npgsql: use PostgreSQL database. TheDatabaseConnectionStringsetting is required.DatabaseType: 'Npgsql' DatabaseConnectionString: "Host=db;Port=5432;Database=piblog;Username=piblog_user;Password=piblog_pass"
RegisterEnabled
Boolean value.
If set to true users can create an account by registering.
This setting is ignored if PlatformMode is set to SingleUser.
RegisterEnabled: true
MembersOnlyContent
Boolean value.
If set to true only logged users can see posts of any user.
If you set PlatformMode to SingleUser and enable this option piBlog acts as a personal diary: no one else can see your posts.
MembersOnlyContent: true
CloudflareTurnstile
You can optionally enable Cloudflare Turnstile.
CloudflareTurnstile__SiteKey: '<siteKey>'
CloudflareTurnstile__SecretKey: '<secretKey>'
Default values
The default values are the ones in the file appsettings.json
{
"PlatformMode": "SingleUser",
"DatabaseType": "SQLite",
"DatabaseConnectionString": "",
"DataPath": "/app/data",
"OwnerUsername": "admin",
"OwnerPassword": "password",
"RegisterEnabled": false,
"MembersOnlyContent": false,
"Smtp": {
"Sender": "",
"Host": "",
"Port": 587,
"Security": "Auto",
"Username": "",
"Password": ""
},
"CloudflareTurnstile": {
"SiteKey": "",
"SecretKey": ""
},
"MaxRequestBodySize": null,
"MaxConcurrentConnections": null,
"KeepAliveTimeout": null,
"RequestHeadersTimeout": null,
"KnownProxies": [],
"KnownNetworks": [],
"FfmpegPath": "",
"CacheSizeLimit": 5000,
"NLog": {
"autoReload": true,
"throwConfigExceptions": true,
"targets": {
"logfile": {
"type": "File",
"fileName": "./data/logs/piblog-${shortdate}.log",
"layout": "${longdate}|${level}|${logger}|${message}|${exception}",
"archiveEvery": "Day",
"maxArchiveFiles": 7,
"keepFileOpen": false
},
"console": {
"type": "Console",
"layout": "${longdate}|${level}|${logger}|${message}|${exception}"
}
},
"rules": [
{
"logger": "*",
"minLevel": "Warn",
"writeTo": "logfile,console"
}
]
},
"AllowedHosts": "*"
}