MoongladePure.Web 7.0.43

There is a newer version of this package available.
See the version list below for details.
dotnet add package MoongladePure.Web --version 7.0.43                
NuGet\Install-Package MoongladePure.Web -Version 7.0.43                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MoongladePure.Web" Version="7.0.43" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MoongladePure.Web --version 7.0.43                
#r "nuget: MoongladePure.Web, 7.0.43"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MoongladePure.Web as a Cake Addin
#addin nuget:?package=MoongladePure.Web&version=7.0.43

// Install MoongladePure.Web as a Cake Tool
#tool nuget:?package=MoongladePure.Web&version=7.0.43                

MoongladePure

GPL licensed Pipeline stat Test Coverage NuGet version (MoongladePure.Core ManHours Website

MoongladePure, regain control over your data.

MoongladePure can be deployed completely on-premises without coupling to any particular cloud. 100% local!

MoongladePure uses MySQL as database and file system as data store. It's extremely easy to try and deploy!

<div align=center> <img src="./assets/demo.png"> </div>

Run locally

Install .NET 7 SDK.

Clone the project and go to the web project to run it. Only for development, NOT for production!

git clone https://gitlab.aiursoft.cn/aiursoft/moongladepure.git
cd ./MoongladePure/src/Moonglade.Web/
ASPNETCORE_ENVIRONMENT=Development dotnet run --urls=http://0.0.0.0:8080

You may see the following output:

warn: MoongladePure.Web[0]
      Running in environment: Development.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://0.0.0.0:8080
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.

Now open your browser and browse to http://localhost:8080. You should see the MoongladePure welcome page.

Run in Docker

Install Docker and Docker-Compose here.

Then run the following commands in the project path:

docker-compose build
docker-compose up

That will start a web server at http://localhost:8080 and you can test the app.

Run in a production server

It is suggested to use Ubuntu 22.04 LTS as the operating system.

Prerequisites

  • MySQL
  • .NET
  • Caddy(Optional)

Prepare MySQL Server

Install MySQL server as the database of MoongladePure.

The database can be a different server from the Web app server.

sudo apt install mysql-server -y
sudo systemctl enable mysql
sudo systemctl start mysql

Set admin password:

sudo mysql_secure_installation

Or

sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'mynewpassword';
exit;

To sign in your MySQL:

sudo mysql -u root -p

Create a database for MoongladePure:

CREATE DATABASE MoongladePure;
CREATE USER 'moongladepure'@'localhost' IDENTIFIED BY 'YOUR_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON MoongladePure.* TO 'moongladepure'@'localhost';
FLUSH PRIVILEGES;
exit;

Prepare a storage path

Create a folder for MoongladePure to store data:

sudo mkdir /mnt/datastore
sudo chown -R www-data:www-data /mnt/datastore

Download MoongladePure

You can download MoongladePure via:

wget https://gitlab.aiursoft.cn/aiursoft/moongladepure/-/archive/master/moongladepure-master.tar.gz
tar -zxvf ./moongladepure-master.tar.gz moongladepure-master/
ls

Build MoongladePure

Install dotnet7 first.

sudo apt install -y dotnet7

Prepare a directory:

sudo mkdir -p /opt/apps/MoongladePure
sudo chown -R www-data:www-data /opt/apps/MoongladePure

Then build it:

dotnet publish -c Release -o ./bin -r linux-x64 --no-self-contained ./moongladepure-master/src/Moonglade.Web/MoongladePure.Web.csproj

Copy the files to the directory:

sudo cp ./bin/* /opt/apps/MoongladePure/ -rv
sudo chown -R www-data:www-data /opt/apps/MoongladePure

Download related fonts:

sudo mkdir /usr/share/fonts
sudo wget https://gitlab.aiursoft.cn/aiursoft/moongladepure/-/raw/master/assets/OpenSans-Regular.ttf -O /usr/share/fonts/OpenSans-Regular.ttf
sudo chown www-data:www-data /usr/share/fonts/OpenSans-Regular.ttf

Edit the configuration

Copy the configuration file as production first:

sudo -u www-data cp /opt/apps/MoongladePure/appsettings.json /opt/apps/MoongladePure/appsettings.Production.json

Then edit the production JSON file.

  • Make the database connection string to your real database.
  • Make the storage path to be your real storage path.
sudo -u www-data vim /opt/apps/MoongladePure/appsettings.Production.json

Run MoongladePure

First register MoongladePure as a service:

echo '[Unit]
Description=MoongladePure Service
After=network.target mysql.service
Wants=network.target mysql.service

[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/dotnet /opt/apps/MoongladePure/MoongladePure.Web.dll --urls=http://0.0.0.0:48466/
WorkingDirectory=/opt/apps/MoongladePure
Restart=always
RestartSec=10
KillSignal=SIGINT
Environment="ASPNETCORE_ENVIRONMENT=Production"
Environment="DOTNET_PRINT_TELEMETRY_MESSAGE=false"
Environment="DOTNET_CLI_TELEMETRY_OPTOUT=1"
Environment="ASPNETCORE_FORWARDEDHEADERS_ENABLED=true"

[Install]
WantedBy=multi-user.target' | sudo tee -a /etc/systemd/system/moongladepure.service

Then start the service.

sudo systemctl daemon-reload
sudo systemctl enable moongladepure
sudo systemctl start moongladepure

Now you can visit your MoongladePure site via http://your-ip:48466.

The admin panel is at http://your-ip:48466/admin. The default username is admin and password is admin123.

Prepare HTTPS

Please make sure you have a domain name ready and point to your server's IP address.

Then install a reverse proxy server. For example, I'm using Caddy.

echo "deb [trusted=yes] https://apt.fury.io/caddy/ /" | sudo tee -a /etc/apt/sources.list.d/caddy-fury.list
sudo apt update
sudo apt install caddy -y

Then edit the Caddyfile:

sudo vim /etc/caddy/Caddyfile

Add the following content:

your.domain.com {
        reverse_proxy http://localhost:48466 {
        }
}

Then restart Caddy:

sudo systemctl restart caddy

Now try to open your browser and try:

https://your.domain.com

Advanced setup

MoongladePure supports scaling out. You can deploy multiple MoongladePure instances to serve your users.

Moonglade-scale-out

The following articles might be needed.

You can follow the best practice after having a Linux server.

If you deployed the MySQL database on another server, you might need to set up MySQL to allow remote connection.

If you want to share the storage path on a different remote server to scale out, you can use NFS to share the folder.

Yes! MoongladePure is stateless. You can setup multiple MoongladePure Web servers to scale out and shares the same database and NFS storage.

And in that case, you need Caddy as a load balance. Here are some tips:

It is also suggested to mount a big disk to save your blog's content. View more here:

How to contribute

There are many ways to contribute to the project: logging bugs, submitting pull requests, reporting issues, and creating suggestions.

Even if you with push rights on the repository, you should create a personal fork and create feature branches there when you need them. This keeps the main repository clean and your workflow cruft out of sight.

We're also interested in your feedback on the future of this project. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.0.44 70 9/21/2024
8.0.43 104 7/24/2024
8.0.42 97 7/23/2024
8.0.41 103 7/19/2024
8.0.40 100 7/14/2024
8.0.39 86 7/11/2024
8.0.38 85 7/10/2024
8.0.37 88 7/9/2024
8.0.36 95 7/8/2024
8.0.35 109 6/30/2024
8.0.34 114 6/29/2024
8.0.33 99 6/25/2024
8.0.32 98 6/21/2024
8.0.31 119 6/18/2024
8.0.30 96 6/12/2024
8.0.29 89 6/11/2024
8.0.28 107 6/8/2024
8.0.27 85 6/6/2024
8.0.26 101 6/5/2024
8.0.24 113 5/16/2024
8.0.23 108 5/6/2024
8.0.22 112 5/4/2024
8.0.21 129 4/7/2024
8.0.20 94 4/5/2024
8.0.19 117 4/1/2024
8.0.18 114 3/31/2024
8.0.16 132 3/26/2024
8.0.15 104 3/25/2024
8.0.14 130 3/18/2024
8.0.13 106 3/17/2024
8.0.12 129 3/17/2024
8.0.11 110 3/17/2024
8.0.10 109 3/17/2024
8.0.9 122 3/12/2024
8.0.8 141 3/4/2024
8.0.7 141 3/1/2024
8.0.6 119 2/28/2024
8.0.5 121 2/28/2024
8.0.4 127 2/28/2024
8.0.3 118 2/26/2024
8.0.2 103 2/25/2024
8.0.1 123 2/19/2024
7.0.59 127 2/18/2024
7.0.58 113 2/15/2024
7.0.57 134 2/14/2024
7.0.56 125 2/10/2024
7.0.55 125 2/6/2024
7.0.54 119 2/5/2024
7.0.53 114 2/4/2024
7.0.52 118 2/3/2024
7.0.51 109 2/2/2024
7.0.50 113 2/2/2024
7.0.49 93 1/30/2024
7.0.48 116 1/30/2024
7.0.47 113 1/28/2024
7.0.46 91 1/27/2024
7.0.45 121 1/21/2024
7.0.44 115 1/18/2024
7.0.43 132 1/12/2024
7.0.42 122 1/11/2024
7.0.41 122 1/10/2024
7.0.40 138 1/5/2024
7.0.39 116 1/5/2024
7.0.38 138 1/4/2024
7.0.37 137 1/4/2024
7.0.36 152 1/4/2024
7.0.35 141 12/31/2023
7.0.34 127 12/30/2023
7.0.33 136 12/25/2023
7.0.32 142 12/24/2023
7.0.31 141 12/18/2023
7.0.30 125 12/16/2023
7.0.29 126 12/13/2023
7.0.28 137 12/12/2023
7.0.27 134 12/11/2023
7.0.26 145 12/11/2023
7.0.25 153 12/3/2023
7.0.24 149 12/1/2023
7.0.23 126 11/26/2023
7.0.22 161 11/21/2023
7.0.21 118 11/18/2023
7.0.20 133 11/14/2023
7.0.19 144 11/6/2023
7.0.18 117 11/2/2023
7.0.17 138 11/2/2023
7.0.16 134 11/2/2023
7.0.15 112 10/31/2023
7.0.14 122 10/31/2023
7.0.13 124 10/29/2023
7.0.12 130 10/27/2023
7.0.11 122 10/24/2023
7.0.10 147 10/18/2023
7.0.9 124 10/11/2023
7.0.8 117 10/11/2023
7.0.7 150 10/10/2023
7.0.6 136 10/6/2023
7.0.5 118 9/27/2023
7.0.4 123 9/20/2023
7.0.3 127 9/18/2023
7.0.2 155 9/13/2023
7.0.1 146 9/13/2023
7.0.0 144 9/5/2023
1.1.0 154 8/20/2023