How to install Alephium with packages » History » Version 5
  Olivier Bitsch, 09/10/2021 06:42 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 | server { | ||
| 40 | server_name _; | ||
| 41 | client_max_body_size 2M; | ||
| 42 | |||
| 43 |    location / { | ||
| 44 | proxy_set_header Host $host; | ||
| 45 | proxy_set_header X-Forwarded-Proto $scheme; | ||
| 46 | proxy_set_header X-Forwarded-Port $server_port; | ||
| 47 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| 48 | proxy_pass http://localhost:12973; | ||
| 49 | } | ||
| 50 | |||
| 51 | listen 80; | ||
| 52 | |||
| 53 | } |