DEV Community

Deploy Instant
Deploy Instant

Posted on Originally published at deployinstant.com

Pull Requests Without a Landlord: Forgejo on Your Own VPS

Cross-posted from the DeployInstant.com blog. Same software, same files, one less dependency.

Pull Requests Without a Landlord: Forgejo on Your Own VPS

Every repository your team ships eventually lands on someone else's computer. The pull requests, the review history, the issue threads where decisions were actually made — all of it sits behind a login you do not control and a terms page that changes without asking you.

Forgejo is the quiet alternative: a full Git forge you run yourself, with repositories, reviews, issues, packages and a built-in CI runner on hardware you name. This guide walks the whole path, from an empty server to a forge your team lives in daily, using the instance controls that ship with every DeployInstant.com server.

The command center

Before the walkthrough, here is the shape of the thing: a small dedicated box, a forge that speaks Git over SSH and HTTPS, and a control panel that shows you what the server is doing at any moment. Nothing in this list is aspirational — each line maps to a tab or a project page you will touch in the sections below.

A code host should be boring infrastructure: it holds your history, it answers your team, and it never renegotiates the relationship while you are mid-merge.— the operating philosophy behind running a forge on your own box

Where the rented forge breaks down

The friction rarely shows up on day one. Your first repository imports cleanly, the CI minutes look generous, and the review UI is fast. Trouble starts the moment the platform's incentives and your team's habits stop pointing the same direction.

Pricing models drift toward seats and build minutes, so every new collaborator becomes a line item. Archive policies tighten, integrations get deprecated, and the migration path out is always documented as a set of manual steps you are expected to schedule yourself.

There is a second, quieter cost: decision latency. A repository you cannot inspect is a repository you cannot debug. When a webhook fails or a runner stalls, you file a ticket and wait, because the machine that runs your pipeline belongs to a support queue rather than to your team.

Forgejo enters this picture with an unusual pedigree. It began as a soft fork of Gitea, in the spirit of a community distribution rather than a rival product, and it is steered by Codeberg e.V., a German non-profit association that cannot sell the project out from under its users.

That governance shape shows up in the release calendar. Stable versions ship quarterly and stay supported for about three months, while an annual long-term-support line carries security fixes for well over a year. The current stable line is the seventeen series, with seventeen-oh-two published in mid-November two thousand twenty-six.

Ownership is not a feeling. It is the ability to answer, at three in the morning, the question "where is this running and who can touch it" — without opening a support portal.

The practical difference appears in the small operations. Rotate a signing key, widen a firewall rule, move the database to a bigger disk, run a second instance for a client — none of these require a plan change or a sales conversation. They require SSH access, which every DeployInstant.com instance hands you alongside its public IP.

There is also an honesty argument. A forge that stores your review history should be auditable by the same people who are accountable for it. With Forgejo, the source, the configuration file and the database schema are all things your team can read on a rainy afternoon.

None of this means self-hosting is free of work. It means the work is legible: a handful of files, a container, a scheduled update. The next section turns that into three concrete workflows your team would actually run on day one.

Three workflows, before and after

Features only matter when they change what a Tuesday looks like. These are the three loops a small product team runs every week, each shown as it behaves on a rented host and as it behaves once the same work sits on your own Forgejo instance.

Workflow one — the review loop

Forgejo's pull request screen carries the full history of a change: the diff, the review threads, linked issues, and the check results that gate the merge. Protected branches let you require approvals before anything reaches the default branch, so the policy lives in the repository instead of in a team habit.

Because users, teams and permissions are local, onboarding a reviewer is a row in your own database. Add the person, place them in the right team, and the repository visibility rules take effect immediately.

Workflow two — continuous integration without a meter

Forgejo Actions is the forge's built-in CI. Its YAML will look familiar to anyone who has written GitHub Actions, and the project is explicit about the nuance: familiarity rather than guaranteed compatibility, so expect small adjustments when you port a workflow.

Jobs are handed to a Forgejo Runner, which executes steps inside container images by default. Actions referenced from the workflow resolve against a default actions registry, and the documentation recommends fully qualified URLs when you want the source to be unambiguous.

The operational win is locality. Build artifacts, logs, runner state and source all live on hardware you can watch, so a slow pipeline becomes a resource question you answer with your own metrics rather than a quota page.

Workflow three — from issue to shipped release

Forgejo ships issue tracking with labels, assignees, due dates, milestones and kanban-style project boards. A milestone becomes a release: link issues to it, watch progress fill in, and cut the tag when the board clears.

The same instance also hosts a package registry that speaks npm, PyPI, Cargo, Go modules, Maven, NuGet, Composer, Helm charts and ordinary OCI container images. Publishing goes to your own hostname, which keeps internal dependencies private by default.

Add repositories mirroring, webhooks, and a REST API that covers nearly everything the interface does, and the forge becomes the integration point instead of one more system that needs synchronising.

A note on the human side of this shift: teams adopt a self-hosted forge fastest when the first week is boring. Import repositories, mirror the most active ones, run both hosts in parallel, and let the merge button decide which one people trust.

The migration that sticks is the one where nobody has to be convinced: reviewers follow the pull requests, and the pull requests are on your forge.

Reading the project like an operator

Marketing pages describe features; operators want cadence. Two charts explain most of what you need to know about running Forgejo for years rather than for a demo: how long each release line is actually cared for, and how much of the daily operational load the platform absorbs on its own.

The first bar is the reason a self-hosted forge needs a routine. Stable lines retire quickly, so staying current means planning a quarterly upgrade window. The long-term line gives you a place to stand when a busy quarter eats the calendar.

The second chart is about division of labour. Everything marked as absorbed is work your team never has to schedule, and everything marked as yours is work you genuinely want to own, because it is where your context lives.

Read the split honestly. Platform work that repeats without judgment — certificates, DNS, threat monitoring, patch cadence — belongs in infrastructure. Product judgment — who may merge, how big a build should be — belongs with the people shipping.

That split is exactly what a managed instance is for, and it is the thread running through the next section: a tab-by-tab look at what the dashboard actually does once Forgejo is running on it.

What the dashboard actually does

The instance behind a Forgejo install is not a black box. Its control panel is organised into tabs, and each tab answers one operational question without an SSH session. Here is the tour, in the order you will meet them.

Overview, Ops and Activity

Overview carries the state of the box: status, resource cards, public IP, region and SSH access, with Stop, Restart and Open app one click apart. For a forge that means you can bounce the service during a maintenance window without touching a console.

Activity records what the provider actually executed — start, stop and reboot operations with timestamps — so an incident review reads as a history rather than a reconstruction. App-level stdout output is scheduled to arrive alongside the monitoring agent; until then, the power actions are the honest, verifiable record.

Domain and Email business

The Domain tab hands you two routes to a real address. Point an A record at the server IP, or move the nameservers and let the zone be managed for you; a free managed subdomain is already attached so the forge has an address before you decide anything.

Certificates for connected domains are issued and renewed automatically, which removes the single most common way a self-hosted service goes quietly dark. The Email business tab attaches a mailbox on the same domain, so noreply@yourforge.example sends invitations and notifications from infrastructure you control.

SSE Security

Security monitoring runs as a daemon on the instance itself, starts at boot and asks nothing of you except where alerts should land. The stream is delivered over server-sent events, which is why the tab is named the way it is: a live, authenticated feed of security events rather than a daily digest.

It watches for SSH brute-force attempts in the authentication log, flags CPU and memory surges before an app stumbles, and throttles notifications so an attack cannot flood your channel. Alerts go to Telegram or email, and a switch in the tab lets suspicious findings open an admin ticket automatically while history keeps recording even when alerts are muted.

For a public git forge — which is, by definition, an internet-facing service that accepts authentication attempts — this is the difference between noticing a probe on Sunday afternoon and reading about it in next month's report.

The honest comparison

The table below compares operational parameters only. No money appears anywhere in it, because the relevant question is who performs each task, how quickly, and with what evidence that it happened.

Operational parameter Raw unmanaged VPS Rented code host Managed DeployInstant instance
Time from empty box to accepting pushes Hours of package and container work Minutes, after account setup Roughly ninety seconds of guided deploy
TLS certificate issuance and renewal Hand-rolled or a cron you maintain Handled invisibly Issued and auto-renewed for connected domains
Custom domain wiring You edit zone files Panel with hosted DNS Pre-filled A record or managed nameservers
Address before the domain arrives Raw IP only Provider subdomain Free managed subdomain from day one
OS patching and reboot hygiene Entirely on you Opaque shared kernel Server-level operations visible in Activity
Brute-force and spike detection DIY tooling you wire up Rarely exposed per account Always-on daemon with live SSE feed
Alert routing You build the pipeline Email notifications only Telegram or email, throttled, plus auto-ticket
CI runner provisioning You install and babysit it Included, metered per minute Same box, sized to your own workload
Reading what the app printed journalctl over SSH Support ticket or limited console Power actions recorded live; app logs arriving with the agent
Restore rehearsal Your own scripted drills Export request from support Restore path shown only when it is truly wired
Data export Whatever you scripted Manual archive, then re-wiring Copy the data directory, database dump, git bundle
Seat and team administration Native to the app Billable collaborator rows Native to the app, unlimited by the platform
Moving to a different provider Free-form migration work Rebuild every integration Clone to a new instance from the danger zone

Two rows deserve emphasis. The restore row is deliberately worded: a control panel that advertises backups it cannot demonstrate is worse than one that waits until the wiring exists, and meanwhile your forge's own data directory is a complete, verifiable export.

The clone row is the strategic one. Rebuilding the whole server from scratch, or cloning it to a fresh instance, are both first-class actions — portability treated as a feature rather than as a support escalation.

Exit rights, built into the design

Data ownership is not a slogan; it is a mechanical property of where files live. A Forgejo instance keeps repositories, the relational database, uploaded packages and configuration in one data directory, and that directory is the entire export story.

The supported databases are SQLite, PostgreSQL, MariaDB and MySQL. Small and moderately active instances are officially encouraged to run SQLite — a handful of files with no maintenance — while busier forges move to PostgreSQL or MySQL once concurrent activity demands it.

That choice matters at exit time. A SQLite forge is a folder; a PostgreSQL forge is a standard pg_dump. Neither outcome depends on a proprietary format, an account in good standing, or an export button that exists on a pricing page.

A rollout playbook that survives contact with a real team

Start with a mirror, not a cutover. Pick the repository with the most recent activity and mirror it into the new forge so history, branches and tags arrive intact. Keep the original remote configured; nothing forces an irreversible decision on the first day.

Next, wire identity. Import users, set up the teams that match how review actually happens, and write the branch protection rules before anyone asks whether merges are being checked. Policies written while the forge is empty get followed; policies written during a fire get bypassed.

Then move CI in small doses. Port one workflow file, watch the runner handle it, and compare the logs against the old pipeline. The documentation's advice about familiarity rather than compatibility is worth heeding here: expect to adjust base images and a few action references.

Only after builds are green do you flip the default remote for the team. Announce the new push URL, keep the old host as a read-only mirror for a fortnight, and archive it once every branch has been pushed at least once.

Finally, set the maintenance rhythm: a quarterly upgrade aligned to the stable release calendar, a monthly restore rehearsal from your export path, and a quick read of the security stream after any suspicious weekend.

Two habits make the difference between a forge people trust and one they route around. The first is visible ownership: name the person who answers when the runner fails, and let them keep the runbook in the repository where it belongs. The second is boring consistency — push to the new remote even when the old one still works, because parallel operation only ends when everyone stops hedging.

Write down the decisions while they are fresh. Why SQLite was chosen, when the runner moved to a second box, which branch rule the team argued about — a repository that documents its own operations is far easier to hand to the next person who joins.

The point of owning the forge is not saving a subscription. It is keeping the record of how your software was made — decisions, reviews and all — on hardware that answers to you.

Mechanics: what actually happens on a push

Ownership is easier to defend when you know the moving parts. A push to your forge travels over SSH or HTTPS, lands in a bare repository on disk, and triggers server-side hooks that update references, run checks and notify anything you have wired up.

The HTTP layer serves the web interface, the REST API and the git smart-HTTP protocol from one process. Configuration lives in a single INI file, and the container build lets you override almost any setting through environment variables without editing that file by hand.

Repositories are plain git directories. You can inspect one with standard git tooling over SSH, run git gc yourself, or point a second clone at it — no hidden index, no proprietary store between you and the history.

The integration surface

A forge that cannot talk to the rest of your tooling becomes an island, so Forgejo exposes a REST API covering repositories, organisations, issues, pull requests, packages and administration. Anything your dashboards read from a hosted code provider can usually read from an endpoint you host instead.

Webhooks fire on the events that matter — pushes, pull requests, issues, releases — and deliver them to chat rooms, ticketing systems or your own listeners. Because the receiver address is yours, internal tooling can stay off the public internet entirely.

For automation that needs to act rather than observe, access tokens with scoped permissions let CI jobs and scripts push, tag and publish packages without sharing a human login. The same tokens make it straightforward to keep a second forge in sync on a schedule.

The project has also kept an eye on decentralisation, with federation-related work treated as experimental rather than as a headline feature. Treat it as an interesting direction, not a dependency for your architecture.

Day-two operations, written down

Backups are the first habit to formalise. Copy the data directory on a schedule, dump the database separately, and rehearse a restore onto a scratch instance once a quarter. A backup that has never been restored is a rumour.

Runner sizing is the second. Jobs run in containers on the same machine as the forge by default, so a heavy test matrix competes with the web interface for CPU. Move demanding workloads to a second runner, or throttle concurrent jobs, when review traffic starts feeling sluggish.

Disk is the quiet failure mode. Git repositories grow with every generated file that slips into a commit, and package registries accumulate old versions. Enable cleanup rules on the registry, watch the data directory, and set a reminder before the volume fills.

Access review is the third habit, and the cheapest. List administrators quarterly, retire tokens nobody recognises, and check that branch protection still matches the review policy your team believes it has.

Finally, keep the security stream un-muted. Alerts routed to a channel someone actually reads are worth more than a perfect configuration nobody watches, and the instance daemon already handles the collection side for you.

Alternatives weighed honestly

Forgejo is not the only way to host your own source, and pretending otherwise would be lazy. The comparison below sticks to differences you can verify from each project's own documentation.

Gitea is Forgejo's parent project: a very mature, lightweight forge with a broad feature set and a large community. If you want maximum ecosystem familiarity and no particular interest in community governance, Gitea is a perfectly good answer, and the two remain close enough that daily use feels identical.

Forgejo's distinguishing trait is stewardship. Development sits with a non-profit association, the roadmap is discussed in public, and the project explicitly frames itself as a community-led distribution rather than a product line. For teams whose main concern is what happens to the code host in five years, that shape matters more than a feature delta.

GitLab in its self-managed form is the heavier option: a full DevOps platform with container registries, security scanning and project management layered on top. It is capable and correspondingly demanding of memory and attention. If you need its integrated suite and have the operational appetite for it, take it; if you need a forge that stays out of the way, it is more machine than the job requires.

Staying on a rented host remains a legitimate choice for public open-source work that benefits from a large discovery audience, or for teams with no appetite for any server work at all. The argument in this article is narrower: private company repositories, review history and issue threads are institutional memory, and institutional memory deserves a custodian you can reach.

The first week, as a checklist

Run that list and the abstract argument becomes concrete within a week. The forge is answering pushes, the checks are running on your own hardware, the certificate renews without anyone thinking about it, and the security feed shows exactly what a public service attracts.

Nothing about the setup requires a specialist. It requires someone willing to own a small, well-documented system — which, if you are reading a guide about self-hosting, is probably you.

If the first month feels heavier than expected, resist the urge to abandon the idea. Most of that weight is one-time wiring: the domain, the runner, the export script. The steady state is a service that restarts on boot, renews its certificate unattended, and waits for the next push.

Questions operators ask before they cut over

Small. The catalog matches Forgejo to a minimal specification of one virtual CPU, two gigabytes of memory and twenty-five gigabytes of disk, then deploys the smallest plan that meets it. A forge serving a handful of teams is mostly waiting for pushes, and SQLite keeps the database layer to a couple of files.

Build runners are the variable. Heavy CI wants cores, so give the runner room before you give the web interface any.

Mostly, with edits. The project describes Forgejo Actions as familiar rather than compatible: YAML in .forgejo/workflows, container-based steps and many constructs that translate one-to-one, but a different default runner image and occasional differences in contexts. Port one workflow first, read the failures, and treat the migration as a small engineering task rather than a checkbox.

Stable releases appear quarterly and stay supported until the following line ships, while an annual long-term-support line carries critical fixes for well over a year. On a container-based install you move the image tag, restart, and verify; the project deliberately requires a human to confirm major version jumps. Schedule that as a calendar ritual and the forge stays current without surprises.

Yes, and you should. Mirror repositories in both directions during the transition, push to both remotes, and let review traffic decide when the old host becomes read-only. Nothing in Forgejo objects to being a second remote, and the migration ends when your team stops noticing which one is primary.

The forge answers SSH for git operations the way any hosted forge does, and the instance hands you its own SSH access, public IP and region from the Overview tab. Keep the two clearly separated in your notes: one channel is for repository traffic, the other is for operating the server that runs it.

They stay on the machine that produced them and stream to the authenticated feed in the SSE Security tab, from which they are routed to the Telegram or email destination you choose. The daemon starts with the server and needs no third-party service to function, which is the relevant privacy property when the forge holds private repositories and personal data.

Use the package registry instead of the git history. It speaks npm, PyPI, Cargo, Go modules, Maven, NuGet, Composer, Helm and ordinary container images, with cleanup rules per package type and blob deduplication underneath. Keep repositories for source, keep the registry for anything built, and the clone stays fast for everyone.

Three options, in escalating order of effort: clone the instance to a larger one from the danger zone, move the data directory to bigger storage, or take the export and run the same container somewhere else. Because the stack is containers plus open databases, none of those paths requires re-implementing anything.

There is one last question the table cannot answer: whether your team will actually enjoy using it. The fastest way to find out is to install it, push one repository, and open a pull request that someone else has to review. The forge either disappears into the background — which is the highest compliment infrastructure can earn — or it does not.

Install Forgejo in about ninety seconds on a dedicated server, point your domain at it, and keep the record of how your software gets made where your team can reach it.

Read the full illustrated guide with diagrams

Top comments (0)