master
md 31 lines 951 Bytes
Rendered Raw
1 # WSLC-NextCloud
2
3 A sample that uses the [WSL Container API](https://aka.ms/wslc) to run a
4 **Nextcloud** server from a native Windows executable, written in modern C# with
5 the `Microsoft.WSL.Containers` C#/WinRT projection. Running `nextcloud.exe`
6 starts a lightweight WSL container, pulls the official `nextcloud` image, and
7 serves it on **http://localhost:8080** (host port 8080 → container port 80).
8
9 ## Build
10
11 Requires the .NET 8 SDK. From this folder:
12
13 ```
14 dotnet build -c Debug
15 ```
16
17 ## Run
18
19 ```
20 dotnet run -c Debug
21 ```
22
23 Open **http://localhost:8080** in your browser, then press **Enter** in the
24 terminal to stop the server and clean up. The first run pulls a ~1.5 GB image
25 and may take several minutes.
26
27 ## Storage
28
29 Two folders are created next to the executable (no absolute paths):
30 `WslcNextcloudStorage\` holds the ephemeral session VHD, and `WslcNextcloudData\`
31 is bind-mounted at `/var/www/html/data` so user data persists between runs.