CodeTogether On-Premises Installation Guide

An On-Premises version of CodeTogether is available for Enterprise customers. This guide provides the key steps required to pull down and configure the CodeTogether On-Premises container. The container provides a full set of collaboration services, including tailored client plugins for the host IDEs. Due to security requirements, all communication in CodeTogether is required to be done via SSL and there are two ways to do so. One involves running with SSL directly serviced from inside the container and the other is using Nginx or Apache outside of the container.

Should you need assistance following this installation guide, contact your Genuitec Sales representative or email support@genuitec.com

1. Download Docker

If not already installed, install Docker on the destination system from here.

2. Log In to Genuitec’s Docker Registry

Using your credentials provided by the Genuitec Sales team, log in to the Genuitec Docker Registry which is where you will receive the Docker image. Replace <userid> with your own login for the registry.

# docker login -u <userid> hub.edge.codetogether.com
Password:
Login Succeeded

3. Pull the CodeTogether Image

After logging in, now it is required to pull the latest version of the CodeTogether image.

# docker pull hub.edge.codetogether.com/latest/codetogether
Using default tag: latest
latest: Pulling from latest/codetogether
(snip): Pull complete
Digest: sha256:(snip)
Status: Downloaded newer image for hub.edge.codetogether.com/latest/codetogether:latest
hub.edge.codetogether.com/latest/codetogether:latest

4. Verify the Image is Available

Now that the image has been retrieved, verify that the image is available.

# docker image ls
REPOSITORY                                     TAG    IMAGE ID  CREATED
hub.edge.codetogether.com/latest/codetogether  latest (snip)    2 minutes ago

5. Setup SSL Settings

As mentioned in the introduction, using CodeTogether requires secure HTTPS connections. This can be done either by configuring a reverse proxy outside of the container, or enabling SSL inside the container itself. Skip this step if you will be using an SSL reverse proxy configured on your Docker host. Instead, enable SSL on the reverse proxy server of your choice ensuring that it is configured to support WebSockets.

To enable SSL, first create an ssl-settings.conf file containing the names of the certificate files you will be using. In addition, place the yourcert.com.crt and yourcert.com.key files next to this configuration file.

Note: An SSL certificate from a valid certificate authority (CA) is required. Certificates from Let’s Encrypt will not work.

# enable SSL
listen 443 ssl;
# add your certificates
ssl_certificate /etc/nginx/ssl/yourcert.com.crt;
ssl_certificate_key /etc/nginx/ssl/yourcert.com.key;

6. Create the Dockerfile with License Details

Create the Dockerfile file that will be used for this CodeTogether On-Premises deployment. Note that the CT_SERVER_URL must contain the HTTPS version of this service as CodeTogether will not run over HTTP.

Skip the items in RED if you are not using SSL inside the container.

The items in BLUE will be given to you by your Genuitec Sales representative and must be entered exactly as they are supplied with the identical punctuation and spacing.

FROM hub.edge.codetogether.com/latest/codetogether
# Use 80 if exposed via reverse proxy on host
EXPOSE 80
# Uncomment 443 if exposing using integrated SSL inside the container
#EXPOSE 80 443

# Include this section if using SSL from the container
#RUN mkdir -p /etc/nginx/ssl
#COPY yourcert.com.crt /etc/nginx/ssl
#COPY yourcert.com.key /etc/nginx/ssl
#COPY ssl-settings.conf /etc/nginx/includes

ENV CT_LICENSEE "Your name"
ENV CT_MAXCONNECTIONS 250
ENV CT_EXPIRATION 2020/12/30
ENV CT_LOCATOR none
ENV CT_SIGNATURE your-signature

ENV CT_SERVER_URL https://yourcodetogetherserver.company.com

7. Build the Docker Container

Build the local Docker container using the above Docker file. The trailing dot configures the directory where the container should be placed. An additional path may be provided.

# docker build -t "codetogether:local" .
Sending build context to Docker daemon 14.85kB
Step 1/13 : FROM hub.edge.codetogether.com/latest/codetogether
(snip)
Successfully built (snip)
Successfully tagged codetogether:local

8. Start the Docker Container

Now that the container is ready, it is time to start it up! This will expose the configured ports on your container host. You can optionally only expose port 80 and/or 443, depending on which services you will be using.

# docker run -it --name codetogether -p 80:80 -p 443:443 -d codetogether:local
c2b2c088172165a213d2ba...

9. Confirm Services are Ready

Now that the container is started, confirm that everything is running as expected.

# docker container ps
CONTAINER ID   IMAGE                  COMMAND                  CREATED
c2b2c0881721   codetogether:local     "/bin/sh -c 'service…"   About a minute ago ...

10. Download Clients for CodeTogether

To begin using CodeTogether for collaborative sessions, download the corresponding pre-configured client for your host IDE from the container’s “clients” download page. This page is available at CT_SERVER_URL/clients

Appendix: Troubleshooting

CodeTogether should primarily be a black box, with automatic restart if you get a process failure; however, should diagnostics need to be performed, the core CodeTogether backend log file can be found at /var/log/codetogether/server.log and the Node process is provisioned at /opt/codetogether

That’s it!

If you need help getting going with CodeTogether:
https://www.codetogether.com/docs/getting-started-with-codetogether/