- Log into AWS console
- EC2 > launch instance
- Choose a name
- Select Ubuntu 22.04 operating system
- Choose instance type that is the minimum required for the project
- Select key pair, or create one
- Allow SSH traffic from anywhere
- Select the amount of EBS storage required
- Launch instance
- Got to instance details > security > security groups > inbound > add rule
- Add rule for custom TCP, 8000-9000, source anywhere. HTTP, 80, anywhere. HTTPS, 443, anywhere
- Copy the IP address
- Log in via ssh:
ssh -i <key> ubuntu@<ip>
- Run startup script to install dependencies
- Run rstudio docker image:
docker run --name rstudio --rm -e PASSWORD=password -d -p 8889:8787 timoast/rstudio
- Open
<ip>:8889
, enter usernameubuntu
and passworkpassword
Useful links:
https://ec2-tutorials.readthedocs.io/en/latest/index.html
https://davetang.org/muse/2022/12/07/running-rstudio-server-on-amazon-ec2/
https://davetang.org/muse/2019/12/23/uploading-to-amazon-s3/
https://github.com/rocker-org/rocker-versioned2/blob/master/dockerfiles/rstudio_devel.Dockerfile
https://rocker-project.org/images/versioned/rstudio.html