Installation
Install Nylon in multiple ways depending on your needs.
Quick Install (Linux)
The fastest way to install Nylon on Linux:
curl -fsSL https://nylon.sh/install | bashThis script will:
- Detect your OS and architecture (Linux x86_64/aarch64)
- Detect libc variant (glibc/musl)
- Download the latest release binary
- Verify checksums
- Install to
/usr/local/bin/nylon(or~/.local/bin/nylonif no sudo)
Supported Platforms
- Linux: x86_64 and aarch64
- Libc: GNU libc and musl
- macOS: Not yet available (build from source)
Installation Locations
The installer will install to:
/usr/local/bin/nylon- if you have write permission or use sudo~/.local/bin/nylon- if no write permission to system directories
Verify Installation
nylon --versionFrom Source
Build Nylon from source for maximum compatibility or development:
Prerequisites
- Rust: 1.70 or later (install)
- Git: To clone the repository
Build Steps
# Clone the repository
git clone https://github.com/AssetsArt/nylon.git
cd nylon
# Build release binary
cargo build --release
# Binary will be at target/release/nylon
./target/release/nylon --version
# Install to system (optional)
sudo cp target/release/nylon /usr/local/bin/Build Options
Optimized build (faster binary):
RUSTFLAGS="-C target-cpu=native" cargo build --releaseSmaller binary (strip symbols):
cargo build --release
strip target/release/nylonDocker
Run Nylon in a container:
# Pull image
docker pull ghcr.io/assetsart/nylon:latest
# Run with config
docker run -d \
--name nylon \
-p 80:8080 \
-p 443:8443 \
-v $(pwd)/config.yaml:/etc/nylon/config.yaml \
-v $(pwd)/config:/etc/nylon/config \
ghcr.io/assetsart/nylon:latestDocker Compose
Create docker-compose.yml:
version: '3.8'
services:
nylon:
image: ghcr.io/assetsart/nylon:latest
ports:
- "80:8080"
- "443:8443"
- "6192:6192" # metrics
volumes:
- ./config.yaml:/etc/nylon/config.yaml
- ./config:/etc/nylon/config
- ./acme:/etc/nylon/acme
restart: unless-stoppedRun it:
docker-compose up -dSystem Service (Linux)
Install Nylon as a systemd service with automatic configuration:
Install Service
# Install service and create default configs
sudo nylon service installThis creates:
/etc/nylon/config.yaml- Runtime configuration/etc/nylon/config/base.yaml- Proxy configuration/etc/nylon/static/index.html- Welcome page/etc/nylon/acme/- Certificate directory/etc/systemd/system/nylon.service- Systemd unit
Service Management
# Start service
sudo nylon service start
# Check status
sudo nylon service status
# Stop service
sudo nylon service stop
# Restart service
sudo nylon service restart
# Reload config (zero downtime)
sudo nylon service reload
# Uninstall service
sudo nylon service uninstallVerify Service
# Check status
sudo systemctl status nylon
# View logs
sudo journalctl -u nylon -f
# Test endpoint
curl http://localhost:8088Verify Installation
After installation, verify Nylon is working:
# Check version
nylon --version
# Display help
nylon --help
# Test configuration
nylon run -c config.yamlGo SDK for Plugin Development
If you want to develop Go plugins, install the SDK:
# Add to your Go project
go get github.com/AssetsArt/nylon/sdk/go/sdkCreate plugin.go:
package main
import "C"
import sdk "github.com/AssetsArt/nylon/sdk/go/sdk"
func main() {}
func init() {
plugin := sdk.NewNylonPlugin()
// Your plugin code here
}Build plugin:
go build -buildmode=c-shared -o myplugin.soTroubleshooting
Linux: Binary not in PATH
If installed to ~/.local/bin, add to your shell profile:
Bash (~/.bashrc):
export PATH="$PATH:$HOME/.local/bin"Zsh (~/.zshrc):
export PATH="$PATH:$HOME/.local/bin"Then reload:
source ~/.bashrc # or ~/.zshrcPermission Denied
If you get permission errors:
# Install to user directory
curl -fsSL https://nylon.sh/install | bash
# Or use sudo for system-wide install
curl -fsSL https://nylon.sh/install | sudo bashmacOS: Build from Source
macOS binaries are not available yet. Build from source:
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build
git clone https://github.com/AssetsArt/nylon.git
cd nylon
cargo build --release
# Install
sudo cp target/release/nylon /usr/local/bin/Checksum Verification Failed
If checksum verification fails, try:
# Download manually
VERSION=$(curl -s https://api.github.com/repos/AssetsArt/nylon/releases/latest | grep tag_name | cut -d '"' -f 4)
curl -LO "https://github.com/AssetsArt/nylon/releases/download/${VERSION}/nylon-x86_64-linux-gnu"
# Verify checksum
curl -LO "https://github.com/AssetsArt/nylon/releases/download/${VERSION}/linux-checksums.txt"
shasum -a 256 -c linux-checksums.txt
# Install
chmod +x nylon-x86_64-linux-gnu
sudo mv nylon-x86_64-linux-gnu /usr/local/bin/nylonUpgrade
Using Install Script
# Re-run install script to get latest version
curl -fsSL https://nylon.sh/install | bashManual Upgrade
# Build latest from source
cd nylon
git pull origin main
cargo build --release
sudo cp target/release/nylon /usr/local/bin/
# Restart service if installed
sudo nylon service restartUninstall
Remove Binary
# System-wide
sudo rm /usr/local/bin/nylon
# User install
rm ~/.local/bin/nylonRemove Service
# Uninstall systemd service
sudo nylon service uninstall
# Remove configs (optional)
sudo rm -rf /etc/nylonDocker
# Stop and remove container
docker stop nylon
docker rm nylon
# Remove image
docker rmi ghcr.io/assetsart/nylon:latestNext Steps
- Quick Start - Get started with Nylon
- Configuration - Configure Nylon
- Plugin Development - Extend with plugins