How to install Alephium with packages » History » Revision 12
Revision 11 (Olivier Bitsch, 09/14/2021 02:29 PM) → Revision 12/22 (Olivier Bitsch, 09/28/2021 07:36 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 [arch=amd64 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
~~~
> Note : this package has been build and tested with debian buster, but it should work on other releases.
### 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;
}
~~~
Reload nginx
systemctl reload nginx
You will be able to open Alephium doc with the following link
> `http://<ip of your server>/docs`
~~~
## Running with cpu-miner
Just use the command alph-cpu-miner to run the cpu based mining (not using java).