MoongladePure.Web
7.0.19
See the version list below for details.
dotnet add package MoongladePure.Web --version 7.0.19
NuGet\Install-Package MoongladePure.Web -Version 7.0.19
<PackageReference Include="MoongladePure.Web" Version="7.0.19" />
paket add MoongladePure.Web --version 7.0.19
#r "nuget: MoongladePure.Web, 7.0.19"
// Install MoongladePure.Web as a Cake Addin #addin nuget:?package=MoongladePure.Web&version=7.0.19 // Install MoongladePure.Web as a Cake Tool #tool nuget:?package=MoongladePure.Web&version=7.0.19
MoongladePure
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.
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 | Versions 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. |
-
net7.0
- Aiursoft.WebTools (>= 7.0.8)
- AspNetCoreRateLimit (>= 5.0.0)
- Edi.ImageWatermark (>= 2.11.1)
- MoongladePure.Auth (>= 1.0.0)
- MoongladePure.Comments (>= 1.0.0)
- MoongladePure.Core (>= 1.0.0)
- MoongladePure.Data.MySql (>= 1.0.0)
- MoongladePure.FriendLink (>= 1.0.0)
- MoongladePure.ImageStorage (>= 1.0.0)
- MoongladePure.Menus (>= 1.0.0)
- MoongladePure.Syndication (>= 1.0.0)
- MoongladePure.Theme (>= 1.0.0)
- UAParser (>= 3.1.47)
- WilderMinds.MetaWeblog (>= 5.1.1)
- X.PagedList.Mvc.Core (>= 8.4.7)
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 | 74 | 9/21/2024 |
8.0.43 | 106 | 7/24/2024 |
8.0.42 | 99 | 7/23/2024 |
8.0.41 | 105 | 7/19/2024 |
8.0.40 | 102 | 7/14/2024 |
8.0.39 | 88 | 7/11/2024 |
8.0.38 | 87 | 7/10/2024 |
8.0.37 | 90 | 7/9/2024 |
8.0.36 | 97 | 7/8/2024 |
8.0.35 | 111 | 6/30/2024 |
8.0.34 | 116 | 6/29/2024 |
8.0.33 | 101 | 6/25/2024 |
8.0.32 | 100 | 6/21/2024 |
8.0.31 | 121 | 6/18/2024 |
8.0.30 | 98 | 6/12/2024 |
8.0.29 | 91 | 6/11/2024 |
8.0.28 | 109 | 6/8/2024 |
8.0.27 | 87 | 6/6/2024 |
8.0.26 | 103 | 6/5/2024 |
8.0.24 | 115 | 5/16/2024 |
8.0.23 | 112 | 5/6/2024 |
8.0.22 | 114 | 5/4/2024 |
8.0.21 | 131 | 4/7/2024 |
8.0.20 | 98 | 4/5/2024 |
8.0.19 | 122 | 4/1/2024 |
8.0.18 | 117 | 3/31/2024 |
8.0.16 | 135 | 3/26/2024 |
8.0.15 | 107 | 3/25/2024 |
8.0.14 | 133 | 3/18/2024 |
8.0.13 | 109 | 3/17/2024 |
8.0.12 | 134 | 3/17/2024 |
8.0.11 | 113 | 3/17/2024 |
8.0.10 | 112 | 3/17/2024 |
8.0.9 | 125 | 3/12/2024 |
8.0.8 | 144 | 3/4/2024 |
8.0.7 | 144 | 3/1/2024 |
8.0.6 | 122 | 2/28/2024 |
8.0.5 | 124 | 2/28/2024 |
8.0.4 | 130 | 2/28/2024 |
8.0.3 | 121 | 2/26/2024 |
8.0.2 | 106 | 2/25/2024 |
8.0.1 | 125 | 2/19/2024 |
7.0.59 | 129 | 2/18/2024 |
7.0.58 | 117 | 2/15/2024 |
7.0.57 | 136 | 2/14/2024 |
7.0.56 | 127 | 2/10/2024 |
7.0.55 | 127 | 2/6/2024 |
7.0.54 | 121 | 2/5/2024 |
7.0.53 | 116 | 2/4/2024 |
7.0.52 | 120 | 2/3/2024 |
7.0.51 | 111 | 2/2/2024 |
7.0.50 | 115 | 2/2/2024 |
7.0.49 | 97 | 1/30/2024 |
7.0.48 | 118 | 1/30/2024 |
7.0.47 | 115 | 1/28/2024 |
7.0.46 | 93 | 1/27/2024 |
7.0.45 | 123 | 1/21/2024 |
7.0.44 | 117 | 1/18/2024 |
7.0.43 | 136 | 1/12/2024 |
7.0.42 | 124 | 1/11/2024 |
7.0.41 | 124 | 1/10/2024 |
7.0.40 | 140 | 1/5/2024 |
7.0.39 | 118 | 1/5/2024 |
7.0.38 | 140 | 1/4/2024 |
7.0.37 | 139 | 1/4/2024 |
7.0.36 | 154 | 1/4/2024 |
7.0.35 | 143 | 12/31/2023 |
7.0.34 | 131 | 12/30/2023 |
7.0.33 | 140 | 12/25/2023 |
7.0.32 | 144 | 12/24/2023 |
7.0.31 | 143 | 12/18/2023 |
7.0.30 | 127 | 12/16/2023 |
7.0.29 | 128 | 12/13/2023 |
7.0.28 | 139 | 12/12/2023 |
7.0.27 | 136 | 12/11/2023 |
7.0.26 | 151 | 12/11/2023 |
7.0.25 | 155 | 12/3/2023 |
7.0.24 | 153 | 12/1/2023 |
7.0.23 | 128 | 11/26/2023 |
7.0.22 | 163 | 11/21/2023 |
7.0.21 | 120 | 11/18/2023 |
7.0.20 | 135 | 11/14/2023 |
7.0.19 | 148 | 11/6/2023 |
7.0.18 | 121 | 11/2/2023 |
7.0.17 | 140 | 11/2/2023 |
7.0.16 | 136 | 11/2/2023 |
7.0.15 | 114 | 10/31/2023 |
7.0.14 | 124 | 10/31/2023 |
7.0.13 | 126 | 10/29/2023 |
7.0.12 | 132 | 10/27/2023 |
7.0.11 | 124 | 10/24/2023 |
7.0.10 | 149 | 10/18/2023 |
7.0.9 | 126 | 10/11/2023 |
7.0.8 | 119 | 10/11/2023 |
7.0.7 | 152 | 10/10/2023 |
7.0.6 | 138 | 10/6/2023 |
7.0.5 | 122 | 9/27/2023 |
7.0.4 | 125 | 9/20/2023 |
7.0.3 | 129 | 9/18/2023 |
7.0.2 | 157 | 9/13/2023 |
7.0.1 | 148 | 9/13/2023 |
7.0.0 | 146 | 9/5/2023 |
1.1.0 | 156 | 8/20/2023 |