Setting Up AliasVault Development Environment on Windows
This guide will help you set up AliasVault for development on Windows using WSL (Windows Subsystem for Linux).
Prerequisites
- Install WSL
- Open PowerShell as Administrator and run:
wsl --install
- This will install Ubuntu by default
- Restart your computer after installation
- Open PowerShell as Administrator and run:
- Install Visual Studio 2022
- Download from Visual Studio Downloads
- Required Workloads:
- ASP.NET and web development
- .NET WebAssembly development tools
- .NET cross-platform development
- Install .NET 9 SDK
- Download from .NET Downloads
- Install both Windows and Linux versions (you’ll need both)
Setup Steps
- Clone the Repository
git clone https://github.com/lanedirt/AliasVault.git cd AliasVault
- Configure WSL
- Open WSL terminal
- Edit WSL configuration:
sudo nano /etc/wsl.conf
- Add the following configuration:
[automount] enabled = true options = "metadata,umask=22,fmask=11" mountFsTab = false [boot] systemd=true
- Save the file (Ctrl+X, then Y)
- Restart WSL from PowerShell:
wsl --shutdown
- Setup Development Database
- Open a new WSL terminal in the AliasVault directory
- Run the development database setup:
./install.sh configure-dev-db
- Select option 1 to start the development database
- Verify the database is running:
docker ps | grep postgres-dev
- Run the Application
- Open the solution in Visual Studio 2022
- Set WebApi as the startup project
- Press F5 to run in debug mode
Troubleshooting
Database Connection Issues
If the WebApi fails to start due to database connection issues:
- Check Database Status
docker ps | grep postgres-dev
- Check Database Logs
docker logs aliasvault-dev-postgres-dev-1
- Permission Issues If you see permission errors, try:
sudo mkdir -p ./database/postgres sudo chown -R 999:999 ./database/postgres sudo chmod -R 700 ./database/postgres
- Restart Development Database
./install.sh configure-dev-db # Select option 2 to stop, then option 1 to start again
WSL Issues
If you experience WSL-related issues:
- Make sure you have the latest WSL version:
wsl --update
- Verify WSL is running correctly:
wsl --status
- If problems persist, try resetting WSL:
wsl --shutdown wsl
Additional Notes
- Always run the development database before starting the WebApi project
- Make sure you’re using the correct .NET SDK version in both Windows and WSL
- If you modify the WSL configuration, always restart WSL afterward
- For best performance, store the project files in the Linux filesystem rather than the Windows filesystem
Support
If you encounter any issues not covered in this guide, please:
- Check the GitHub Issues
- Search for existing solutions
- Create a new issue if needed