Project

General

Profile

How to install Alephium with packages » History » Version 13

Olivier Bitsch, 09/28/2021 07:37 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 11 Olivier Bitsch
echo "deb [arch=amd64 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 9 Olivier Bitsch
> Note : this package has been build and tested with debian buster, but it should work on other releases.
20
21 2 Olivier Bitsch
### Config location
22
23
You may adjust config into `/etc/alephium/user.conf`
24 5 Olivier Bitsch
25
### Proxy with Nginx
26
27
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.
28
29
> Warning : don't expose this API over the internet. This setup is probably not secure enough unless you protect your Nginx with a password.
30
31
Install Nginx package
32
33
    apt -y install nginx
34
35
Remove default website.
36
37
    rm /etc/nginx/sites-enabled/default
38
39
Add create new file `/etc/nginx/sites-enabled/alephium` with the following content.
40
41 6 Olivier Bitsch
~~~
42 5 Olivier Bitsch
server {
43
    server_name _;
44
    client_max_body_size 2M;
45
46
   location / {
47
	    proxy_set_header Host $host;
48
	    proxy_set_header X-Forwarded-Proto $scheme;
49
	    proxy_set_header X-Forwarded-Port $server_port;
50
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51
	    proxy_pass http://localhost:12973;
52
   }
53
54
    listen 80;
55 1 Olivier Bitsch
}
56 6 Olivier Bitsch
~~~
57
58
Reload nginx
59
60
    systemctl reload nginx
61 7 Olivier Bitsch
62
You will be able to open Alephium doc with the following link
63
64 8 Olivier Bitsch
> `http://<ip of your server>/docs`
65 12 Olivier Bitsch
66 1 Olivier Bitsch
## Running with cpu-miner
67 12 Olivier Bitsch
68 13 Olivier Bitsch
Just use the command `alph-cpu-miner` to run the cpu based mining (not using java).