Skip to main content

Inferyx CodeGate

Browser VS Code (code-server) for many users on one Ubuntu server. Each user gets their own Docker workspace; admins manage everything from a web portal.

  • Login: username/password, and optionally AWS IAM Identity Center (SSO).
  • One container per user, with CPU/RAM/disk limits and its own home folder.
  • Admin portal for users, approvals, resources, sessions, audit log and settings.
https://code.example.com/codeapp/                    → sign in
https://code.example.com/codeapp/editor/<username>/  → that user's VS Code
https://code.example.com/codeapp/admin/              → admin portal

Requirements

  • Ubuntu 24.04 server with root (sudo) access
  • Python 3.10+ (sudo apt install -y python3-pip python3-venv)
  • A DNS name pointing to the server, ports 80 and 443 open
  • Optional: AWS IAM Identity Center, if you want SSO login

Install

# 1. install into its own virtual environment
sudo python3 -m venv /opt/inferyx-codegate
sudo /opt/inferyx-codegate/bin/pip install "inferyx-codegate[saml]"
sudo ln -sf /opt/inferyx-codegate/bin/inferyx-codegate /usr/local/bin/inferyx-codegate

# 2. set everything up (asks for the domain and the default admin's email + password)
sudo inferyx-codegate setup

# 3. check
sudo inferyx-codegate doctor

If installing [saml] fails to build xmlsec, install inferyx-codegate without [saml]; inferyx-codegate setup then installs the system libraries and the SAML library for you.

Unattended install:

sudo inferyx-codegate setup -y --domain code.example.com --admin-email admin@example.com \
  --port 8443 \
  --admin-password-file /root/admin-pw.txt   # omit to generate a password (shown once)

What setup does

Setup is safe to run again: it checks each part and skips what's already in place.

Part What happens
Packages Installs only what's missing: nginx, docker.io, quota, certbot, xmlsec libraries
Docker Reuses an existing Docker install; builds the workspace image (code-server, Python, AWS CLI)
Default admin Creates the first admin with password login. Must change a generated password at first login
nginx Writes only its own files (/etc/nginx/inferyx-codegate/, conf.d/inferyx-codegate-map.conf, and with a separate port sites-available/inferyx-codegate). Never edits your existing nginx files (see below)
HTTPS Runs certbot only for a site Inferyx CodeGate created itself (--skip-ssl to skip)
Host SSH Adds /etc/ssh/sshd_config.d/10-inferyx-codegate.conf so workspace users can't SSH into the server
Service systemd service inferyx-codegate plus a daily backup timer
Existing code-server Detected; you choose keep, stop or disable

nginx: choose how it is served

Setup asks for the HTTPS port. Your existing nginx sites (AWX, Tomcat, …) are never edited.

Option A: separate port (e.g. 8443). Nothing else to do on the server. Setup creates its own site file /etc/nginx/sites-available/inferyx-codegate that listens on that port for your domain and reuses the domain's existing certificate (read-only). The login URL becomes https://<your-domain>:8443/codeapp/. Open that port in the AWS security group (and ufw, if used).

sudo inferyx-codegate setup --port 8443

Option B: port 443 (same URL as your other sites). Default. nginx serves one server { } block per domain and port, so that block has to load the portal's routes. Setup does this for you: it creates the folder /etc/nginx/<your-domain>.d/, links the portal's config into it, and (after asking once; -y accepts) adds one line to the existing 443 block, right after server_name:

include /etc/nginx/<your-domain>.d/*.conf;

Nothing else in that file changes. A backup is kept in /var/lib/inferyx-codegate/backups/, nginx -t checks the result, and the original is restored automatically on any error. From then on, all portal routes live in their own files. --no-nginx-edit only prints the line.

If the domain has no server block yet, setup creates its own site (port 80 + certbot).

First sign-in

  1. Open https://<your-domain>/codeapp/ and sign in as the default admin.
  2. Change the password when asked.
  3. Users → Add user: enter the email, set a temporary password (or Generate), choose a plan. The user's Linux account, home folder, container and route are created automatically.
  4. Give the user their temporary password over a secure channel. They must change it at first sign-in, then VS Code opens.

AWS SSO login (optional)

  1. AWS console → IAM Identity Center → Applications → Add application → I have an application I want to set up → SAML 2.0.

  2. In Inferyx CodeGate: Settings → Login. Copy the ACS URL and SAML audience shown there into the AWS application ("Manually type your metadata values").

  3. AWS Attribute mappings:

    User attribute in the application Maps to Format
    Subject ${user:email} emailAddress
    email ${user:email} unspecified
    name (optional) ${user:name} unspecified
  4. Copy the IAM Identity Center SAML metadata file URL from AWS into SAML metadata URL, click Test metadata, switch on AWS SSO login, and Save.

  5. In AWS, assign users or groups to the application. New SSO users wait as pending until an admin approves them, unless their email domain is on the auto-approve list.

Password login and SSO can each be switched off in Settings → Login; at least one stays on.

The VS Code workspace

Each user's VS Code runs in its own container and is set up for company use:

  • Browser tab shows " — Inferyx CodeGate" with the Inferyx icon.
  • VS Code's own Accounts menu, Chat/Copilot panel, welcome page and Restricted Mode banner are turned off. Sign-in is CodeGate's; the status bar shows " · Sign out".
  • System files in the home folder (.bashrc, .cache, .config, …) are hidden in the Explorer (still on disk). A project's own dotfiles such as .git or .env stay visible.
  • Telemetry and update checks are off.

These settings are re-applied every time a workspace starts. Users can still change their own editor settings (theme, font, keybindings).

Login security

  • Passwords are stored only as salted scrypt hashes. Rules: at least 12 characters, 3 of lowercase / uppercase / digit / symbol, not containing the username or email.
  • After 5 failed attempts an account is locked for 15 minutes (adjustable); admins can unlock it from the user page. Attempts are also rate-limited per IP address.
  • Sessions use a random token in an HttpOnly, Secure cookie; only its hash is stored. A new token is issued at every sign-in and password change. Session length and idle timeout are in Settings.
  • Changing or resetting a password ends the user's other sessions. Turning a login method off ends the sessions that used it.
  • Sign-in, sign-out and password forms are protected against cross-site requests.

Locked out of the web portal?

On the server:

sudo inferyx-codegate user passwd <admin-username-or-email>   # set a new password (--generate for random)
sudo inferyx-codegate user unlock <user>
sudo inferyx-codegate auth show
sudo inferyx-codegate auth enable password

Day-to-day commands

sudo inferyx-codegate status | start | stop | restart | logs -f
sudo inferyx-codegate doctor                                 # checks everything, prints fix hints
sudo inferyx-codegate user add dev@example.com --plan medium --password
sudo inferyx-codegate user set <user> --plan large           # CPU/RAM apply live
sudo inferyx-codegate user delete <user> --remove-home       # home is archived first
sudo inferyx-codegate admin add second-admin@example.com
sudo inferyx-codegate backup | restore <file>

Full list: inferyx-codegate --help, and inferyx-codegate <command> --help.

Upgrade

sudo inferyx-codegate upgrade --dry-run    # show the plan
sudo inferyx-codegate upgrade              # latest version from PyPI

Before upgrading, it backs up the database, config and nginx files, plus the installed package. After installing, it runs migrations, refreshes nginx routes and restarts the service. If any step fails, the previous version is restored automatically.

Disk limits

Without Linux disk quotas, limits are monitored every 5 minutes and a workspace over its limit is stopped. For hard limits, enable quotas on the /home filesystem (maintenance window):

sudo apt install -y quota linux-image-extra-virtual
# add usrquota to the /home (or /) line in /etc/fstab, then:
sudo mount -o remount /
sudo quotacheck -cum /
sudo quotaon -v /
sudo inferyx-codegate doctor               # "Disk quotas on /home" should show ✓

Files

Path Contents
/etc/inferyx-codegate/inferyx-codegate.env configuration (inferyx-codegate config show)
/var/lib/inferyx-codegate/inferyx-codegate.db database: users, sessions, audit log, settings
/var/lib/inferyx-codegate/backups/ daily and pre-upgrade backups
/var/log/inferyx-codegate/inferyx-codegate.log service log
/etc/nginx/inferyx-codegate/ generated nginx config
/home/<user> user files (mounted into their container)

Good to know

  • Admins can't open other users' VS Code.
  • Workspace users can't sign in to the server over SSH; they only get VS Code.
  • sudo inside a workspace makes the user root in their container. Only give it to people you would trust with the server. Mounting /home with nosuid adds protection (inferyx-codegate doctor checks it).
  • The service runs as root (it manages Linux users, Docker and nginx) but listens only on 127.0.0.1; nginx is the only public entry point.
  • Signing out of Inferyx CodeGate doesn't sign the user out of the AWS access portal.

Metadata

Release files for inferyx-codegate 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inferyx-codegate 2.0.6
File Size Uploaded Provenance Actions
inferyx_codegate-2.0.6.tar.gz 818.5 kB Without provenance Details for inferyx_codegate-2.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inferyx-codegate 2.0.6
File Interpreter ABI Platform Actions
inferyx_codegate-2.0.6-py3-none-any.whl Python 3 none any Details for inferyx_codegate-2.0.6-py3-none-any.whl

Total release size: 1.7 MB

Release files / inferyx_codegate-2.0.6.tar.gz

Download URL inferyx_codegate-2.0.6.tar.gz
Size 818.5 kB
Tags Source
SHA-256 checksum
How to use checksums
738f39c5e24cfd6809251837155f543c766af93bfbac7219948e3775f3ee9083
BLAKE2b-256 checksum
How to use checksums
c50d4a424867f21beeede696bde8ea3939553c70b526d169c943ed7a23a4c2e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / inferyx_codegate-2.0.6-py3-none-any.whl

Download URL inferyx_codegate-2.0.6-py3-none-any.whl
Size 848.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6762a99affdb9ae75767420667d6d85c4885af7586039105f2ff155a2a07a117
BLAKE2b-256 checksum
How to use checksums
fdabd10ff5ea883005cbf6090fddbe184a2e4c31acb4bb49488993bb7959833d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for inferyx-codegate 2.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page