GitLab CE 19 DevOps Platform
GitLab Community Edition 19.4.1 is an open-source DevOps platform with Git hosting, merge requests, issues, wikis and CI/CD. This template deploys the official Omnibus image with a persistent volume, Git over SSH through a TCP proxy and a self-registering CI runner.
What you get
- GitLab CE 19.4.1 Omnibus with bundled PostgreSQL, Redis, Gitaly and nginx in one service
- One volume at /var/opt/gitlab holding repositories, database, uploads and configuration
- Git over SSH through a Railway TCP proxy
- A GitLab Runner 19.4.1 service with the shell executor that registers itself with a short-lived token
- Generated root password, with optional SMTP configured from variables
Good for
- Private Git hosting for a team on infrastructure it controls
- Code review with merge requests and protected branches
- Issue tracking, boards and wikis next to the code
- Lightweight CI pipelines on the bundled shell runner
Cost
Idle RAM measured locally a few minutes after first boot was about 3.9 GB for GitLab and 23 MB for the runner, so memory is the main cost driver. The source states GitLab needs about 4 GB and that the defaults fit 4 to 8 GB.
Services in this template
- GitLab · from
baranberkay96/gitlab-railway - GitLab Runner · from
baranberkay96/gitlab-railway
Questions people ask
How do I log in?
Wait until GitLab is healthy; first boot takes several minutes. Open the public URL and sign in as root with the generated GITLAB_ROOT_PASSWORD from the service variables, then change it. New sign-ups need admin approval by default; turn sign-up off if the instance is private.
Can CI jobs use Docker images?
Not on the bundled runner. It uses the shell executor and the image keyword is ignored, because Railway cannot run Docker inside a container. Use it only for trusted projects, or register an external Docker runner for container-based jobs.
How do I back it up?
Railway volume backups cover the GitLab volume. You can also run gitlab-backup create in the GitLab shell and copy the result off the volume together with /etc/gitlab/gitlab-secrets.json, which is not part of gitlab-backup.
How do I upgrade?
Change GITLAB_VERSION in services/gitlab/Dockerfile and redeploy, following GitLab's upgrade path one required stop at a time. Keep the runner on the same minor version.
Does outbound email work?
GitLab sends mail only over SMTP, and Railway allows outbound SMTP on the Pro plan. Set the SMTP_* variables and GITLAB_EMAIL_FROM.
Full template README
Deploy and Host GitLab CE with Railway
GitLab Community Edition is an open-source DevOps platform: Git repositories, merge requests with code review, issues, boards, wikis and built-in CI/CD. This community template runs the official GitLab Omnibus image on Railway with a persistent volume, Git over SSH through a TCP proxy, and a CI runner that registers itself.
About Hosting GitLab CE
GitLab Omnibus bundles nginx, Puma, Sidekiq, Gitaly, gitlab-shell, PostgreSQL and Redis in one container. Hosting it well means keeping three kinds of state: repositories and the database, the configuration with gitlab-secrets.json (the keys that decrypt CI variables and 2FA secrets), and the SSH host keys. Railway allows one volume per service, so this template keeps all of it on a single volume and builds GitLab's configuration from service variables: external URL, SSH host and port, memory profile and optional SMTP. A separate GitLab Runner service uses the shell executor, because Railway has no Docker-in-Docker, and registers itself with a short-lived token that is revoked after use.
Common Use Cases
- Private Git hosting for a team or company that wants code on infrastructure it controls
- Code review with merge requests, protected branches and approval rules
- Issue tracking, boards, milestones and project wikis next to the code
- Lightweight CI pipelines (tests, linting, builds, scripted deploys) on the bundled shell runner
- A central GitLab for external runners on your own VMs or Kubernetes clusters
Dependencies for GitLab CE Hosting
- GitLab CE 19.4.1 (official
gitlab/gitlab-ceOmnibus image, with bundled PostgreSQL, Redis, Gitaly and nginx) - GitLab Runner 19.4.1 (official
gitlab/gitlab-runnerUbuntu image, shell executor) - A Railway volume for GitLab data and one for the runner configuration
- A Railway TCP proxy for Git over SSH
Deployment Dependencies
- GitLab Docker installation: https://docs.gitlab.com/install/docker/
- Omnibus configuration reference: https://docs.gitlab.com/omnibus/settings/
- Running GitLab in a memory-constrained environment: https://docs.gitlab.com/omnibus/settings/memory_constrained_envs/
- GitLab Runner shell executor: https://docs.gitlab.com/runner/executors/shell/
- GitLab upgrade paths: https://docs.gitlab.com/update/upgrade_paths/
Implementation Details
| Service | Image | Role |
|---|---|---|
| GitLab | built from services/gitlab (gitlab/gitlab-ce:19.4.1-ce.0 + entrypoint) |
Web UI, API, Git over HTTPS and SSH, Sidekiq, Gitaly, bundled PostgreSQL and Redis; volume /var/opt/gitlab |
| GitLab Runner | built from services/gitlab-runner (gitlab/gitlab-runner:ubuntu-v19.4.1 + tools) |
Runs CI jobs with the shell executor; volume /etc/gitlab-runner |
First login: wait until the GitLab service is healthy (the first boot configures GitLab and creates the database, which takes several minutes). Open the public URL and sign in as root with the generated GITLAB_ROOT_PASSWORD from the GitLab service variables, then change it. New sign-ups require admin approval by default; turn sign-up off under Admin → Settings → General if the instance is private. Add your SSH key and clone with the SSH URL GitLab shows (it points to the TCP proxy host and port).
CI/CD: the runner appears under Admin → CI/CD → Runners a few minutes after GitLab is up and picks up untagged jobs. Jobs run directly in the runner container with git, curl, bash, jq, make, Python 3 and rsync available; the image: keyword is ignored because Railway cannot run Docker inside a container. Add more tools in services/gitlab-runner/Dockerfile, or register an external Docker runner against your GitLab URL for container-based jobs. Use this runner only for projects you trust, since jobs share its container.
Scaling: raise GITLAB_PUMA_WORKERS (about 700 MB each) or GITLAB_SIDEKIQ_CONCURRENCY and give the GitLab service more memory; the defaults fit 4–8 GB. GitLab itself runs as a single replica because it owns its volume. For more CI capacity raise GITLAB_RUNNER_CONCURRENT and the runner's resources.
E-mail: set SMTP_ADDRESS, SMTP_PORT, SMTP_USER, SMTP_PASSWORD and GITLAB_EMAIL_FROM. GitLab sends mail only over SMTP, and Railway allows outbound SMTP on the Pro plan.
Versions: GitLab is pinned in services/gitlab/Dockerfile (GITLAB_VERSION), the runner in services/gitlab-runner/Dockerfile (RUNNER_VERSION). Upgrade along GitLab's upgrade path, one required stop at a time, and keep the runner on the same minor version. Back up with gitlab-backup create (in the GitLab service shell) and keep a copy of /etc/gitlab/gitlab-secrets.json with it.
Why Deploy GitLab CE on Railway?
Railway provides the persistent volume, HTTPS domain and TCP proxy GitLab needs, so a complete GitLab with SSH access and a working CI runner comes up from one template without managing a server. You pay for the resources GitLab actually uses and can give it more memory as your team grows.
Guides for this template
View GitLab CE 19 DevOps Platform on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| Chatwoot A customer communication platform | Other | 5,871 |
| Ubuntu-Linux Ubuntu terminal accessible via web browser | Other | 4,926 |
| Ubuntu SSH + Claude ARA TM —SSH server with root access + Claude Code pre-installed. | Other | 4,682 |
| Debian-Linux Debian terminal accessible via web browser. | Other | 2,883 |
| Code Server VS Code in the browser | Other | 2,787 |
| Kali Linux (Web Terminal) Instant Kali Linux browser terminal powered by ttyd | Other | 2,632 |