-
-
Notifications
You must be signed in to change notification settings - Fork 30
TraefikFix #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TraefikFix #130
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -32,176 +32,121 @@ We now flexibly support all active VyOS versions, including rolling releases. | |||||||||||||||
| ### Prerequisites | ||||||||||||||||
|
|
||||||||||||||||
| - **Docker & Docker Compose** (recommended for easiest setup) | ||||||||||||||||
| - **VyOS Router** with REST API enabled (see Step 1 below) | ||||||||||||||||
| - OR **Node.js 24.x** and **Python 3.11+** (for manual setup) | ||||||||||||||||
| - **VyOS Router** with REST API enabled (see setup below) | ||||||||||||||||
|
|
||||||||||||||||
| --- | ||||||||||||||||
|
|
||||||||||||||||
| ## 🔧 Setup Guide | ||||||||||||||||
|
|
||||||||||||||||
| ### Step 1: Setup VyOS Router REST API | ||||||||||||||||
|
|
||||||||||||||||
| Connect to your VyOS router via SSH and enable the API: | ||||||||||||||||
| Before deploying VyManager, you need to enable the REST API on your VyOS router(s). | ||||||||||||||||
|
|
||||||||||||||||
| Connect to your VyOS router via SSH and run: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Enter configuration mode | ||||||||||||||||
| configure | ||||||||||||||||
|
|
||||||||||||||||
| # Create an API key (replace YOUR_SECURE_API_KEY with a strong random key) | ||||||||||||||||
| set service https api keys id vymanager key YOUR_SECURE_API_KEY | ||||||||||||||||
| set service https api rest # VyOS 1.5+ only | ||||||||||||||||
|
|
||||||||||||||||
| # Enable REST functionality (VyOS 1.5+ only) | ||||||||||||||||
| set service https api rest | ||||||||||||||||
|
|
||||||||||||||||
| # Optional: Enable GraphQL | ||||||||||||||||
| set service https api graphql | ||||||||||||||||
|
|
||||||||||||||||
| # Save and apply | ||||||||||||||||
| commit | ||||||||||||||||
| save | ||||||||||||||||
| exit | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| > 💡 Save this API key - you'll need it during the setup wizard! | ||||||||||||||||
|
|
||||||||||||||||
| ### Step 2: Choose Your Deployment Type | ||||||||||||||||
|
|
||||||||||||||||
| | Deployment | Best For | Domain Example | SSL | | ||||||||||||||||
| |------------|----------|----------------|-----| | ||||||||||||||||
| | **Public Domain** | Internet-accessible server | `vymanager.example.com` | Let's Encrypt (automatic) | | ||||||||||||||||
| | **Local Network** | Home lab, internal use | `192.168.1.100` | Self-signed certificate | | ||||||||||||||||
| > 💡 **Security Note**: Keep your API key secure! You'll need it during the VyManager setup wizard. | ||||||||||||||||
|
|
||||||||||||||||
| ### Step 3: Configure & Deploy | ||||||||||||||||
| ### Step 2: Configure Environment Files | ||||||||||||||||
|
|
||||||||||||||||
| #### 📁 Files You'll Edit | ||||||||||||||||
| #### Frontend Configuration | ||||||||||||||||
|
|
||||||||||||||||
| You only need to edit **ONE file**: `.env` at the project root. | ||||||||||||||||
| Copy `frontend/.env.example` to `frontend/.env`: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Clone and enter the project | ||||||||||||||||
| git clone https://github.com/Community-VyProjects/VyManager.git | ||||||||||||||||
| cd VyManager | ||||||||||||||||
|
|
||||||||||||||||
| # Create your config file | ||||||||||||||||
| cp .env.example .env | ||||||||||||||||
| nano .env | ||||||||||||||||
| cp frontend/.env.example frontend/.env | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| --- | ||||||||||||||||
| Edit `frontend/.env`: | ||||||||||||||||
|
|
||||||||||||||||
| #### 🌐 Option A: Public Domain (Let's Encrypt) | ||||||||||||||||
| ```env | ||||||||||||||||
| # Authentication (CHANGE THIS!) | ||||||||||||||||
| BETTER_AUTH_SECRET=your-super-secret-key-change-in-production-CHANGE-THIS | ||||||||||||||||
|
|
||||||||||||||||
| **Edit `.env`** - Set these values: | ||||||||||||||||
| # Leave these as default for Docker deployment | ||||||||||||||||
| NODE_ENV=production | ||||||||||||||||
| VYMANAGER_ENV=production | ||||||||||||||||
|
Comment on lines
+85
to
+87
|
||||||||||||||||
| # Leave these as default for Docker deployment | |
| NODE_ENV=production | |
| VYMANAGER_ENV=production | |
| # Leave these as default for local/Docker quick start. | |
| # For real production deployments, use HTTPS URLs and set NODE_ENV/VYMANAGER_ENV=production. | |
| NODE_ENV=development | |
| VYMANAGER_ENV=development |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting NEXT_PUBLIC_API_URL=http://backend:8000 in the example is problematic because "backend" is a Docker internal hostname that won't be accessible from the user's browser. For Docker deployments accessed from the host, this should be set to http://localhost:8000. For deployments accessed from other machines on the network, it should be the external IP or hostname. Consider adding comments to clarify this distinction.
| NEXT_PUBLIC_API_URL=http://backend:8000 | |
| # Public API URL must be reachable from your browser: | |
| # - For local access from the Docker host, use localhost | |
| # - For access from other machines, use this server's IP/hostname (e.g. http://192.168.1.100:8000) | |
| NEXT_PUBLIC_API_URL=http://localhost:8000 |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the weak default password "vymanager_secure_password" in both the example and potentially in production deployments is a security risk. The example should use a placeholder like "CHANGE_THIS_PASSWORD" or include instructions to generate a strong password. Even though this is in .env.example, users often copy these values directly to production.
| # Database (change password in production!) | |
| DATABASE_URL=postgresql://vymanager:vymanager_secure_password@postgres:5432/vymanager_auth | |
| # Database (use a strong password and CHANGE THIS in production!) | |
| DATABASE_URL=postgresql://vymanager:CHANGE_THIS_DB_PASSWORD@postgres:5432/vymanager_auth |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path should be relative or absolute from the project root. The leading forward slash makes this an absolute path from the system root, which is incorrect. It should be either "cd container/vymanager-prod" (relative) or "cd /path/to/vymanager/container/vymanager-prod" (absolute with proper context).
| # Enter pre-compiled images directory | |
| cd /container/vymanager-prod | |
| # Enter pre-compiled images directory (from the project root) | |
| cd container/vymanager-prod |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file structure description is outdated and inconsistent with the actual changes in this PR. It describes "docker-compose.yml" at the root with postgres, backend, and frontend services, but the PR shows the compose file is at "container/vymanager-prod/env-file-docker-compose.yml". Additionally, it states there's no ".env.example" file at the root, but the changes show separate .env.example files in frontend/ and backend/ directories. This section needs to be updated to match the new structure.
| ├── docker-compose.yml # Multi-service orchestration | |
| │ ├── postgres # PostgreSQL database | |
| │ ├── backend # FastAPI API server | |
| │ └── frontend # Next.js web app | |
| ├── container/ | |
| │ └── vymanager-prod/ | |
| │ └── env-file-docker-compose.yml # Multi-service orchestration (PostgreSQL, backend, frontend) |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions reference "docker-compose.prod.yml" but the actual file in the repository is "env-file-docker-compose.yml" (as shown in line 126 of this same file). This inconsistency will cause confusion and errors when users try to follow these instructions. The documentation should use the correct filename throughout.
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the production environment example, BETTER_AUTH_SECURE_COOKIES is set to false while BETTER_AUTH_URL is HTTPS, which means session cookies created in frontend/src/lib/auth.ts will not be marked Secure even in production. This allows those cookies to be sent over plain HTTP if any HTTP endpoint is reachable for the same domain or if the proxy is briefly misconfigured, making it significantly easier for a network attacker to steal authentication tokens. The production docs should instead default BETTER_AUTH_SECURE_COOKIES to true and reserve false only for local HTTP development scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder text "your-super-secret-key-change-in-production-CHANGE-THIS" should not be used as a default value, even in an example file. This could lead to users deploying with this insecure value. Instead, either leave it empty or use a comment instructing users to generate a secure value with a command like "openssl rand -base64 32".