[{"data":1,"prerenderedAt":108},["ShallowReactive",2],{"seo-verification":3,"marketplace-app-en-golang":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"slug":7,"slugs":8,"categorySlugs":9,"name":13,"description":14,"phase":15,"unavailableReason":16,"docsUrl":17,"logo":16,"github":16,"tagline":18,"longDescription":19,"features":20,"useCases":28,"steps":38,"faq":57,"specs":73,"compatibleOs":81,"relatedApps":82,"relatedPosts":102,"category":105},"golang",{"fr":7,"en":7,"ar":7},{"fr":10,"en":11,"ar":12},"developpement","development","التطوير","Go (Gin) Stack","Go 1.22+, Gin, Nginx and PostgreSQL 16 preconfigured. Deploy your Go API to production in minutes.",1,null,"https:\u002F\u002Fservorbit.com\u002Fblog\u002Fdeploying-a-go-gin-application-on-a-vps","Go 1.22+, Gin, Nginx and PostgreSQL 16 preconfigured — production-ready environment for lightweight Go APIs.","Go (Gin) Stack provisions your VPS with the full toolchain a Go API needs in production: Go 1.22+ installed from the official binary (not the outdated distro package), Gin as the HTTP framework, Nginx as the TLS-terminating reverse proxy, and PostgreSQL 16 as the relational database. No PPA, no buildpack, no runtime dependency on the VPS.\n\nA Go binary compiled with CGO_ENABLED=0 is entirely self-contained: you can cross-compile it on your workstation (GOOS=linux GOARCH=amd64 go build) and deploy it with a single scp. Gin adds a router with zero allocation on hot paths, middleware support, and built-in binding for JSON, form, and multipart payloads. The stack mirrors a production-proven pattern: Nginx terminates TLS with Let's Encrypt, proxies to the Go process listening on loopback, and handles static files from disk. PostgreSQL 16 is available for any data model — use database\u002Fsql directly, pgx, or GORM according to your project's needs.",[21,22,23,24,25,26,27],"Go 1.22+ from the official binary — the latest stable release installed directly from go.dev, not the outdated distro package. Cross-compile locally (GOOS=linux GOARCH=amd64) and deploy without Go installed on the server.","Gin HTTP framework — zero-allocation router, middleware chaining, JSON\u002Fform\u002Fmultipart binding, and context-level error handling. Covers 99 % of REST API patterns without a framework-imposed ORM or template engine.","Nginx reverse proxy — TLS termination via Let's Encrypt (Certbot or Caddy), loopback-only binding for the Go process, gzip compression, and static-file serving without touching the Go binary.","PostgreSQL 16 — the best-supported Go database. Use pgx for async-capable, performance-first access, or database\u002Fsql with the lib\u002Fpq driver for portability. JSONB columns, full-text search, and window functions available from day one.","Minimal memory footprint — a Gin API idles at 15–30 MB. 1 GB RAM is enough for a solo API; 2 GB if PostgreSQL shares the VPS.","Systemd-ready — manage the Go process as a systemd service with automatic restart on failure, journal logging, and resource limits. No process manager dependency.","Production deployment patterns included — the documentation covers cross-compilation, scratch Docker images, Nginx vhost configuration, and TLS setup for the most common deployment scenarios.",[29,32,35],{"title":30,"body":31},"REST API or microservice","Deploy a Gin application as a standalone REST API or microservice. The binary listens on loopback, Nginx terminates TLS, and PostgreSQL backs any data model. Cross-compile on your CI pipeline and deploy the artifact directly — no build toolchain needed on the VPS at runtime.",{"title":33,"body":34},"High-throughput backend","Go goroutines handle thousands of concurrent connections on a single vCPU without the thread-per-request overhead of traditional servers. Bind Gin to loopback, let Nginx handle keep-alive and buffering, and saturate a 1 GB VPS with load that would require a 4 GB instance in a JVM or interpreted language.",{"title":36,"body":37},"Webhook receiver or internal API","Receive GitHub webhooks, Stripe events, or inter-service API calls with a lightweight Gin server. The binary starts in milliseconds — redeployments produce zero perceptible downtime with a systemd restart. No Node runtime, no Python interpreter, no package manager to update on the server.",[39,42,45,48,51,54],{"title":40,"body":41},"Order a ServOrbit VPS","1 GB RAM on Ubuntu 24.04 is enough for a Go API. Add 2 GB if PostgreSQL runs on the same VPS. The Go (Gin) Stack template is available in the marketplace order form — Go 1.22+, Nginx, and PostgreSQL 16 are installed automatically.",{"title":43,"body":44},"Deploy from the marketplace","Go to Marketplace → Development → Go (Gin) Stack and click Deploy. The script downloads Go 1.22+ from go.dev, installs Nginx and PostgreSQL 16, and sets the PATH. No SSH session for the base setup.",{"title":46,"body":47},"Cross-compile and upload your binary","On your workstation: `CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=\"-s -w\" -o app .`. Upload with `scp app root@your-vps:\u002Fopt\u002Fmyapp\u002F`. The binary runs directly — no Go on the server required.",{"title":49,"body":50},"Create a systemd service","Create `\u002Fetc\u002Fsystemd\u002Fsystem\u002Fmyapp.service` with `ExecStart=\u002Fopt\u002Fmyapp\u002Fapp`, `Restart=always`, and your environment variables in `EnvironmentFile=\u002Fopt\u002Fmyapp\u002F.env`. Enable with `systemctl enable --now myapp`.",{"title":52,"body":53},"Configure Nginx and enable HTTPS","Add a Nginx server block with `proxy_pass http:\u002F\u002F127.0.0.1:8080` and run `certbot --nginx -d api.yourdomain.com` for a free Let's Encrypt certificate. Your API is live at `https:\u002F\u002Fapi.yourdomain.com`.",{"title":55,"body":56},"First login","Go (Gin) Stack installs the runtime environment only — your application handles its own authentication. Connect to your API at the domain you configured and test your first endpoint.",[58,61,64,67,70],{"q":59,"a":60},"What is the difference between Go (Gin) Stack and Node.js Stack?","Go compiles to a static binary with no runtime dependency on the server: deploy by copying a single file. Node.js runs the source code through a JavaScript engine with a node_modules tree. Gin handles concurrency via goroutines without threads; Node relies on an event loop. Choose Go for lower memory usage and simpler deployments; choose Node.js for a larger ecosystem and JavaScript full-stack teams.",{"q":62,"a":63},"Do I need Go installed on the VPS to run my application?","No. If you cross-compile with CGO_ENABLED=0 GOOS=linux GOARCH=amd64, the resulting binary is 100 % static and runs without Go on the server. The stack installs Go 1.22+ to let you compile directly on the VPS if preferred, but it is not required for running pre-compiled binaries.",{"q":65,"a":66},"Can I use a framework other than Gin?","Yes. The stack installs the Go toolchain, Nginx, and PostgreSQL — not the framework. Use Echo, Chi, Fiber, or the standard library net\u002Fhttp instead. Gin is recommended in the documentation because of its adoption and zero-allocation router, but the template is framework-agnostic.",{"q":68,"a":69},"What is the minimum RAM for a Go (Gin) API?","1 GB is comfortable for a Gin API without a database. Add 1 GB if PostgreSQL runs on the same VPS. A Gin process typically idles at 15–30 MB; peak memory depends on your handler logic and the size of in-memory caches.",{"q":71,"a":72},"How do I manage the Go process in production?","The recommended approach is a systemd unit: ExecStart pointing to your binary, Restart=always for automatic recovery, and EnvironmentFile for secrets. This gives you journal logging, resource limits, and dependency ordering (e.g., after PostgreSQL). Alternatively, run your binary inside a Docker container with --restart unless-stopped.",{"ram":74,"cpu":75,"stack":76},"1 GB","1 vCPU",[77,78,79,80],"Go 1.22+","Gin","Nginx","PostgreSQL 16",[],[83,90,96],{"name":84,"slug":85,"categorySlug":11,"categoryName":86,"categoryColor":87,"logo":16,"tagline":88,"description":89},"FastAPI Stack","fastapi","Development","text-warning bg-warning\u002F10","Production-ready Python environment — FastAPI, Uvicorn, Gunicorn, Nginx, PostgreSQL 16.","Python 3.12, Uvicorn, Gunicorn, Nginx and PostgreSQL 16 preconfigured. Deploy your FastAPI API to production in minutes.",{"name":91,"slug":92,"categorySlug":11,"categoryName":86,"categoryColor":87,"logo":93,"tagline":94,"description":95},"Node.js Stack","nodejs-stack","https:\u002F\u002Fcdn.simpleicons.org\u002Fnodedotjs","Node.js, PM2, Nginx and a database — a production environment for your JavaScript APIs and apps.","Node.js with PM2, an Nginx reverse proxy and a database. Your JavaScript APIs and applications ready to take traffic.",{"name":97,"slug":98,"categorySlug":11,"categoryName":86,"categoryColor":87,"logo":99,"tagline":100,"description":101},"Laravel Stack","laravel-stack","https:\u002F\u002Fcdn.simpleicons.org\u002Flaravel","PHP-FPM, Nginx, PostgreSQL, Redis and Supervisor — a production-ready Laravel stack from the moment you order.","PHP-FPM, Nginx, PostgreSQL, Redis and Supervisor preconfigured. Deploy Laravel to production with no initial configuration.",[103,104],"deployer-golang-vps","deployer-fastapi-vps",{"key":10,"slug":11,"name":86,"objective":106,"icon":107,"color":87},"Kick off a software project quickly.","dev",1787581039137]