Installation
Quick Start
- Clone or download this project
- Build the server:
cargo build --release - Deploy using the included script:
./deploy.sh user@your-server.com
Requirements
- Let’s Encrypt certificates in
/etc/letsencrypt/live/(or use auto-ACME mode) - Document roots in
/var/www/{domain}/or common directory/var/www/html - Root privileges to bind to port 80 and 443 (you can use other ports but auto-ACME require port 80)
ACME Mode (Recommended)
-
Create document roots for your domains:
sudo mkdir -p /var/www/example.com echo "<h1>Hello from example.com!</h1>" | sudo tee /var/www/example.com/index.html -
Run the server with ACME certificate management:
# Email defaults to webmaster@$HOSTNAME (if hostname contains a dot) or webmaster@domain (shortest domain from reverse DNS) or webmaster@localhost # Staging defaults to false (production Let's Encrypt) # Run with domain list sudo ./target/release/easyp example.com another-domain.com -
For testing, use the staging environment:
export ACME_STAGING="true" sudo ./target/release/easyp example.com another-domain.com -
Customize the email address:
export ACME_EMAIL="admin@example.com" sudo ./target/release/easyp example.com another-domain.com
Legacy Mode (Let’s Encrypt Directory)
-
Ensure your Let’s Encrypt certificates are in place:
/etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem -
Create document roots for your domains:
sudo mkdir -p /var/www/example.com echo "<h1>Hello from example.com!</h1>" | sudo tee /var/www/example.com/index.html -
Run the server (requires root for port 443):
sudo ./target/release/easypOr use the systemd service (if deployed):
sudo systemctl start easyp sudo systemctl enable easyp # Start on boot -
Visit your domains:
- http://example.com (HTTP on port 80)
- https://example.com (HTTPS on port 443)
- http://another-domain.com
- https://another-domain.com
Automated Deployment
Use the included deploy.sh script for easy deployment:
./deploy.sh user@your-server.com
This script will:
- Build the release binary
- Copy it to the target server
- Install it to
/usr/local/bin/easyp - Create and enable a systemd service
- Set up proper security configurations
Manual Deployment
-
Build the binary:
cargo build --release -
Copy to target server:
scp target/release/easyp user@server:/usr/local/bin/ -
Set permissions:
ssh user@server "sudo chmod +x /usr/local/bin/easyp" -
Create systemd service (see
deploy.shfor the service file)
Leave a Comment