Install r3v3rs3 as a systemd service with install.sh

Installing on a Linux Server

install.sh downloads the release binary, checks its sha256 digest, creates the admin account and runs r3v3rs3 as a systemd service. One command installs it, and the same command upgrades it later.

Before You Start

The script needs:

Step 1: Run the Script

$ curl -fsSL https://raw.githubusercontent.com/KilimcininKorOglu/r3v3rs3/main/install.sh | sudo bash

The script asks two questions:

  1. Admin WebUI address. The default is 127.0.0.1:46492, so the panel answers only on the server itself. Write 0.0.0.0:46492 only when a firewall or a VPN protects that port.
  2. Admin user name, and then the password. It asks again after a failed try, three times in all.

The output names every path:

r3v3rs3 v1.0.1 is running.

  WebUI:    http://127.0.0.1:46492/
  Binary:   /usr/local/bin/r3v3rs3
  Config:   /etc/r3v3rs3
  Logs:     /var/log/r3v3rs3 and journalctl -u r3v3rs3
  Service:  systemctl status|restart|stop r3v3rs3
  Add user: /usr/local/bin/r3v3rs3 add-user --config-dir /etc/r3v3rs3 <name>

Both options also work without a question, for an unattended install:

$ curl -fsSL https://raw.githubusercontent.com/KilimcininKorOglu/r3v3rs3/main/install.sh \
    | sudo bash -s -- --version 1.0.1 --webui 0.0.0.0:46492

A script that runs through a pipe without a terminal creates no account. It prints the command instead:

$ sudo r3v3rs3 add-user --config-dir /etc/r3v3rs3 admin

Step 2: Check the Service

$ systemctl is-enabled r3v3rs3
enabled
$ systemctl is-active r3v3rs3
active
$ curl -o /dev/null -w '%{http_code}\n' http://127.0.0.1:46492/
200

The script writes /etc/systemd/system/r3v3rs3.service:

[Service]
Type=simple
Environment=R3V3RS3_CONFIG_DIR=/etc/r3v3rs3
Environment=R3V3RS3_LOG_DIR=/var/log/r3v3rs3
Environment=R3V3RS3_WEBUI=127.0.0.1:46492
ExecStart=/usr/local/bin/r3v3rs3 start
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
LimitNOFILE=1048576

KillSignal=SIGINT matters: r3v3rs3 shuts down gracefully on SIGINT. LimitNOFILE=1048576 raises the file descriptor limit, because each connection needs one.

The service runs as root, so r3v3rs3 binds a port below 1024 without another setting.

Step 3: Open the Panel

The default address answers only on the server. Reach it through SSH instead of publishing the port:

$ ssh -L 46492:127.0.0.1:46492 user@your-server

Open http://localhost:46492/ and sign in with the account of Step 1. Getting Started continues with the first port and the first proxy.

Where the Files Are

PathContent
/usr/local/bin/r3v3rs3The binary.
/etc/r3v3rs3accounts.toml, proxies.toml, ports.toml, access_lists.toml, acme.toml, config.toml and the certificates. The directory has the mode 0700.
/var/log/r3v3rs3log.db, which holds the audit log. The directory has the mode 0750.

journalctl -u r3v3rs3 shows the server log. /etc/r3v3rs3/acme.toml holds the ACME account keys and the DNS provider credentials in plain text, so back up the whole directory and protect the backup.

Upgrade

Run the same command again:

$ curl -fsSL https://raw.githubusercontent.com/KilimcininKorOglu/r3v3rs3/main/install.sh | sudo bash

Pin a release with --version 1.0.1 when you upgrade a fleet in steps.

Remove

$ sudo systemctl disable --now r3v3rs3
$ sudo rm /etc/systemd/system/r3v3rs3.service /usr/local/bin/r3v3rs3
$ sudo systemctl daemon-reload

This leaves /etc/r3v3rs3 and /var/log/r3v3rs3. Delete them only when you keep no certificate and no account.

Other Install Methods

Next Steps