Linux Server Setup
Additionally, you can download a setup package to speed up deployment:
This includes:
- Directory structure
- Launch and update scripts
- Example Nginx configuration
In a Linux environment, Portweaver is deployed as:
- A standalone binary (
portweaver-server) - Running locally on
0.0.0.0:8080 - Behind nginx reverse proxy for HTTPS handling
This means that by default, it listens on all interfaces over HTTP.
Directory Structure
Section titled “Directory Structure”Recommended layout:
~/portweaver/├── launch.sh├── update.sh├── bin/│ └── portweaver-server├── scripts/│ └── fetch-artifact.shSystem Setup
Section titled “System Setup”Install Dependencies
Section titled “Install Dependencies”sudo apt update && sudo apt upgradesudo apt install nginx tmux htop nano curl jq unzipApplication Setup
Section titled “Application Setup”Create Application Directory
Section titled “Create Application Directory”mkdir -p ~/portweavercd ~/portweaverPlace Binary
Section titled “Place Binary”mv portweaver-server ~/portweaver/bin/chmod +x portweaver-serverNetworking & Hosting
Section titled “Networking & Hosting”Default Application Binding
Section titled “Default Application Binding”Portweaver runs on:
0.0.0.0:8080This is intended to be internal-only.
Nginx Reverse Proxy
Section titled “Nginx Reverse Proxy”Nginx is responsible for:
- Serving HTTPS (
:443) - Redirecting HTTP (
:80 → 443) - Proxying traffic →
localhost:8080
Ensure nginx site is configured:
Section titled “Ensure nginx site is configured:”/etc/nginx/sites-enabled/portweaver.confValidate & restart
Section titled “Validate & restart”sudo nginx -tsudo systemctl restart nginxFirewall Rules
Section titled “Firewall Rules”Ensure:
- Allow
80/tcp - Allow
443/tcp - Block
8080/tcp
Example (UFW):
sudo ufw allow 80sudo ufw allow 443sudo ufw deny 8080sudo ufw enableRunning Portweaver
Section titled “Running Portweaver”Direct Execution
Section titled “Direct Execution”cd ~/portweaverchmod +x launch.sh && ./launch.shUpdate Process
Section titled “Update Process”Requirements
Section titled “Requirements”GitHub Personal Access Token must be set:
export PAT=your_token_hereFetch and Prepare Latest Build
Section titled “Fetch and Prepare Latest Build”chmod +x update.sh && ./update.shOptional: Auto-start with systemd
Section titled “Optional: Auto-start with systemd”sudo nano /etc/systemd/system/portweaver.service[Unit]Description=Portweaver ServerAfter=network.target
[Service]Type=simpleUser=<username>WorkingDirectory=/home/<username>/portweaverExecStart=/home/<username>/portweaver/launch.shRestart=always
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reexecsudo systemctl daemon-reloadsudo systemctl enable portweaversudo systemctl start portweaverDebugging & Monitoring
Section titled “Debugging & Monitoring”systemctl status nginxsudo nginx -ttmux attach portweaver