mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-10 03:51:54 +00:00
feat: add port configuration prompt to installer
- Install script now prompts for custom port (default: 7655) - Can skip prompt with FRONTEND_PORT environment variable - Fixed incorrect port configuration instructions in UI - Updated documentation to reflect new installation options - Fixed FAQ.md references to pulse-backend (should be pulse) addresses #110
This commit is contained in:
parent
35e3f986f4
commit
bd9ebcada7
5 changed files with 69 additions and 17 deletions
|
|
@ -22,12 +22,13 @@ Settings → System → Network Settings → Toggle "Enable Discovery" off → S
|
|||
Or set environment variable `DISCOVERY_ENABLED=false`
|
||||
|
||||
### How do I change the port?
|
||||
Systemd: `sudo systemctl edit pulse-backend`, add `Environment="FRONTEND_PORT=8080"`, restart
|
||||
Docker: Use `-e FRONTEND_PORT=8080` in your run command
|
||||
Systemd: `sudo systemctl edit pulse`, add `Environment="FRONTEND_PORT=8080"`, restart
|
||||
Docker: Use `-e FRONTEND_PORT=8080 -p 8080:8080` in your run command
|
||||
See [Port Configuration Guide](PORT_CONFIGURATION.md) for details
|
||||
|
||||
### Why can't I change settings in the UI?
|
||||
If a setting is disabled with an amber warning, it's being overridden by an environment variable.
|
||||
Remove the env var (check `sudo systemctl show pulse-backend | grep Environment`) and restart to enable UI configuration.
|
||||
Remove the env var (check `sudo systemctl show pulse | grep Environment`) and restart to enable UI configuration.
|
||||
|
||||
### What permissions needed?
|
||||
- PVE: `PVEAuditor` minimum
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ The official installer automatically detects your environment and chooses the be
|
|||
curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
The installer will prompt you for the port (default: 7655). To skip the prompt, set the environment variable:
|
||||
```bash
|
||||
FRONTEND_PORT=8080 curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
## Installation Methods
|
||||
|
||||
### Proxmox VE Hosts
|
||||
|
|
@ -27,6 +32,7 @@ When run on a Proxmox VE host, the installer automatically:
|
|||
- Customize all container settings
|
||||
- Choose specific network bridges and storage
|
||||
- Configure static IP if needed
|
||||
- Set custom port (default: 7655)
|
||||
|
||||
### Standard Linux Systems
|
||||
|
||||
|
|
@ -90,10 +96,14 @@ Ensure you have:
|
|||
- Network bridge configured
|
||||
|
||||
### Port Already in Use
|
||||
Pulse uses port 7655 by default. Check with:
|
||||
Pulse uses port 7655 by default. You can change it during installation or check current usage with:
|
||||
```bash
|
||||
sudo netstat -tlnp | grep 7655
|
||||
```
|
||||
To use a different port during installation:
|
||||
```bash
|
||||
FRONTEND_PORT=8080 curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
## Uninstalling
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,13 @@ Pulse supports multiple ways to configure the frontend port (default: 7655).
|
|||
|
||||
## Recommended Methods
|
||||
|
||||
### 1. Using systemd override (Recommended for systemd installations)
|
||||
### 1. During Installation (Easiest)
|
||||
The installer prompts for the port. To skip the prompt, use:
|
||||
```bash
|
||||
FRONTEND_PORT=8080 curl -fsSL https://raw.githubusercontent.com/rcourtman/Pulse/main/install.sh | sudo bash
|
||||
```
|
||||
|
||||
### 2. Using systemd override (For existing installations)
|
||||
```bash
|
||||
sudo systemctl edit pulse
|
||||
```
|
||||
|
|
@ -15,7 +21,7 @@ Environment="FRONTEND_PORT=8080"
|
|||
```
|
||||
Then restart: `sudo systemctl restart pulse`
|
||||
|
||||
### 2. Using system.json (For persistent configuration)
|
||||
### 3. Using system.json (Alternative method)
|
||||
Edit `/etc/pulse/system.json`:
|
||||
```json
|
||||
{
|
||||
|
|
@ -24,12 +30,10 @@ Edit `/etc/pulse/system.json`:
|
|||
```
|
||||
Then restart: `sudo systemctl restart pulse`
|
||||
|
||||
Note: This can also be configured via the Web UI settings.
|
||||
|
||||
### 3. Using environment variables (Docker)
|
||||
### 4. Using environment variables (Docker)
|
||||
For Docker deployments:
|
||||
```bash
|
||||
docker run -e FRONTEND_PORT=8080 -p 8080:8080 rcourtman/pulse
|
||||
docker run -e FRONTEND_PORT=8080 -p 8080:8080 rcourtman/pulse:latest
|
||||
```
|
||||
|
||||
## Priority Order
|
||||
|
|
|
|||
|
|
@ -1283,11 +1283,12 @@ const Settings: Component = () => {
|
|||
|
||||
<div class="mt-3 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-lg">
|
||||
<p class="text-xs text-amber-800 dark:text-amber-200 mb-2">
|
||||
<strong>Port Configuration:</strong> Edit <code class="font-mono bg-amber-100 dark:bg-amber-800 px-1 rounded">/etc/pulse/.env</code>
|
||||
<strong>Port Configuration:</strong> Use <code class="font-mono bg-amber-100 dark:bg-amber-800 px-1 rounded">systemctl edit pulse</code>
|
||||
</p>
|
||||
<p class="text-xs text-amber-700 dark:text-amber-300 font-mono">
|
||||
FRONTEND_PORT=8080<br/>
|
||||
<span class="text-xs text-amber-600 dark:text-amber-400">Then restart: sudo systemctl restart pulse-backend</span>
|
||||
[Service]<br/>
|
||||
Environment="FRONTEND_PORT=8080"<br/>
|
||||
<span class="text-xs text-amber-600 dark:text-amber-400">Then restart: sudo systemctl restart pulse</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
44
install.sh
44
install.sh
|
|
@ -160,6 +160,15 @@ create_lxc_container() {
|
|||
fi
|
||||
|
||||
if [[ "$ADVANCED_MODE" == "true" ]]; then
|
||||
echo
|
||||
# Ask for port configuration
|
||||
read -p "Frontend port [7655]: " frontend_port < /dev/tty
|
||||
frontend_port=${frontend_port:-7655}
|
||||
if [[ ! "$frontend_port" =~ ^[0-9]+$ ]] || [[ "$frontend_port" -lt 1 ]] || [[ "$frontend_port" -gt 65535 ]]; then
|
||||
print_error "Invalid port number. Using default port 7655."
|
||||
frontend_port=7655
|
||||
fi
|
||||
|
||||
echo
|
||||
# Try to get cluster-wide IDs, fall back to local
|
||||
local USED_IDS=""
|
||||
|
|
@ -261,6 +270,7 @@ create_lxc_container() {
|
|||
onboot=1
|
||||
firewall=1
|
||||
unprivileged=1
|
||||
frontend_port=7655
|
||||
fi
|
||||
|
||||
# Get available network bridges
|
||||
|
|
@ -481,8 +491,12 @@ EOF
|
|||
cleanup_on_error
|
||||
fi
|
||||
|
||||
# Run installation quietly (suppress verbose output)
|
||||
local install_output=$(pct exec $CTID -- bash /tmp/install.sh --in-container 2>&1)
|
||||
# Run installation quietly (suppress verbose output) with port configuration
|
||||
local install_cmd="bash /tmp/install.sh --in-container"
|
||||
if [[ "$frontend_port" != "7655" ]]; then
|
||||
install_cmd="FRONTEND_PORT=$frontend_port $install_cmd"
|
||||
fi
|
||||
local install_output=$(pct exec $CTID -- bash -c "$install_cmd" 2>&1)
|
||||
local install_status=$?
|
||||
|
||||
if [[ $install_status -ne 0 ]]; then
|
||||
|
|
@ -497,7 +511,7 @@ EOF
|
|||
echo
|
||||
print_success "Pulse installation complete!"
|
||||
echo
|
||||
echo " Web UI: http://${IP}:7655"
|
||||
echo " Web UI: http://${IP}:${frontend_port}"
|
||||
echo " Container: $CTID"
|
||||
echo
|
||||
echo " Commands:"
|
||||
|
|
@ -725,6 +739,16 @@ StandardOutput=journal
|
|||
StandardError=journal
|
||||
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
Environment="PULSE_DATA_DIR=$CONFIG_DIR"
|
||||
EOF
|
||||
|
||||
# Add port configuration if not default
|
||||
if [[ "$FRONTEND_PORT" != "7655" ]]; then
|
||||
cat >> /etc/systemd/system/$SERVICE_NAME.service << EOF
|
||||
Environment="FRONTEND_PORT=$FRONTEND_PORT"
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> /etc/systemd/system/$SERVICE_NAME.service << EOF
|
||||
|
||||
# Security hardening
|
||||
NoNewPrivileges=true
|
||||
|
|
@ -764,7 +788,7 @@ print_completion() {
|
|||
print_header
|
||||
print_success "Pulse installation completed!"
|
||||
echo
|
||||
echo -e "${GREEN}Access Pulse at:${NC} http://${IP}:7655"
|
||||
echo -e "${GREEN}Access Pulse at:${NC} http://${IP}:${FRONTEND_PORT}"
|
||||
echo
|
||||
echo -e "${YELLOW}Useful commands:${NC}"
|
||||
echo " systemctl status $SERVICE_NAME - Check service status"
|
||||
|
|
@ -792,6 +816,18 @@ main() {
|
|||
check_docker_environment
|
||||
check_pre_v4_installation
|
||||
|
||||
# Ask for port configuration (non-container installs)
|
||||
local FRONTEND_PORT=${FRONTEND_PORT:-}
|
||||
if [[ -z "$FRONTEND_PORT" ]]; then
|
||||
echo
|
||||
read -p "Frontend port [7655]: " FRONTEND_PORT < /dev/tty
|
||||
FRONTEND_PORT=${FRONTEND_PORT:-7655}
|
||||
if [[ ! "$FRONTEND_PORT" =~ ^[0-9]+$ ]] || [[ "$FRONTEND_PORT" -lt 1 ]] || [[ "$FRONTEND_PORT" -gt 65535 ]]; then
|
||||
print_error "Invalid port number. Using default port 7655."
|
||||
FRONTEND_PORT=7655
|
||||
fi
|
||||
fi
|
||||
|
||||
if check_existing_installation; then
|
||||
# Get the latest available version for comparison
|
||||
local AVAILABLE_VERSION=""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue