The most repeatable way to self-host Gitea is to run the official Docker image with Docker Compose on a Linux VPS, keep /data on persistent storage, and place Gitea behind an HTTPS reverse proxy. SQLite is adequate for a small, single-node installation; PostgreSQL or MySQL is a better fit as users, repositories, automation jobs, and package artifacts grow. A binary installation managed by systemd is a sound alternative when you do not want Docker.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What you need before installing Gitea
Gitea is a self-hosted Git service for repositories, pull requests, issues, releases, package artifacts, webhooks, and user administration. On a VPS, you are responsible for the operating system, firewall, storage, TLS certificates, upgrades, monitoring, and recoveries that a hosted service would normally handle.
As an Amazon Associate I earn from qualifying purchases.
- A current 64-bit Linux VPS with a public IP address and persistent disk or volume.
- A DNS name such as
git.example.compointing to that address. - Firewall rules allowing only the services you intend to expose: normally HTTPS (443), optionally HTTP (80) for certificate redirects, and an SSH port for Git access.
- Enough CPU, memory, and storage for repositories, attachments, actions, package files, logs, database growth, and at least one local backup. Gitea’s cited documentation does not define a universal VPS size or repository-count limit, so size the machine from your workload and monitor it.
- Git 2.0 or newer on the server for a binary installation, as required by the current Gitea installation documentation.
Decide whether the VPS will run only Gitea or several services. A single-purpose host simplifies firewalling and upgrades. If you share the machine, reserve storage and memory for Gitea and make sure another service cannot consume the disk needed for repositories or backups.
Choose Docker Compose or a binary installation
| Decision | Small personal or low-write instance | Team or growing instance |
|---|---|---|
| Runtime | Docker Compose with SQLite | Docker Compose or a host-managed binary with PostgreSQL or MySQL |
| Data layout | One durable volume plus off-host backups | Separate database and repository backup strategy |
| Network exposure | Reverse proxy on the same VPS | Reverse proxy, stricter firewall, monitoring, and capacity planning |
| Upgrade method | Back up, pull the intended image, then recreate the container | Staged upgrade with database compatibility review and a tested rollback plan |
When Docker is the better default
Compose gives you a repeatable service definition, an isolated runtime, and a straightforward upgrade command. It is usually the easiest starting point when you are comfortable maintaining Docker Engine and Compose. The official Docker documentation warns that rootful and rootless Gitea images are not interchangeable. Select one model deliberately and keep its volume ownership and container settings consistent.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
When a binary is preferable
A binary installation fits operators who want Gitea to behave like a conventional Linux service, with files managed by the host and startup controlled by systemd. Gitea documents architecture-specific downloads, signature verification, a dedicated git account, /var/lib/gitea data directories, restrictive /etc/gitea permissions, and systemd startup.
Install Gitea with Docker Compose
1. Install Docker and create a project directory
Install Docker Engine and the Compose plugin using your Linux distribution’s supported method. Create a directory owned by an administrator, for example /opt/gitea, and keep the Compose file there. Do not put the only copy of repository data inside the writable container layer.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →2. Define a durable service
The following minimal Compose service uses a named volume mounted at Gitea’s persistent /data path and publishes the web and SSH ports. Pin the Gitea image to the release you have approved rather than relying on an unreviewed floating tag. The example uses the official image’s major tag to illustrate the layout; replace it with the exact supported release tag selected from Gitea’s release documentation.
services:
gitea:
image: docker.gitea.com/gitea:1
container_name: gitea
restart: unless-stopped
ports:
- "3000:3000"
- "2222:22"
volumes:
- gitea_data:/data
volumes:
gitea_data:
If you bind-mount a host directory instead of a named volume, create it first and apply the ownership required by the image variant. A rootful image and a rootless image use different expectations; mixing their documentation or reusing a volume between them can produce permission failures.
3. Start the container and complete initial setup
- From the project directory, run
docker compose up -d. - Open
http://server-ip:3000temporarily from a trusted network. - Choose SQLite for a simple single-node deployment, or select MySQL or PostgreSQL and enter the database host, database name, user, and password.
- Set the site title, administrator account, and a strong administrator password. Replace every example credential immediately.
- Set the public URL to the HTTPS address you will actually publish, then save the installation.
After setup, lock the installer with INSTALL_LOCK=true (or the equivalent setting in app.ini) and ensure SECRET_KEY and INTERNAL_TOKEN are present. Treat app.ini, database credentials, signing keys, and OAuth secrets as confidential.
SQLite, PostgreSQL, or MySQL?
SQLite keeps a small deployment simple because there is no separate database service. It is a reasonable choice for one node with modest write activity. PostgreSQL and MySQL provide a clearer growth path for teams and heavier concurrent activity. If you use PostgreSQL in Compose, pin the database image’s major version. PostgreSQL does not automatically migrate its data directory across major versions; a later major upgrade requires pg_upgrade or dump-and-restore.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Install Gitea from a binary instead
1. Create the service account and directories
Create a dedicated non-root git user and group. Use the documented directory layout, including /var/lib/gitea for data and /etc/gitea for configuration. Keep the configuration directory writable only by the account or administrators who must edit it, and make app.ini restrictive because it can contain database passwords and secret tokens.
2. Download and verify the matching binary
Select the artifact for your VPS architecture. Starting with Gitea v1.27, Gitea says it signs all binaries with Sigstore to prevent unwanted modification; a successful cosign verify-blob check returns Verified OK. Follow the release’s published verification material rather than treating an unverified download as trusted. GPG verification is also documented for releases that provide the required signatures.
The current installation page gives a binary example using version 28.1.0. That number is an example from the cited documentation, not a recommendation to install it blindly; choose a release compatible with your migration and upgrade plan.
3. Configure systemd
Install the executable as /usr/local/bin/gitea and keep that generic filename so future upgrades can replace it without changing the service definition. Create a systemd unit that runs as the dedicated git user, points to the correct working and configuration directories, and restarts on failure. Enable and start the unit, then inspect its journal before exposing the service publicly.
Keep the binary, data, and configuration paths documented. A path change during a restore or migration requires ownership fixes and can require repository-hook regeneration.
Put Gitea behind nginx and HTTPS
Set the canonical URL
In Gitea’s configuration, set:
[server]
ROOT_URL = https://git.example.com/
The URL must match the address users open and the address embedded in clone links and webhooks. A mismatch commonly causes redirects to an internal hostname, incorrect callback URLs, or mixed-content behavior.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Configure the reverse proxy
Terminate TLS at nginx and proxy requests to Gitea’s local HTTP listener. Preserve the original host and scheme, and pass WebSocket upgrade headers so live notifications and other upgraded connections work.
server {
listen 443 ssl http2;
server_name git.example.com;
ssl_certificate /path/to/fullchain.pem;
ssl_certificate_key /path/to/private.key;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Use the complete certificate chain, not only the leaf certificate. Keep the backend port inaccessible from the public internet if nginx is on the same VPS; expose only the proxy’s HTTPS port and the SSH port you deliberately selected.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsObtain and retain certificates
Gitea can use nginx, Apache, or Caddy for TLS termination, or its built-in ACME support. If you use built-in ACME with Docker, set ACME_DIRECTORY=/data/gitea/https. That directory must be on persistent storage. Recreating a container without it can discard the ACME account and certificate cache, causing repeated certificate requests and potentially hitting the documented Let’s Encrypt limit of five certificates per week for the same set of domains.
Validate the public path
- Open the HTTPS URL and confirm that HTTP redirects as intended.
- Check that clone URLs use the public hostname and correct SSH port.
- Test a browser login, repository creation, push and pull over HTTPS, and push and pull over SSH.
- Upload a large file within your configured limits and verify that the reverse proxy does not terminate the request prematurely.
- Confirm WebSocket notifications, email delivery if configured, and database connectivity.
SSH access, firewalling, and operational hardening
Git over SSH needs a reachable SSH listener. The Compose example maps host port 2222 to Gitea’s container port 22; publish a different host port if your VPS already uses 2222, and ensure the generated SSH clone URLs reflect that choice. Keep normal administrator SSH access separate from Gitea’s Git SSH service where possible.
- Allow inbound HTTPS and only the SSH ports you use; deny everything else by default.
- Run Gitea as a dedicated non-root account, whether in a binary installation or the image model you selected.
- Patch the Linux host, Docker Engine (if used), and Gitea on a planned schedule.
- Monitor disk space, memory, certificate expiry, database health, repository growth, and backup-job results.
- Set
INSTALL_LOCK=true, verifySECRET_KEYandINTERNAL_TOKEN, and remove example passwords. - Store backup credentials and encryption keys outside the VPS so a host compromise does not destroy both production and recovery material.
Back up Gitea consistently
Gitea’s backup documentation states: “To ensure the consistency of the Gitea instance, it must be shutdown during backup.” Plan a maintenance window, stop the service, and then capture both application files and the database.
Use the built-in dump
The gitea dump command creates a ZIP containing app.ini when applicable, custom/, the data directory, complete repositories, gitea-db.sql, and logs. Run it with the same installation paths and permissions used by the service, then copy the resulting archive off the VPS. A local archive alone is not a disaster-recovery plan.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Use native database backups when appropriate
For MySQL or PostgreSQL, the documentation notes that administrators may prefer native mysqldump or pg_dump. Keep repository data, attachments, configuration, and the database backup together as one recovery set, and record the database version and credentials required to restore it.
Rehearse restoration
- Provision a clean test VPS or isolated instance with compatible Gitea and database versions.
- Unpack the archive and restore files to the documented locations.
- Restore the database and correct ownership for the service account.
- Start Gitea and inspect logs, users, repositories, attachments, hooks, and clone URLs.
- If installation paths changed, regenerate repository hooks as directed by Gitea’s restore documentation.
There is no promised one-command automated recovery procedure in the cited documentation, so write down file paths, database credentials, service commands, and the order of operations in your own runbook.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Upgrade without losing repositories
Docker upgrades
Back up first, verify the archive, and confirm the target image and database compatibility. Pull the intended image and run docker compose up -d. Keep /data outside the disposable container layer. Watch the container logs and test login, repository browsing, clone, push, hooks, and package access after the migration completes.
Binary upgrades
Stop Gitea through systemd, verify the new release, replace /usr/local/bin/gitea without changing the generic filename, and start the service again. Review migration output and logs before allowing users back in. Retain the previous verified binary until the new release has passed your smoke tests.
Database version changes
Do not assume a new PostgreSQL container can open an old major-version data directory. Use the documented pg_upgrade path or dump-and-restore process, and test it separately from the Gitea application upgrade. The same discipline applies to MySQL: review the database engine’s supported upgrade path rather than replacing an image tag blindly.
Common failures and targeted fixes
Permission denied on startup or repositories
Check whether the volume was previously used by the other image model, rootful or rootless. Confirm the container’s expected UID/GID, correct ownership on the host mount, and ensure /data is writable by the service account.
Best Value
Redirects to an internal URL
Correct [server] ROOT_URL, verify nginx sends Host and X-Forwarded-Proto, and restart Gitea after changing configuration.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →WebSocket notifications fail
Ensure nginx forwards Upgrade and Connection headers and that an intermediate firewall or load balancer is not stripping them.
SSH clone URLs use the wrong port
Align the host-to-container port mapping with Gitea’s SSH settings and regenerate or recheck clone URLs after changing it.
Certificates are requested repeatedly
Persist the ACME directory, especially /data/gitea/https in Docker, and avoid repeatedly recreating a container with an empty volume. Check the five-certificates-per-week limit before retrying.
A restore starts but repositories are missing
Verify that the complete repository directory and database were restored, ownership matches the running account, and hooks were regenerated if paths changed. Inspect logs for the exact data and database paths Gitea opened.
A practical go-live checklist
- DNS resolves to the VPS and the firewall exposes only required ports.
- Gitea data is on persistent storage, not the container’s writable layer.
- The public
ROOT_URL, TLS certificate chain, proxy headers, and WebSocket path are correct. - Administrator credentials are unique, secrets are generated, and installation lock is enabled.
- HTTPS and SSH clone/push tests succeed, including a large-file upload.
- A shutdown-consistent backup has been copied off the VPS.
- A restoration rehearsal has confirmed users, repositories, attachments, hooks, and database recovery.
- Upgrade steps, rollback binary or image, database versions, and ownership commands are written in a runbook.
For a personal Gitea, Docker Compose with SQLite and one durable volume minimizes moving parts. For a team, choose PostgreSQL or MySQL, separate and monitor database and repository storage, and treat upgrades and restores as rehearsed operations rather than one-line deployments.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




