Deployment guide

Fresns

Overview

Fresns is an open source, self-hosted community and social network platform. It is a content and social engine with a web admin control panel and an open API. A single backend can drive a forum, a microblog or a full social network across the web, mobile apps and mini programs.

Members hold accounts and profiles, publish posts and comments, follow each other, join groups and interact. Operators manage content, members, roles, languages and policies from the control panel. Fresns is built on the Laravel framework and backed by MariaDB. You extend it through a plugin, theme and app marketplace rather than by forking the core.

This SecureAnyCloud image is a complete, hardened Fresns appliance on an Ubuntu 24.04 LTS base, patched at build time. Apache 2 serves port 80 and dispatches PHP to a PHP 8.3 FPM pool. MariaDB 10.11 listens only on the loopback interface. The interface is configured in English.

There is no default login anywhere in the image. The MariaDB root password, the application database password, the Laravel application key and the Fresns administrator password are all generated uniquely on the first boot of each VM. The web server is held back until that first boot has finished, so the Fresns installer is never exposed. Your database and your application tier each live on their own dedicated Azure data disk.

What you get:

  • Fresns v3.8.1, the current upstream release, licensed Apache-2.0.
  • Apache 2.4 on port 80, dispatching PHP to PHP FPM over a unix socket.
  • PHP 8.3 FPM with every extension Fresns and Laravel require, including mysqli, pdo_mysql, mbstring, gd, intl, bcmath, zip, curl, gmp and opcache.
  • MariaDB 10.11, bound to 127.0.0.1 only and never exposed to the network.
  • Composer 2, so the control panel's plugin, theme and app management works out of the box.
  • The Fresns scheduler (php artisan schedule:run) as a managed systemd timer, as upstream requires in production.
  • Interface language set to English.
  • A per-VM Fresns administrator password, Laravel application key, application database password and MariaDB root password, recorded in a root-only file.
  • A /sac-status.php page that proves Apache, PHP FPM and MariaDB are all working together.
  • Two dedicated Azure data disks: one for the database at /var/lib/mysql, one for the application at /var/www.
  • apache2.service, php8.3-fpm.service, mariadb.service and fresns-scheduler.timer as enabled systemd units.
  • An unauthenticated /healthz endpoint for Azure Load Balancer health probes.
  • 24/7 SecureAnyCloud support.

Prerequisites

  • An Azure subscription with permission to create virtual machines.
  • An SSH key pair for administrative access to the VM.
  • A network security group allowing inbound TCP 22 (SSH) and TCP 80 (HTTP) from the addresses you will use.

Step 1 - Deploy from the Azure Marketplace

Search the Azure Marketplace for Fresns on Ubuntu 24.04 LTS by SecureAnyCloud. Choose Create and select the Standard_B2s size or larger.

Provide your SSH public key for the azureuser account, and allow inbound ports 22 and 80.

Step 2 - Deploy from the Azure CLI

az vm image terms accept --urn sac1647283583153:fresns:default:latest
az vm create \
  --resource-group my-resource-group \
  --name fresns-01 \
  --image sac1647283583153:fresns:default:latest \
  --size Standard_B2s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard
# Then open HTTP to the addresses you will browse from:
az vm open-port --resource-group my-resource-group --name fresns-01 --port 80

Step 3 - Confirm Fresns is running

SSH to the VM and confirm that every tier is up. Apache deliberately does not start until the first boot service has written this VM's configuration. Active units therefore also prove that first boot completed.

systemctl is-active apache2 php8.3-fpm mariadb fresns-firstboot fresns-scheduler.timer ss -tln | grep -E ':80 |:3306 '

Expected output:

active active active active active LISTEN 0 80 127.0.0.1:3306 0.0.0.0:* LISTEN 0 511 *:80 *:*

Apache listens on port 80 for the world. MariaDB is bound to 127.0.0.1:3306 and is never reachable off the box.

Step 4 - Retrieve this VM's credentials

Every password is unique to this VM and was generated on first boot. The passwords are written to a root-only file:

sudo cat /root/fresns-credentials.txt

Expected output (passwords shown masked here):

FRESNS_URL=http://<public-ip> FRESNS_ADMIN_PANEL_URL=http://<public-ip>/fresns/admin FRESNS_STATUS_URL=http://<public-ip>/sac-status.php
# Sign in to the Fresns admin panel with these: FRESNS_ADMIN_EMAIL=admin@fresns.local FRESNS_ADMIN_PASSWORD=<set-at-first-boot>
# The application database (MariaDB listens on 127.0.0.1:3306 only, never off-box): FRESNS_DB_NAME=fresns FRESNS_DB_USER=fresns FRESNS_DB_PASSWORD=<set-at-first-boot> FRESNS_MARIADB_ROOT_PASSWORD=<set-at-first-boot>

The administrator signs in with the email admin@fresns.local and the generated FRESNS_ADMIN_PASSWORD. Once you are signed in, you can change the administrator email and add more administrators from the control panel.

Step 5 - Sign in to the Fresns control panel

Browse to http://<public-ip>/fresns/admin. The control panel sign-in page is served in English. Enter the administrator email and the FRESNS_ADMIN_PASSWORD from the credentials file, then choose Enter.

Step 6 - Explore the community dashboard

After signing in, you land on the Fresns dashboard. It shows the running version and the live counts of accounts, users, groups, hashtags, geotags, posts and comments, read straight from the database. It also lists the installed extensions (admins, app keys, plugins, themes and apps) and the system information for this VM.

You can confirm from the command line that the administrator can sign in. Run this on the VM:

CJ=$(mktemp)
TOKEN=$(curl -s -c "$CJ" http://127.0.0.1/fresns/admin | grep -oE 'name="_token" value="[^"]+"' | head -1 | cut -d'"' -f4)
curl -s -o /dev/null -b "$CJ" -c "$CJ" \
  --data-urlencode "accountName=<FRESNS_ADMIN_EMAIL>" \
  --data-urlencode "password=<FRESNS_ADMIN_PASSWORD>" \
  --data-urlencode "_token=$TOKEN" http://127.0.0.1/fresns/admin
curl -s -o /dev/null -w 'dashboard: HTTP %{http_code}\n' -b "$CJ" http://127.0.0.1/fresns/dashboard rm -f "$CJ"

Expected output:

dashboard: HTTP 200

An HTTP 200 on the dashboard confirms that the per-VM administrator password authenticated through the real login form. Before signing in, the same dashboard request is redirected to the login page.

Step 7 - Manage your members

Open Operations, then the accounts area, to manage the community's members. The account created on first boot is your administrator. From here you add, search, suspend and assign roles to members as your community grows.

Step 8 - Configure your site

Open Settings to configure your site: its name and description, the default and enabled languages, the storage back end for uploads, the content and interaction policies and the API clients. This is where you tailor the platform to your community before opening it up.

To publish a front end that your members browse (a website theme or a mobile client), install a Fresns front end engine or theme from Extends in the control panel. Fresns keeps the backend and the front end decoupled. The same community backend on this VM can drive a website today and a mobile app tomorrow.

Step 9 - Verify the stack end to end

The image ships a status page that proves all three tiers in a single request. Apache serves it, PHP FPM executes it, and MariaDB answers a real query against the Fresns schema.

curl -sI http://127.0.0.1/healthz | head -1
curl -s http://127.0.0.1/sac-status.php | grep -oE 'FRESNS_STATUS_OK|MariaDB [0-9.]+[-A-Za-z0-9]*|PHP [0-9.]+ via [a-z-]+'

Expected output:

HTTP/1.1 200 OK FRESNS_STATUS_OK MariaDB 10.11.14-MariaDB-0ubuntu0 PHP 8.3.6 via fpm-fcgi

FRESNS_STATUS_OK is printed only when Apache, PHP FPM and MariaDB have all answered.

Step 10 - Component versions

apache2 -v | head -1 php -v | head -1 mariadb --version

Expected output:

Server version: Apache/2.4.58 (Ubuntu) PHP 8.3.6 (cli) (built: Jul 16 2026 18:30:41) (NTS) mariadb Ver 15.1 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

Fresns itself is v3.8.1, running on the Laravel framework.

Step 11 - Where your data lives

Your database and your application tier each have their own dedicated ext4 data disk. The disks are independently resizable and survive an OS disk swap.

df -h /var/lib/mysql /var/www findmnt -no SOURCE,TARGET,FSTYPE /var/lib/mysql /var/www grep bind-address /etc/mysql/mariadb.conf.d/*.cnf

Expected output:

Filesystem Size Used Avail Use% Mounted on /dev/sdc 20G 197M 19G 2% /var/lib/mysql /dev/sdd 20G 61M 19G 1% /var/www /dev/sdc /var/lib/mysql ext4 /dev/sdd /var/www ext4 /etc/mysql/mariadb.conf.d/99-sac-fresns.cnf:bind-address = 127.0.0.1

Step 12 - Review the database accounts

On-box database maintenance needs no password, because root@localhost authenticates through the unix socket. Each network account carries a per-VM password, and there are no anonymous accounts.

sudo mariadb -N -B -e "SELECT User, Host, plugin FROM mysql.user WHERE User IN ('root','fresns') ORDER BY User, Host;"
sudo mariadb -N -B -e "SELECT COUNT(*) AS tables_in_fresns FROM information_schema.tables WHERE table_schema='fresns';"

Expected output:

fresns 127.0.0.1 mysql_native_password fresns localhost mysql_native_password root 127.0.0.1 mysql_native_password root ::1 mysql_native_password root localhost unix_socket 62

The application connects as the least-privilege fresns user, which only has rights on the fresns database. Only root@localhost (socket) can administer the whole server, and it is not reachable over the network.

Language and regional settings

The control panel and the shipped instance are set to English. Under Settings in the control panel, you can add and switch languages and set the default language for the panel and for your community. Fresns is fully internationalised, so you can run your community in any language you enable.

Enabling HTTPS with Let's Encrypt

To serve Fresns over HTTPS, put a certificate in front of it. Point a DNS name at the VM's public IP and open port 443 in the network security group. Then run:

sudo apt-get update
sudo apt-get install -y certbot python3-certbot-apache
sudo certbot --apache -d your-domain.example

Certbot obtains a certificate, configures the Apache virtual host for HTTPS and sets up automatic renewal.

After enabling HTTPS, update your site URL in the control panel settings, and Laravel's APP_URL in /var/www/fresns/.env, to the https:// address so that generated links are correct. Then reload Apache.

Security notes

  • There is no default login in the image. The MariaDB root password, the application database password, the Laravel application key and the Fresns administrator password are all generated uniquely on this VM's first boot.
  • Apache does not start until first boot has written this VM's configuration and marked the install complete, so the Fresns installer is never exposed on a fresh VM.
  • MariaDB is bound to 127.0.0.1 only. Keep it that way, because the application reaches it over the loopback interface.
  • The application's .env file, which holds the database password and the application key, lives outside the web root and is denied over HTTP.
  • Keep the network security group tight. Expose port 80 (and 443 once you enable TLS) only to the addresses that need it, and restrict SSH to your own IP.
  • Keep the VM patched with sudo apt-get update && sudo apt-get upgrade.

Support

SecureAnyCloud backs this image with 24/7 support. For questions about this image, contact sales@secureanycloud.com.

Deploy on Azure

Launch Fresns on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.

View this image

Need Help?

Our support team is available 24/7.

sales@secureanycloud.com

Deploy on Azure