Skip to content

Install from release

Release tarballs are the recommended way to install Userli on a server. They contain the application, all PHP dependencies and the built frontend assets.

The steps below assume Debian/Ubuntu, a system user userli and the installation directory /var/www/userli. Adjust them to your system.

Tip

To automate these steps, use our Ansible role.

1. Download

Get the latest release. Each release provides userli-x.y.z.tar.gz, SHA-256/SHA-512 checksums and a GPG signature (.asc).

cd /tmp
wget https://github.com/systemli/userli/releases/download/x.y.z/userli-x.y.z.tar.gz
wget https://github.com/systemli/userli/releases/download/x.y.z/userli-x.y.z.tar.gz.sha256
wget https://github.com/systemli/userli/releases/download/x.y.z/userli-x.y.z.tar.gz.sha256.asc

# Verify the signature of the hashsum file
gpg --verify userli-x.y.z.tar.gz.sha256.asc userli-x.y.z.tar.gz.sha256

# Verify the hash of the release tarball against the hashsum file
sha256sum -c userli-x.y.z.tar.gz.sha256

Tip

Check the exact file names on the release page. To verify the signature, import the release signing key first.

Unpack it:

sudo mkdir -p /var/www/userli
sudo tar -xzf userli-x.y.z.tar.gz -C /var/www/userli --strip-components=1
sudo chown -R userli:userli /var/www/userli

2. Create the database

Create a database and a database user:

sudo mysql -e 'CREATE DATABASE userli CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci'
sudo mysql -e "CREATE USER 'userli'@'localhost' IDENTIFIED BY '<password>'"
sudo mysql -e "GRANT ALL PRIVILEGES ON userli.* TO 'userli'@'localhost'"

3. Configure

Create /var/www/userli/.env.local with at least these values. See Configuration for all options.

APP_ENV=prod
APP_SECRET=<random string, e.g. from: openssl rand -hex 32>
DATABASE_URL="mysql://userli:<password>@127.0.0.1:3306/userli?serverVersion=mariadb-10.11.0"
MAILER_DSN=smtp://localhost:25
DEFAULT_URI=https://users.example.org

4. Create the schema

cd /var/www/userli
sudo -u userli bin/console doctrine:migrations:migrate --no-interaction
sudo -u userli bin/console cache:warmup

5. Next steps

  1. Configure the webserver with the document root /var/www/userli/public.
  2. Start the background services.
  3. Run the initial setup.