iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
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 appropriate for a small, single-node installation; PostgreSQL or MySQL are better documented choices as a team and write volume grow. A binary installation managed by systemd is a sound alternative when you want Gitea integrated directly with the host.
This guide covers provisioning, both installation methods, database selection, nginx TLS termination, SSH access, hardening, backups, restoration, upgrades, and operational tests.
What a self-hosted Gitea deployment contains
Gitea is a web application, Git-over-SSH and Git-over-HTTPS server, repository browser, issue tracker, and related collaboration service. On a VPS, the deployment normally has these layers:
- Linux VPS: compute, memory, a public IP address, firewall, and persistent disk or volume.
- Gitea: either the official container image or a downloaded binary running as a dedicated user.
- Database: SQLite for a simple single-node service, or MySQL/PostgreSQL for a larger installation.
- Repository and application data: repositories, attachments, avatars, configuration, actions data, and logs.
- Reverse proxy and TLS: nginx, Apache, Caddy, or Gitea’s built-in ACME support.
- Backup destination: at least one copy outside the VPS, with a tested restoration procedure.
A DNS name such as git.example.com should resolve to the VPS before you request a certificate. Use a separate persistent disk or volume when the provider offers one; losing an ephemeral boot disk can otherwise remove the entire service.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
Gitea requires Git version 2.0 or newer. Plan capacity for repositories, large-file objects, package artifacts, logs, temporary uploads, database growth, and backup space rather than sizing only for the initial binary.
Choose Docker Compose or a host-managed binary
| Decision | Smaller personal or low-write instance | Team or growing instance |
|---|---|---|
| Runtime | Docker Compose with SQLite | Docker Compose or a 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 approach | Back up, pull the pinned image, recreate the container | Staged upgrade with database compatibility review |
Containers make repeatable upgrades and rollback planning easier, while a binary avoids a container runtime and fits existing systemd administration. Do not mix the rootful and rootless Gitea images: Gitea’s documentation explicitly warns that “The rootful/rootless images are not compatible with the other.” Pick one model before creating the data volume, and keep the same model during upgrades.
Provision the VPS and DNS
- Deploy a currently supported Linux distribution on a VPS with a public IPv4 address (and IPv6 if you intend to use it).
- Attach persistent storage or verify that the boot volume is backed up by the provider. Leave free space for at least one local backup and temporary upgrade files.
- Create an A record for your chosen hostname, and an AAAA record only when IPv6 routing and firewall rules are configured correctly.
- Allow only the ports you need. A typical layout exposes TCP 80 and 443 to the reverse proxy and TCP 22 (or another chosen SSH port) for Git SSH and administration. Keep Gitea’s application port 3000 private to the VPS when a proxy is used.
- Update the operating system, install Git 2.0 or newer, set the server time zone and NTP, and create an administrative account that is not used for routine application work.
Do not expose the database port publicly. If a separate database host is required, permit its port only from the Gitea server’s private address.
Install Gitea with Docker Compose
Create a durable project directory
Install Docker Engine and the Compose plugin from your distribution’s supported packages. Create a directory owned by the account that will run Compose:
mkdir -p /opt/gitea
cd /opt/gitea
mkdir -p gitea-data
chown -R 1000:1000 gitea-data
The ownership must match the UID and GID used inside the selected image. Check the image documentation for the exact values when you choose a rootful or rootless variant. Incorrect ownership commonly produces permission errors when Gitea creates repositories, attachments, or logs.
Use a pinned Compose file
Pin an image tag that you have selected and tested instead of silently following an unreviewed major release. The following small SQLite example keeps all Gitea state in a host directory and publishes the web and SSH ports:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
services:
gitea:
image: gitea/gitea:REPLACE_WITH_TESTED_TAG
container_name: gitea
restart: unless-stopped
environment:
- USER_UID=1000
- USER_GID=1000
ports:
- "3000:3000"
- "2222:22"
volumes:
- ./gitea-data:/data
Replace the tag with the release you have approved and use the matching rootful or rootless image family consistently. Port 2222 on the host maps to port 22 in the container; users will include that port in SSH clone URLs unless you later expose host port 22 directly.
Start and complete the installer
- Save the file as
/opt/gitea/compose.yml. - Start it with
docker compose up -d. - Open
http://server-ip:3000from a trusted network while the service is being configured. - Choose SQLite for a low-write, single-node installation, or enter the connection details for MySQL or PostgreSQL.
- Set the site name, administrator account, mail settings, repository paths, and server URL. Do not retain example passwords.
- After saving the installation, set
INSTALL_LOCK=truein Gitea configuration so the web installer cannot be run again.
Generate unique, long values for SECRET_KEY and INTERNAL_TOKEN. Treat them as credentials: store them in your password manager and include the configuration containing them in protected backups.
When to use PostgreSQL or MySQL
SQLite keeps a small deployment simple because there is no separate database service. Move to PostgreSQL or MySQL when concurrent writes, team activity, actions, packages, or reporting make a separate database worthwhile. Keep database credentials out of publicly readable Compose files where possible.
If you use PostgreSQL, pin the database image’s major version. PostgreSQL does not automatically upgrade an existing data directory when the image major version changes. A later major upgrade requires pg_upgrade or a dump-and-restore process. Changing the image tag without that migration can prevent the database from starting.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Install Gitea from a binary with systemd
A binary installation is useful when the host already has a service-management, logging, and patching standard. Gitea documents Linux architecture choices, a dedicated git user, /var/lib/gitea data directories, restrictive /etc/gitea permissions, and systemd startup.
- Create a system user and group named
gitwithout an interactive shell for routine service operation. - Create
/var/lib/giteaand the required subdirectories, assigning them togit:git. - Download the binary matching the VPS architecture. The current installation documentation gives version 28.1.0 as an example; use the release you have deliberately selected rather than copying that number blindly.
- Verify the release before installation. Starting with v1.27, Gitea signs all binaries with Sigstore to protect against unwanted modification. A successful
cosign verify-blobcheck returnsVerified OK. Gitea also documents GPG verification; use the method and release files supplied for the version you downloaded. - Install the executable as
/usr/local/bin/giteaand keep that generic filename. Upgrades can then replace the file without changing the service unit. - Create
/etc/gitea, placeapp.inithere, make the directory non-writable by ordinary users, and restrict the configuration file because it contains database credentials and signing secrets. - Install a systemd unit that starts Gitea as
git, enables it at boot, and writes logs to the system journal. Runsystemctl daemon-reload,systemctl enable --now gitea, and inspectsystemctl status gitea.
Stop the service before replacing the binary during an upgrade. Keep the old binary until the new one has started successfully and the browser, clone, and database checks have passed.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Put Gitea behind nginx and HTTPS
Set the canonical URL
In Gitea’s configuration, set:
[server]
ROOT_URL = https://git.example.com/
The trailing slash and hostname must match the public address users actually visit. A mismatch creates incorrect clone URLs, callback addresses, redirects, and links in email.
Configure proxy forwarding
The proxy must preserve encoded paths, pass the original Host and X-Forwarded-Proto, and forward WebSocket upgrade headers. A minimal nginx server block is:
server {
listen 80;
server_name git.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name git.example.com;
ssl_certificate /etc/ssl/gitea/fullchain.pem;
ssl_certificate_key /etc/ssl/gitea/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 3600;
}
}
Use a certificate containing the complete chain. Test the nginx configuration before reloading it, and keep port 3000 bound to localhost or a private firewall rule once the proxy works.
Obtain and renew a certificate
You can terminate TLS with nginx, Apache, or Caddy, or use Gitea’s built-in ACME support. With Docker, set ACME_DIRECTORY=/data/gitea/https so the ACME account and certificate cache live on the persistent volume. If that directory is ephemeral, recreating the container can erase the cache and repeatedly request certificates.
Let’s Encrypt limits certificates to five per week for the same set of domains, according to the limit cited in Gitea’s documentation. Test renewal with a staging endpoint or an existing certificate before repeatedly recreating a production container.
Initial security hardening
- Keep Gitea and the operating system patched, and subscribe to release and security notices.
- Run the application under the dedicated
gitaccount or the non-root container user; never make the service root-owned merely to bypass a volume permission problem. - Set
INSTALL_LOCK=true, strong unique secrets, and a restrictive mode on/etc/giteaandapp.ini. - Disable unused public registration, federation, package types, or actions features according to your threat model.
- Use SSH keys or strong password-plus-MFA policies for administrators. Give collaborators the least repository and organization permissions they need.
- Allow only the reverse proxy and required SSH port through the firewall. Do not expose Docker’s database or management sockets.
- Monitor disk usage, memory, certificate expiry, service restarts, failed logins, backup jobs, and database health.
Back up Gitea correctly
Gitea’s documentation states: “To ensure the consistency of the Gitea instance, it must be shutdown during backup.” Schedule a maintenance window, stop the container or systemd service, and then create the backup.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Use the Gitea 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 user and environment that normally runs Gitea, and write the archive to storage with sufficient free space. Copy the finished archive off the VPS before restarting the service.
For MySQL or PostgreSQL, native mysqldump or pg_dump may be preferable. Coordinate those dumps with the stopped application, retain the Gitea configuration and repository data alongside the database dump, encrypt backups at rest, and restrict access to the encryption keys.
Restore and rehearse
- Provision a clean host with the same or a compatible Gitea release.
- Stop Gitea before replacing files.
- Unpack the archive, restore the database using the documented credentials, and put configuration, custom files, data, and repositories in their intended paths.
- Fix ownership and permissions for the service account.
- Start Gitea and inspect logs, repository counts, attachments, authentication, and hooks.
- If installation paths changed, regenerate repository hooks as documented by Gitea.
- Perform a browser login, HTTPS clone, SSH clone, push, and pull before declaring the recovery complete.
There is no promised one-command automated recovery procedure. Keep a written runbook with archive locations, file paths, database names, credentials, encryption-key access, and the exact service-start commands. Perform a restore rehearsal periodically; a backup that has never been restored is an assumption, not evidence.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsUpgrade without losing data
Docker upgrade
- Read the release notes and check database compatibility.
- Stop writes or schedule a maintenance window and complete a verified backup.
- Change the Compose image to the intended pinned tag.
- Pull and recreate with
docker compose pullfollowed bydocker compose up -d. - Watch
docker compose logs -f giteafor migrations or errors, then test login, a web clone, an SSH clone, push, large upload, and notifications.
Never delete the host-mounted data directory as part of a container refresh. If the new release fails, preserve logs and the backup, stop the service, and roll back only after checking the release’s downgrade guidance.
Binary upgrade
- Back up the complete instance and verify the archive.
- Download and verify the new binary’s Sigstore or GPG signature.
- Stop Gitea with systemd.
- Replace
/usr/local/bin/giteawithout changing the generic filename. - Start the service, monitor migrations and journal output, and run functional tests.
Do not skip a required database migration or downgrade casually after migrations have run. Keep a maintenance record containing the old and new versions, backup name, migration result, and test results.
Operational tests and troubleshooting
The web page works but clone URLs are wrong
Check ROOT_URL, the proxy’s Host and X-Forwarded-Proto headers, and whether Gitea believes the request is HTTPS. Correct the setting, restart or reload Gitea as required, and generate a fresh clone URL.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
SSH cloning fails
Confirm that the host port mapped to container port 22 is reachable, the firewall permits it, the user’s public key is present, and the generated SSH URL includes the nonstandard port. Test with verbose SSH output from a workstation. Do not open a second public SSH service merely to mask a mapping error.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUploads or WebSockets fail through nginx
Check proxy request-size limits and timeouts for large files. Confirm that Upgrade and Connection are forwarded and that the proxy preserves encoded paths. Test notifications and a large attachment, not just the login page.
The container cannot write data
Inspect the host directory owner and compare it with the UID and GID configured for the selected image. Correct ownership on the mounted directory; switching between rootful and rootless image families without a migration is unsupported.
PostgreSQL will not start after an image change
Check whether the major version changed. PostgreSQL data directories are not upgraded automatically. Restore the prior image or perform the documented pg_upgrade or dump-and-restore migration before attempting the new major version again.
Certificates are requested repeatedly
Verify that the ACME directory is on persistent storage, that renewal has network access, and that you are not recreating a container with an empty /data/gitea/https. Respect the five-certificates-per-week limit for an identical domain set.
Capacity, cost, and ongoing administration
The VPS cost is determined by the provider and by your required CPU, memory, storage, transfer, snapshots, and backup destination; the cited Gitea material does not establish a universal VPS size or throughput benchmark. Start with enough persistent disk for current repositories plus growth and at least one temporary backup, then measure memory, database load, repository operations, and disk consumption.
As usage grows, separate the database and backup workloads, add monitoring and alerting, review firewall rules, and stage upgrades on a copy of production data. Keep one backup off the VPS and periodically prove that it can be decrypted, unpacked, restored, and used for real Git operations.
Recommended decision
For a personal project or small team, use Docker Compose, a pinned Gitea image, SQLite, one persistent /data volume, an HTTPS reverse proxy, and an off-host backup schedule. For a busy or expanding team, use PostgreSQL or MySQL, separate database and repository backup procedures, stricter network controls, monitoring, and staged upgrades. Choose the binary route when host-managed systemd services and package-like lifecycle control matter more than container portability.
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.
Recommended Free Tools

