-
Notifications
You must be signed in to change notification settings - Fork 1
Set up Ikar with basic auth
⚠️ Please note that Ikar is a tool for testing. It is not recommended to be used as a tool for managing your wallets!
This step-by-step describes how to set up basic authentication to the Ikar app on nginx.
⚠️ It is not really recommended because whole world will have access to your cardano-wallet without any sort of authentication...
In any case, it is just as simple as:
docker pull piotrstachyra/icarus
docker run -d --network host --rm piotrstachyra/icarus
Immediately you should have Ikar available on http://your-ip:4444/. 🎉
Ok, Ikar does not have it's own authentication mechanism but it is extremely easy to set up using nginx and apache2-utils
(Debian, Ubuntu) or httpd-tools
(RHEL/CentOS/Oracle Linux).
To install nginx
and apache2-utils
.
sudo apt-get update
sudo apt-get install nginx
sudo apt-get install apache2-utils
To add some user credentials do:
For the first user:
sudo htpasswd -c /etc/nginx/htcontrol user1
For any subsequent user:
sudo htpasswd /etc/nginx/htcontrol user2
Edit nginx.conf
:
nginx
sudo nano /etc/nginx/nginx.conf
Comment this line like this:
# include /etc/nginx/sites-enabled/*;
Add this into http
secion:
server {
location / {
proxy_pass http://localhost:4444/;
auth_basic "Ikar";
auth_basic_user_file htcontrol;
}
}
Reload nginx config:
sudo nginx -s reload
ℹ️ Ikar likes to fly high that is why it binds to
0.0.0.0
by default. We will be serving it via nginx so we don't want it to be available like that, and that is why we tell him to bind to localhost viaICARUS_BIND_ADDR=localhost
.
In any case, it's just as simple as:
docker pull piotrstachyra/icarus
docker run -d -e ICARUS_BIND_ADDR=localhost --network host --rm piotrstachyra/icarus
🎉
There you go! Now your Icarus should be available under http://your-ip/, but before you can use it, you will be first prompted to authenticate.
👇