Skip to content
Mubelotix edited this page Jun 1, 2024 · 1 revision

Installing the daemon

On Unix, you can install the daemon with this one-liner:

curl -fsSL https://raw.githubusercontent.com/Mubelotix/admarus/master/install.sh | sh

You can also obtain admarusd from the release page or build it from source. In these cases, it is recommended to move it in /usr/local/bin.

# Place it next to ipfs
sudo mv admarusd /usr/local/bin/admarusd

Configuration

Port forwarding

Admarus listens for other nodes on TCP port 4002 (Kubo is on port 4001). To be able to contribute search results to the network, please open this port. This must be done both with your OS-provided firewall and on your Internet router. Look for instructions given by your particular OS and ISP. Hole-punching will be supported in the future.

Note: Failure to open this port will not prevent you from using the Admarus network.

If you manage to get your computer reachable from the outside, you need to tell the daemon about the public addresses it can be reached from. When running the admarusd binary, add the external-addrs option for each address.

# Replace IPV6_ADDR and IPV6_ADDR with the corresponding values
admarusd --external-addr=/ip4/IPV4_ADDR/tcp/4002 --external-addr=/ip6/IPV6_ADDR/tcp/4002

# If you have a domain name
admarusd --external-addr=/dns4/domain.tld/tcp/4002 --external-addr=/dns6/domain.tld/tcp/4002

Persistence

It is recommended to keep the daemon running in the background. This will contribute to the network by making the documents you pinned with Kubo available for search. Since Admarus is written in Rust and takes advantage of libp2p's asynchronous architecture, it uses extremely small resources when idle.

There are many ways to run the daemon but let's cover using systemd. If you are not using systemd, then you are probably smart enough to figure this out on your own.

# In /etc/systemd/system/admarusd.service

[Unit]
Description=Admarus Gateway daemon
After=network.target
StartLimitBurst=5
StartLimitIntervalSec=300

[Service]
Type=simple
User=admarusd
Environment=RUST_LOG=admarusd=debug,kamilata=warn
ExecStart=/usr/local/bin/admarusd
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target

The above service runs admarusd as the user admarusd. It's not required so you could just remove the line, but here is how to create this user if you want to make things right:

sudo useradd admarusd

Now, here is how to start and enable the service.

sudo systemctl daemon-reload
sudo systemctl start admarusd
sudo systemctl enable admarusd

Installing the WebUI

Installing the webui is entirely optional since an hosted version can be found at admarus.net both with HTTP and IPFS. Self-hosting a static version of the webui is unnecessary to regular users. The online version is easier to use and provides updates automatically. However, power-users might want to directly control what they run.

Unlike Kubo, the Admarus daemon doesn't provide a local webui out of the box. The webui folder needs to be hosted locally. If you compiled from source, you may find this folder at admarus/webui/dist.

Hosting using the default python server:

cd webui
python3 -m http.server 8083

Hosting using IPFS:

ipfs add -r webui

Next Steps

You should now be able to play with Admarus and play with the examples shown in the Getting Started page.

Clone this wiki locally