Quick start: Lasso on Debian

LaiRu is a Rust interpreter for running Lasso on current systems. Debian 13 (Trixie) on x86-64 is the only platform on which this preview build has been tested.

Experimental software. LaiRu is not production-safe or a complete Lasso 9 replacement. Start with disposable development copies and keep the original runtime available for comparison.

1. Download and install the Debian preview

1sudo apt update2sudo apt install -y ca-certificates curl libicu763curl -fLO https://lairu.org/downloads/lairu-0.1-debian13-x86_64.tar.gz4tar -xzf lairu-0.1-debian13-x86_64.tar.gz5sudo install -m 0755 lairu-0.1-debian13-x86_64/lairu /usr/local/bin/lairu6sudo install -m 0755 lairu-0.1-debian13-x86_64/lairu-fpm /usr/local/bin/lairu-fpm7lairu --version

2. Render a Lasso page

Create hello.lasso:

1[local(name) = 'Debian']2<!doctype html>3<h1>Hello from Lasso on [#name]</h1>
1lairu render hello.lasso

3. Prepare the site and FPM configuration

1sudo useradd --system --home /var/lib/lairu --shell /usr/sbin/nologin lairu2sudo install -d -o lairu -g lairu /srv/my-lasso-site /var/lib/lairu/my-site/sessions3sudo install -d -m 0755 /etc/lairu4sudo install -o lairu -g lairu -m 0644 hello.lasso /srv/my-lasso-site/index.lasso5sudoedit /etc/lairu/my-site.ini
1[paths]2document_root=/srv/my-lasso-site3session_dir=/var/lib/lairu/my-site/sessions4socket_dir=/run/lairu56[lairu-fpm]7unix_socket=/run/lairu/my-site.sock8max_children=49max_inflight_requests=3210worker_stack_bytes=167772161112[sessions]13store=file14dir=/var/lib/lairu/my-site/sessions

4. Install and enable the systemd service

Save this as /etc/systemd/system/lairu-my-site.service:

1[Unit]2Description=LaiRu FastCGI service for my Lasso site3After=network-online.target4Wants=network-online.target56[Service]7Type=simple8User=lairu9Group=lairu10RuntimeDirectory=lairu11RuntimeDirectoryMode=075512ExecStart=/usr/local/bin/lairu-fpm --config /etc/lairu/my-site.ini13Restart=on-failure14RestartSec=215NoNewPrivileges=true16PrivateTmp=true17ProtectSystem=strict18ProtectHome=true19ReadWritePaths=/var/lib/lairu/my-site /run/lairu2021[Install]22WantedBy=multi-user.target
1sudo systemctl daemon-reload2sudo systemctl enable --now lairu-my-site3sudo systemctl status lairu-my-site

5. nginx example

Install nginx, save this as /etc/nginx/sites-available/my-lasso-site, then enable it:

1server {2    listen 80;3    server_name example.com;4    root /srv/my-lasso-site;56    location /assets/ {7        try_files $uri =404;8    }910    location / {11        include fastcgi_params;12        fastcgi_param SCRIPT_FILENAME $document_root/index.lasso;13        fastcgi_param SCRIPT_NAME /index.lasso;14        fastcgi_param DOCUMENT_ROOT $document_root;15        fastcgi_param PATH_INFO $uri;16        fastcgi_param REQUEST_URI $request_uri;17        fastcgi_pass unix:/run/lairu/my-site.sock;18    }19}
1sudo apt install -y nginx2sudo ln -s /etc/nginx/sites-available/my-lasso-site /etc/nginx/sites-enabled/my-lasso-site3sudo nginx -t4sudo systemctl reload nginx

6. Apache example

As an alternative to nginx, save this as /etc/apache2/sites-available/my-lasso-site.conf:

1<VirtualHost *:80>2    ServerName example.com3    DocumentRoot /srv/my-lasso-site4    DirectoryIndex index.lasso56    <Directory /srv/my-lasso-site>7        Require all granted8        AllowOverride None9        FallbackResource /index.lasso10    </Directory>1112    <FilesMatch "\.(lasso|lasso9|lp)$">13        SetHandler "proxy:unix:/run/lairu/my-site.sock|fcgi://localhost/"14    </FilesMatch>15</VirtualHost>
1sudo apt install -y apache22sudo a2enmod proxy proxy_fcgi3sudo a2ensite my-lasso-site4sudo apache2ctl configtest5sudo systemctl reload apache2

Next steps

Continue with the LaiRu guide and check current compatibility before migrating an application. Add TLS, logging, backups, monitoring, and host-specific permissions before exposing a service.