Project

General

Profile

How to install Alephium with packages » History » Version 8

Olivier Bitsch, 09/10/2021 06:43 AM

1 1 Olivier Bitsch
# How to install Alephium with packages
2
3
Alephium can be installed and ran as service into minute with packages.
4
5
> Note : unless mainnet is ready, this package is running on testnet.
6
7
~~~
8
### Add Debian/Ubuntu repository
9 4 Olivier Bitsch
echo "deb [trusted=yes] https://projects.iabsis.com/repository/alephium-pkg/debian buster main" \
10 1 Olivier Bitsch
  > /etc/apt/sources.list.d/alephium.list
11
12
### Update package list
13
apt update
14
15
### Install alephium
16
apt install alephium
17
~~~
18 2 Olivier Bitsch
19
### Config location
20
21
You may adjust config into `/etc/alephium/user.conf`
22 5 Olivier Bitsch
23
### Proxy with Nginx
24
25
If you need to reach remotely the API, you can use Nginx as relay. This way, Nginx can add the missing TLS layer to encrypt requests.
26
27
> Warning : don't expose this API over the internet. This setup is probably not secure enough unless you protect your Nginx with a password.
28
29
Install Nginx package
30
31
    apt -y install nginx
32
33
Remove default website.
34
35
    rm /etc/nginx/sites-enabled/default
36
37
Add create new file `/etc/nginx/sites-enabled/alephium` with the following content.
38
39 6 Olivier Bitsch
~~~
40 5 Olivier Bitsch
server {
41
    server_name _;
42
    client_max_body_size 2M;
43
44
   location / {
45
	    proxy_set_header Host $host;
46
	    proxy_set_header X-Forwarded-Proto $scheme;
47
	    proxy_set_header X-Forwarded-Port $server_port;
48
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
49
	    proxy_pass http://localhost:12973;
50
   }
51
52
    listen 80;
53 1 Olivier Bitsch
}
54 6 Olivier Bitsch
~~~
55
56
Reload nginx
57
58
    systemctl reload nginx
59 7 Olivier Bitsch
60
You will be able to open Alephium doc with the following link
61
62 8 Olivier Bitsch
> `http://<ip of your server>/docs`