Setting up Angle correctly from the start saves hours of troubleshooting later. This guide walks you through each step of the installation and configuration process, from verifying prerequisites through final testing. Whether you're deploying Angle for the first time or setting up a new instance, following these steps ensures a stable, working configuration.
Prerequisites and System Requirements
Before beginning the Angle setup, verify your environment meets the necessary requirements. Most modern Linux distributions support Angle without issue, but confirming compatibility prevents problems during installation.
Check your system architecture:
uname -m
You'll need root or sudo access throughout this process. Verify your privileges:
sudo -v
Ensure your package manager is current:
# Debian/Ubuntu
sudo apt update && sudo apt upgrade -y
# RHEL/CentOS/AlmaLinux
sudo dnf update -y
Confirm you have adequate disk space. A fresh Angle installation requires minimal space, but allow room for logs and data growth:
df -h
Reserve at least 2GB free in your target installation directory.
Step 1: Install Required Dependencies
Angle relies on several system libraries and tools. Install the dependency stack before proceeding with Angle itself.
For Debian-based systems:
sudo apt install -y build-essential curl wget git \
libssl-dev pkg-config ca-certificates
For RHEL-based systems:
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y curl wget git openssl-devel \
pkg-config ca-certificates
Verify OpenSSL is properly installed:
openssl version
You should see version output confirming the installation.
Step 2: Download and Install Angle
With dependencies in place, download the Angle binary or source package. The installation method depends on whether you're using a pre-built binary or building from source.
Binary Installation
For production environments, binary installation is the fastest path:
cd /tmp
wget https://example.com/angle/latest/angle-linux-x86_64.tar.gz
tar -xzf angle-linux-x86_64.tar.gz
sudo mv angle /usr/local/bin/
sudo chmod +x /usr/local/bin/angle
Verify the installation:
angle --version
Source Installation
Building from source gives you control over compilation flags and optimizations:
cd /opt
sudo git clone https://github.com/example/angle.git
cd angle
sudo make build
sudo make install
The compiled binary will be placed in /usr/local/bin by default.
Step 3: Create Configuration Directory
Angle stores its configuration in a dedicated directory structure. Create these directories with appropriate permissions:
sudo mkdir -p /etc/angle
sudo mkdir -p /var/log/angle
sudo mkdir -p /var/lib/angle
Create a dedicated system user for running Angle:
sudo useradd -r -s /bin/false -d /var/lib/angle angle
Set ownership:
sudo chown -R angle:angle /etc/angle /var/log/angle /var/lib/angle
Step 4: Configure Angle
Create the main configuration file. Angle typically uses TOML, YAML, or JSON format depending on your version. This example uses TOML:
sudo nano /etc/angle/config.toml
Basic configuration template:
[server]
listen_address = "0.0.0.0"
listen_port = 8080
worker_threads = 4
[logging]
level = "info"
output = "/var/log/angle/angle.log"
rotation = "daily"
[security]
enable_tls = false
tls_cert = ""
tls_key = ""
[performance]
max_connections = 1000
timeout_seconds = 30
Adjust worker_threads based on your CPU core count. A good starting point is one thread per core.
For TLS-enabled setups, generate or obtain certificates and update the security section:
[security]
enable_tls = true
tls_cert = "/etc/angle/certs/server.crt"
tls_key = "/etc/angle/certs/server.key"
Save and close the file.
Step 5: Validate Configuration
Before starting Angle, validate your configuration syntax:
angle config validate /etc/angle/config.toml
Fix any reported errors before proceeding. Common issues include:
- Missing required fields
- Invalid port numbers
- Incorrect file paths
- TOML syntax errors (missing quotes, brackets)
Step 6: Create Systemd Service
For production deployments, run Angle as a systemd service. Create the service unit file:
sudo nano /etc/systemd/system/angle.service
Service definition:
[Unit]
Description=Angle Service
After=network.target
[Service]
Type=simple
User=angle
Group=angle
ExecStart=/usr/local/bin/angle start --config /etc/angle/config.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/log/angle /var/lib/angle
[Install]
WantedBy=multi-user.target
Reload systemd to recognize the new service:
sudo systemctl daemon-reload
Step 7: Start and Enable Angle
Start the Angle service:
sudo systemctl start angle
Check the service status:
sudo systemctl status angle
You should see "active (running)" in green. If the service fails, check logs:
sudo journalctl -u angle -n 50 --no-pager
Enable Angle to start automatically on boot:
sudo systemctl enable angle
Step 8: Configure Firewall Rules
Open the necessary ports in your firewall. For the default HTTP port:
# UFW (Ubuntu/Debian)
sudo ufw allow 8080/tcp
sudo ufw reload
# firewalld (RHEL/CentOS)
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
If using TLS on port 443:
sudo ufw allow 443/tcp
# or
sudo firewall-cmd --permanent --add-port=443/tcp
sudo firewall-cmd --reload
Step 9: Test the Installation
Verify Angle is listening on the configured port:
sudo ss -tlnp | grep angle
You should see output showing Angle listening on your configured port.
Test connectivity from localhost:
curl http://localhost:8080/health
For TLS-enabled setups:
curl -k https://localhost:443/health
A successful response confirms Angle is running and responding to requests.
Test from a remote machine:
curl http://your-server-ip:8080/health
Step 10: Configure Monitoring and Logging
Set up log rotation to prevent disk space issues:
sudo nano /etc/logrotate.d/angle
Logrotate configuration:
/var/log/angle/*.log {
daily
rotate 14
compress
delaycompress
notifempty
create 0640 angle angle
sharedscripts
postrotate
systemctl reload angle > /dev/null 2>&1 || true
endscript
}
Test the logrotate configuration:
sudo logrotate -d /etc/logrotate.d/angle
Monitor real-time logs:
sudo tail -f /var/log/angle/angle.log
Step 11: Set Up Reverse Proxy (Optional)
For production deployments, place Angle behind Nginx or Apache. This example uses Nginx:
sudo nano /etc/nginx/sites-available/angle
Nginx configuration:
server {
listen 80;
server_name angle.example.com;
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the site:
sudo ln -s /etc/nginx/sites-available/angle /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Troubleshooting Common Issues
If Angle fails to start, check these common problems:
Port already in use: Another service is bound to your configured port. Find the conflicting process:
sudo lsof -i :8080
Permission denied errors: Verify file ownership and the Angle user has read access:
sudo ls -la /etc/angle/
sudo ls -la /var/log/angle/
Configuration errors: Run validation again and check syntax carefully:
angle config validate /etc/angle/config.toml
Service crashes immediately: Check journalctl for detailed error messages:
sudo journalctl -u angle -b
Performance Tuning
Once Angle is running, optimize for your workload:
Adjust worker threads: Match your CPU core count or slightly exceed it for I/O-bound workloads.
Tune connection limits: Monitor active connections and adjust max_connections in your config.
Enable compression: If your Angle version supports it, enable response compression to reduce bandwidth.
Monitor resource usage:
sudo systemctl status angle
top -p $(pgrep angle)
Conclusion
You now have a working Angle installation configured for your environment. The setup includes proper systemd integration, logging, firewall rules, and optional reverse proxy configuration. Monitor your logs during the first few days to catch any issues early. As your usage grows, revisit the performance tuning section to optimize for your specific workload. Regular updates and log rotation will keep your Angle instance running smoothly over time.
