How to install Alephium with packages » History » Version 17
Olivier Bitsch, 10/22/2021 08:01 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 | 17 | Olivier Bitsch | ## Mining |
26 | |||
27 | Install the package according to your hardware |
||
28 | |||
29 | - CPU : `alephium-cpu` |
||
30 | - GPU (Nvidia) : `alephium-gpu` |
||
31 | |||
32 | Update the file `/etc/default/alephium-common` and change the `MINE_WITH` attribute. Finally, restart or start the service with `systemctl restart alephium-miner`. |
||
33 | |||
34 | 5 | Olivier Bitsch | ### Proxy with Nginx |
35 | |||
36 | 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. |
||
37 | |||
38 | > Warning : don't expose this API over the internet. This setup is probably not secure enough unless you protect your Nginx with a password. |
||
39 | |||
40 | Install Nginx package |
||
41 | |||
42 | apt -y install nginx |
||
43 | |||
44 | Remove default website. |
||
45 | |||
46 | rm /etc/nginx/sites-enabled/default |
||
47 | |||
48 | Add create new file `/etc/nginx/sites-enabled/alephium` with the following content. |
||
49 | |||
50 | 6 | Olivier Bitsch | ~~~ |
51 | 5 | Olivier Bitsch | server { |
52 | server_name _; |
||
53 | client_max_body_size 2M; |
||
54 | |||
55 | location / { |
||
56 | proxy_set_header Host $host; |
||
57 | proxy_set_header X-Forwarded-Proto $scheme; |
||
58 | proxy_set_header X-Forwarded-Port $server_port; |
||
59 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||
60 | proxy_pass http://localhost:12973; |
||
61 | } |
||
62 | |||
63 | listen 80; |
||
64 | 1 | Olivier Bitsch | } |
65 | 12 | Olivier Bitsch | ~~~ |
66 | 14 | Olivier Bitsch | |
67 | 1 | Olivier Bitsch | Reload nginx |
68 | 14 | Olivier Bitsch | |
69 | systemctl reload nginx |
||
70 | 15 | Olivier Bitsch | |
71 | You will be able to open Alephium doc with the following link |
||
72 | |||
73 | 16 | Olivier Bitsch | > `http://<ip of your server>/docs` |