Skip to main content
Version: 5.0.0

Quick Installation of Halo Blogging Platform

Deploy Halo Blogging Platform swiftly on Sealos

Halo is a powerful and easy-to-use open-source website building tool. This article will introduce how to deploy Halo on Sealos, while deploying PostgreSQL on Sealos can help you easily manage and maintain the database to meet different business needs.

Step 1: Deploy PostgreSQL on Sealos

First, open Sealos and click on "More Apps" to enter the PostgreSQL deployment interface:

Fill in the configuration

In the PostgreSQL deployment interface, click on "Create Cluster" and fill in the relevant configuration information as prompted.

After entering the corresponding configuration, click on "Create Cluster":

Check the database configuration:

Save the generated configuration containing the database username, password, and connection method for use in the following Halo configuration:

The PostgreSQL configuration can be seen in the image as follows:

Username: root

Password: jxidRwmY82eeuFa01tHN28msb86woounM0QMbyl1jhwzKxT9IDqlNkFfyy4R34G3

pg DNS name: acid-halo-pg.ns-sy32q9p9.svc.cluster.local:5432

Step 2: Deploy Halo on Sealos

Open App Launchpad

Fill in the configuration

  • Customize the application name

  • Set the image name to halohub/halo:2.5

  • CPU and storage should be configured according to actual conditions, memory requires 500Mi to start Halo, you can refer to the official prepare

  • Expose port should be 8090. At the same time, setting it to external network access will automatically configure an exit domain for the application for external network access, and you also need to configure this address in Halo

  • Environment variables include database configuration and other related configurations. It is important to note that you need to configure the database connection information based on the username, password, and DNS you set in Step 1. Additionally, you need to configure the username and password for the super administrator of Halo.

Configure Halo environment variables as follows:

spring.sql.init.platform=postgresql
spring.r2dbc.url=r2dbc:pool:postgresql://acid-halo-pg.ns-sy32q9p9.svc.cluster.local:5432/halo
spring.r2dbc.username=root
spring.r2dbc.password=jxidRwmY82eeuFa01tHN28msb86woounM0QMbyl1jhwzKxT9IDqlNkFfyy4R34G3
halo.external-url=tmtdvfjiyyfh.cloud.sealos.io
halo.security.initializer.superadminusername=root
halo.security.initializer.superadminpassword=sealos

Detailed explanation of environment variable configuration:

Parameter NameDescription
spring.r2dbc.urlDatabase connection address, see Database Link Format below for details
spring.r2dbc.usernameDatabase username
spring.r2dbc.passwordDatabase password
spring.sql.init.platformDatabase platform name, supports postgresql, mysql, h2
halo.external-urlExternal access link, if you need public network access, you need to configure the actual access address
halo.security.initializer.superadminusernameInitial super administrator username
halo.security.initializer.superadminpasswordInitial super administrator password

Database link format (here we use the postgresql format):

Connection MethodConnection Address Formatspring.sql.init.platform
PostgreSQLr2dbc:pool:postgresql://{HOST}:{PORT}/{DATABASE}postgresql
MySQLr2dbc:pool:mysql://{HOST}:{PORT}/{DATABASE}mysql
MariaDBr2dbc:pool:mariadb://{HOST}:{PORT}/{DATABASE}mysql
H2 Databaser2dbc:h2:file:///${halo.work-dir}/db/halo-next?MODE=MySQL&DB_CLOSE_ON_EXIT=FALSEh2

Network configuration

Environment variable configuration

Configure Persistent Storage Volume

Mount /root/.halo2 directory to persist Halo data:

Step 3: Access Halo via the Public Network

After successfully launching the application, you can access Halo through the public network address for configuration:

Initialize Halo

First Halo:

FAQ

Forgot Password

Enter the App Launchpad and click on "Logs":

You can see the following information in the logs: Username: admin Password: QTu2J2xgUQ3ngqUo

Alternatively, you can view the logs by executing the following command in the terminal:

root@td3q8uc46:~# kubectl logs halo-0 | grep 'Generated random password:' | tail -1
2023-05-30T13:32:16.942+08:00 INFO 7 --- [-controller-t-1] r.h.app.security.SuperAdminInitializer : === Generated random password: QTu2J2xgUQ3ngqUo for super administrator: admin ===