Setting up a new user
The admins of the hosting create your user and give you access to the projects you work on. This page shows how to finish the setup on your side: two-factor authentication, access keys and the VPN.
What you get from the admins
- The sign-in URL of the AWS account, your user name and a password. You use the AWS Console only to set up two-factor authentication and your access keys.
- Your VPN profile, a file named <user>.<cluster>.ovpn. One profile works for one cluster.
- Your role in each project: developer or lead developer. See Roles & Permissions for what each role can do.
1. Set up two-factor authentication
- Sign in to the AWS Console with the URL and the credentials from the admins. Change the password when AWS asks you to.
- Open your security credentials and click Assign MFA device in the Multi-factor authentication (MFA) section.
- Choose Authenticator app and follow the steps of AWS.
Hosty CLI asks for a one-time code from your authenticator app, so choose an app, not a passkey or a security key. If you add more than one device, Hosty CLI uses the first one in the list.
2. Create access keys
- On the same page, go to the Access keys section and click Create access key.
- Choose Other as the use case and click Next.
- Add a description if you like, and click Create access key.
- Copy the Access key and the Secret access key. AWS shows the secret key only once.
3. Save the access keys
Hosty CLI reads your access keys from the profile hosty.user in ~/.aws/credentials. Create the folder and the file if you don't have them yet, and add the profile:
[hosty.user]
aws_access_key_id = <your access key>
aws_secret_access_key = <your secret access key>The folder doesn't have to be ~/.aws. It can be anywhere, as long as you share it with the container of Hosty CLI (see Setting up Hosty CLI).
hosty auth later adds a second profile, hosty.mfa, to the same file. It holds a session that lasts 12 hours. Don't edit it by hand.
4. Set up the VPN
The clusters of Hosty are usually reachable only through the VPN, so Hosty CLI needs it for every command that works with the cluster: logs, shell, deployments and so on.
- Install an OpenVPN client, i.e. OpenVPN Connect or the AWS VPN Client.
- Import your .ovpn file. In OpenVPN Connect, drag the file into the window and click Connect.
The VPN doesn't change your public IP address and doesn't route the rest of your traffic: it only connects you to the private network of the cluster. A VPN session lasts up to 12 hours, then you connect again.
Next steps
- Set up Hosty CLI in your project.
- Keep your password, authenticator app and access keys safe. If you lose any of them, tell the admins straight away.