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