Visitar URL original
Installation YAF.NET v4.x.x · YAFNET/YAFNET Wiki · GitHub
Skip to content

Installation YAF.NET v4.x.x

Ingo edited this page Nov 13, 2026 · 12 revisions

Installation of YAF.NET v4.x.x

Tip

The fastest way to try YAF.NET is Docker: one command starts the forum together with its database. For Linux without Docker, see Hosting on Linux with nginx.

Requirements

  • .NET 11.0 Runtime (ASP.NET Core Runtime)
  • One of the supported databases: Microsoft SQL Server (2012 or later), MySQL / MariaDB, PostgreSQL or SQLite
  • An SMTP server for registration mails, password resets and notifications

Important

To run YAF.NET under IIS, the ASP.NET Core Module / Hosting Bundle must be installed on the server.

STEP 1. Unzip

Download the install package for your database from the releases page and unzip it into the folder the forum will run from.

STEP 2. Configure IIS

Skip this step if you don't use IIS.

  1. Create a new website, or an application below an existing website, that points to the folder from step 1. See Host ASP.NET Core on Windows with IIS.
  2. Set the .NET CLR version of the application pool to No Managed Code.
  3. Give the application pool identity write access to the wwwroot/uploads and wwwroot/images folders (and to the database file when you use SQLite).

STEP 3. Create the database

Create an empty database and a database user with permission to create tables. With SQLite the database file is created automatically.

When the forum starts for the first time, it detects the empty database and the installation wizard creates the tables.

STEP 4. Edit appsettings.json

  1. ConnectionStrings:DefaultConnection: the connection string to your database. The appsettings.json contains an example for each database.
  2. BoardConfiguration:ConnectionProviderName: the provider for your database, see BoardConfiguration Settings.
  3. MailConfiguration: your SMTP server (Host, Port and, if the server needs authentication, UserName and Password).
  4. (Optional) VapidConfiguration: a public and a private key to turn on browser push notifications. You can generate a key pair at yetanotherforum.net/Vapid-Keys. Push notifications are turned off while the keys are empty. See Push notifications.
  5. (Optional) BoardConfiguration: all other settings are described on the BoardConfiguration Settings page.
{
  "ConnectionStrings": {
    "DefaultConnection": "data source=(local);initial catalog=yafnet;Integrated Security=True;TrustServerCertificate=True;"
  },
  "MailConfiguration": {
    "UserName": "",
    "Password": "",
    "Host": "localhost",
    "Port": 25
  },
  "VapidConfiguration": {
    "PublicKey": "",
    "PrivateKey": ""
  },
  "BoardConfiguration": {
    "ConnectionProviderName": "Microsoft.Data.SqlClient",
    ...
  }
}

Note

If the forum runs behind a reverse proxy or CDN in a public network (e.g. Cloudflare), add its addresses to TrustedProxies. Otherwise all users get the address of the proxy. See Reverse proxy and Cloudflare.

STEP 5. Run the installation wizard

Open the forum in your browser, e.g. https://localhost/. You are redirected to the installation wizard (/Install/Install), which:

  1. checks the database connection,
  2. creates the database tables,
  3. creates the board and the admin account.

If something goes wrong, see Troubleshooting.

Clone this wiki locally