Skip to content

Latest commit

 

History

History
90 lines (67 loc) · 5 KB

File metadata and controls

90 lines (67 loc) · 5 KB

INSTALL

Overview

Ultimately, I hope to see indielinks instances publicly available on the web. For now, however, it must be run locally. I’ve uploaded a pacman PKGBUILD to the AUR (Arch User Repository) here, and I’m hosting Debian binary packages at my personal site.

Nb the AUR package, due to this has to be built with the environment variable AWS_LC_SYS_NO_JITTER_ENTROPY=1. So, if you’re using yay for instance, you’d do:

AWS_LC_SYS_NO_JITTER_ENTROPY=1 yay -S indielinks-git

In either of these cases, the package only puts the files in their place. After the installation, you’ll need to hand-edit /etc/indielinks.toml to say where to reach ScyllaDB or DynamoDB, along with any required credentials, then run indielinks-post-install, which will create and/or update the data schema & start the server.

You have to decide whether to run indielinks as a systemd unit, or as an independent, System V-style daemon process. In the latter case, run indielinks-post-install with the --no-systemd flag, and use the indielinks-ctl script to control it. Either way, run indielinks-post-install --help to see the options you’ll need to provide (ScyllaDB/DynamoDB location, credentials & like that).

After the initial install, you’ll want to create your first user:

indic -A http://localhost:20676 -v add-user -u ${USERNAME} -p ${PASSWORD} -m ${EMAIL}

Local Installation Process

Otherwise, you’ll need to clone this git repository, build & install locally. Note that you can also run development builds right out of the build directory– see HACKING.org for instructions on that. Don’t treat this file as a checklist to be blindly copied: you’ll need to understand each step & modify it for your particular case.

Install the Rust Toolchain

If you don’t have it already:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
cargo install --locked trunk

Install ScyllaDB Using Your Distribution’s Package Manager

On Arch, I did the following:

yay -S scylla-bin
sudo scylla_io_setup
sudo scylla_cpuset_setup --smp 2
sudo scylla_memory_setup --memory 3G
sudo systemctl start scylla-server

Install cqlsh

cqlsh is, regrettably, implemented in Python:

mkdir ~/venvs && cd ~/venvs
python -m env cqlsh
source cqlsh/bin/activate
pip install scylla-cqlsh
deactivate

Install indielinks

Before installing, you’ll probably want to skim the file indielinks/local-indielinks.toml and adjust the install location, port numbers & like that. In particular, if you don’t happen to have an OTLP collector running locally, just omit the [otlp-export] section altogether.

Next, examine the file admin/local-install and be sure that it will install to the locations you want, consistent with the configuration in local-indielinks.toml. Then:

admin/local-install

to install indielinks under your home directory (i.e. in ~/bin, ~/share, and so on). Just as with the AUR & Debian packages, you’ll next need to run indielinks-post-install to configure the database & so forth. Running indielinks as a non-privileged user is a bit more verbose:

indielinks-post-install --verbose             \
                        --no-systemd          \
                        -s $SCYLLA            \
                        --user=$USER          \
                        --group=$GROUP        \
                        --state=$HOME/var/run \
                        --config=$HOME/etc/indielinks.toml

I haven’t setup a user systemd unit yet, so the only supported mode of operation when installing in this way is as an old-school SystemV daemon.

Optional: install the bookmarklet

indielinks now offers a bookmarklet: a browser bookmark, that when selected will open a form, pre-populated for the current page & when submitted will save the page to your indielinks. Just copy the code below, taking care to edit the indielinks location: in this example, indielinks is at “http://localhost:20679”, which is where I run a development version– your will differ:

javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('http://localhost:20679/bookmarklets/save?showtags=yes&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,scrollbars=yes,width=750,height=700'));