AKStream.Next · 文档中心

Windows: From Extraction to First Login

Windows: From Extraction to First Login

Extract the complete Windows package and double-click install.cmd. Accept the Windows administrator prompt and follow the installation options. After installation, use akn to manage services; do not run the main executable by double-clicking it for long-term operation.

flowchart LR
    A[Double-click install.cmd] --> B[Check x64 / arm64 package]
    B --> C[Run installer]
    C --> D[Windows SCM manages services]
    D --> E[Open port 5800 in browser]

1. Select the Correct Package

Confirm your architecture in "Settings → System → About" or via PowerShell:

[System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture

Use the win-x64 release on X64 servers and win-arm64 on Arm64 servers. Install the .NET 7 ASP.NET Core Runtime; the SDK, Node.js, and npm are not required.

2. Verify and Extract

Verify the SHA256 checksum in the download directory:

$package = Get-ChildItem . -Filter 'AKStream.Next-*-win-x64.zip' | Select-Object -First 1
Get-FileHash $package.FullName -Algorithm SHA256

Compare it with the checksum file from the same Release, then extract the package and enter the root directory. For directory purposes, see Package Structure.

3. Double-Click Installation

Extract the entire ZIP and double-click install.cmd in the package root. Accept the Windows administrator prompt and follow the installation options. The launcher enables scripts only for this process and does not change machine execution policy. Canceling UAC does not install anything. The installer keeps errors visible and performs its normal health checks.

Dependency installation prefers verified Chinese mirrors: USTC for MariaDB and Huawei Cloud for Nginx. The current Windows MySQL LTS MSI, static FFmpeg build and ASP.NET Core Runtime have no verified stable Chinese mirror in this installer, so they fall back to Oracle, gyan.dev and Microsoft respectively. Pinned MSI/ZIP downloads are checked against SHA256, without WinGet downloads for these files. A failed download returns to the selection menu so you can retry, choose an existing ffmpeg.exe, or skip until initial configuration. On Windows ARM64 the x64 build is checked for compatibility; you can also provide native ARM64 FFmpeg.

4. Command-Line Installation and Help

From the extracted package root, CMD and PowerShell can both run:

.\install.cmd

For direct script invocation in an administrator PowerShell:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\Deploy\windows\akstream-next.ps1" install -PackageRoot "."

For advanced options:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File ".\Deploy\windows\akstream-next.ps1" help

Default locations:

  • Program: %ProgramFiles%\AKStream.Next
  • Configuration: %ProgramData%\AKStream.Next\Config
  • Data: %ProgramData%\AKStream.Next
  • Main Service: AKStream.Next
  • Agent Service: AKStream.Next.NodeAgent

The script sets both services to start automatically and configures the main service to restart upon failure. For unattended installation, you can add -Yes, though this will not skip architecture, runtime, or health checks.

5. Open the Initial Configuration Page

View the one-time installation code:

Get-Content "$env:ProgramData\AKStream.Next\Config\.akstream-next-setup-token"
Invoke-RestMethod http://127.0.0.1:5800/health

Open http://<server-ip>:5800/ in your browser. If the remote computer is inaccessible, check whether Windows Defender Firewall allows the configured WebUI/API port; do not disable the entire firewall.

6. Check and Manage Services

The installer registers the command directory in the machine PATH and notifies the current desktop session. CMD and PowerShell both use akn without a file extension.

Existing terminals may retain their previous PATH. Close the whole Windows Terminal application before reopening it. After an SSH or SYSTEM installation, an existing desktop session may need to sign out and back in. To use the command immediately in the current CMD:

set "PATH=%PATH%;%ProgramData%\AKStream.Next\Tools"
akn status

Use the global command in a new terminal:

akn status
Get-Service AKStream.Next, AKStream.Next.NodeAgent

Start/stop commands require administrator privileges:

akn restart
akn stop
akn start

Check logs first via the WebUI under "System Management → Logs & Audit"; if the main process fails to start, troubleshoot using the Windows Event Viewer, service status, and configuration directory.

7. Upgrade and Recovery Verification

To upgrade, rerun install -PackageRoot <new-package-directory> using the script from the new package. The installer stages the new directory and keeps a backup of the previous program version, but the database, configuration, security keys, and recordings still need independent backups.

Verify SCM automatic restart during a maintenance window:

akn verify-recovery

This command forcibly terminates the main process; it is not a standard health check.

8. Uninstallation

akn uninstall

The command interactively chooses between retaining data and complete cleanup, and confirms complete cleanup again. -Purge -Yes is only for explicitly authorized unattended operation; it deletes the program, configuration, and data and is irreversible.

Next steps: Complete Initial Configuration and Management Command Quick Reference.