Sometimes I need to have a development version of a Sakai running with a real IP address on the real Internet. For example to run the IMS Learning Tools Interoperability certification I need to have my Sakai accept web service callbacks form the IMS server.
One way to do it is to run an Amazon EC2 instance but this is a pain. I need to login a bunch of times to get all the windows I want and I cannot use any desktop apps. And I need a big EC2 instance and need to install a bunch of stuff – yada yada – and I have all that stuff already on my desktop.
So here is the procedure.
First make the smallest possible Amazon EC2 Instance. Make sure to open port 8080 on your instance. Log in to the instance and edit the sshd configuration file:
sudo vi /etc/ssh/sshd_config
Add or uncomment a line that says this:
Then restart sshd
sudo /etc/init.d/ssh restart
Then log out of the server and set up your SSH tunnel:
ssh -i .ssh/zzz.pem -R 8080:localhost:8080 firstname.lastname@example.org
You can double check that your server is accepting connections from the outside world:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
In Sakai, you add the following to your sakai.properties:
Once your Sakai is up you should be able to navigate to
And viola – everything is running on your laptop but the server is on the internet with a real address.
Update: What you need to do for DigitalOcean
Code to restart SSHD:
service ssh restart
ssh email@example.com -R 8080:localhost:8080