Project

General

Profile

How to install Alephium with packages » History » Revision 5

Revision 4 (Olivier Bitsch, 09/09/2021 11:54 AM) → Revision 5/22 (Olivier Bitsch, 09/10/2021 06:42 AM)

# How to install Alephium with packages 

 Alephium can be installed and ran as service into minute with packages. 

 > Note : unless mainnet is ready, this package is running on testnet. 

 ~~~ 
 ### Add Debian/Ubuntu repository 
 echo "deb [trusted=yes] https://projects.iabsis.com/repository/alephium-pkg/debian buster main" \ 
   > /etc/apt/sources.list.d/alephium.list 

 ### Update package list 
 apt update 

 ### Install alephium 
 apt install alephium 
 ~~~ 

 ### Config location 

 You may adjust config into `/etc/alephium/user.conf` 

 ### Proxy with Nginx 

 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. 

 > Warning : don't expose this API over the internet. This setup is probably not secure enough unless you protect your Nginx with a password. 

 Install Nginx package 

     apt -y install nginx 

 Remove default website. 

     rm /etc/nginx/sites-enabled/default 

 Add create new file `/etc/nginx/sites-enabled/alephium` with the following content. 

 server { 
     server_name _; 
     client_max_body_size 2M; 

    location / { 
	     proxy_set_header Host $host; 
	     proxy_set_header X-Forwarded-Proto $scheme; 
	     proxy_set_header X-Forwarded-Port $server_port; 
	     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
	     proxy_pass http://localhost:12973; 
    } 

     listen 80; 

 }