Back to Blog

    Microsoft 365

    Running a Replit app in Switzerland: Azure and alternatives

    Where a Replit app can run with its data in Switzerland: our recommended Azure Switzerland North set-up, the alternatives, data flows and migration steps.

    March 7, 20266 min read
    Marcel Haas

    Marcel Haas

    Solution Architect, CEO

    marcel.haas@cnext.ch
    CNEXT Microsoft Partner
    In this article

    Replit is a development environment. Where the finished application runs is a separate architecture decision. Replit's privacy policy says that its services are primarily hosted in the US and that data may also be processed in other countries. Our recommendation for applications that handle personal data: develop on Replit and run production in Azure Switzerland North (Zurich), with the database, files, secrets and logs in the same region.

    Map the data flows first

    An app can run on servers in Switzerland while source code, prompts, development data or external services are processed elsewhere. Before choosing a provider, list your application's components:

    ComponentQuestion for the location review
    Web app and APIIn which region do the production processes run?
    Database and filesWhere are primary data, replicas and backups stored?
    Logs and monitoringDo they contain names, IDs, content or error messages with personal data?
    CDN, email and external APIsWhere are requests or user data transferred?
    Development with ReplitWhich data ends up in code, test data and AI prompts?
    Support and administrationWho can access systems, and from which countries?

    A Swiss location for the web app answers only the first question. For a data protection decision, the remaining data flows, contracts and organisational measures must be reviewed as well. Switzerland's Federal Data Protection and Information Commissioner explains outsourcing responsibilities.

    Four architecture options

    OptionWhere the app runsWhere the data isSuitable for
    Hosting on ReplitReplitPrimarily the US, not SwitzerlandPrototypes and demos without personal data
    Replit behind a reverse proxyReplit, with a proxy in frontApplication data still flows to ReplitOwn domain, caching and DDoS protection for less sensitive data
    HybridFront end on Replit, back end and API in Azure SwitzerlandDatabase in Azure SwitzerlandStatic front ends without personal data
    Azure Switzerland (our recommendation)Azure Switzerland NorthAzure Switzerland North, geo-redundant copies in Switzerland WestApplications with personal data, documents or customer requirements for Swiss hosting

    Our approach: Replit for development, Azure Switzerland for production

    You keep developing and testing on Replit. The finished application runs in Azure Switzerland North in Zurich; geo-redundant storage (GRS) replicates within Switzerland to Switzerland West in Geneva. GitHub Actions handles the transfer from Replit to Azure. This way you decide where each component runs, and the app can use Microsoft Entra ID for sign-in, with single sign-on for Microsoft 365. As a Microsoft partner, we support architecture, migration and operation.

    This is how we typically map the building blocks. Create regional services in Switzerland North:

    Building block of the Replit appAzure service
    Web app with Node.js, Python, .NET or JavaAzure App Service, which takes over the role of Replit Deployments
    Containers and microservicesAzure Container Apps; for complex architectures, Azure Kubernetes Service (AKS)
    Webhooks and scheduled tasksAzure Functions
    Relational dataAzure Database for PostgreSQL or Azure SQL Database
    NoSQL dataAzure Cosmos DB
    Uploads, images, documentsAzure Blob Storage with hot, cool and archive tiers
    API keys, certificates, connection stringsAzure Key Vault
    Sign-in and single sign-onMicrosoft Entra ID
    Monitoring and logsAzure Monitor, Application Insights, Log Analytics
    Protection against attacksAzure Web Application Firewall, Azure DDoS Protection

    Step by step from Replit to Azure Switzerland

    1. 1Prepare the application: separate front end and back end cleanly, configure through environment variables rather than hard-coded secrets, use a Dockerfile or standard buildpacks, keep the Git repository in sync. The goal is a runnable application with documented dependencies and environment variables.
    2. 2Set up the Azure environment: Azure subscription, resource group in Switzerland North, App Service plan or Container Apps, managed identity for authentication.
    3. 3Set up storage and database: create a Blob Storage account in Switzerland North, choose a database service (PostgreSQL, SQL or Cosmos DB), export the data from the Replit database and import it, store connection strings and storage keys in Azure Key Vault.
    4. 4Automate deployment: a GitHub repository as the intermediate step, a GitHub Actions workflow, automatic deployment on every push to the main branch, a staging environment for tests.
    5. 5Test outside Replit: check build, start-up, migration, backup and recovery before you switch production over.

    Reverse proxy: what it does and what it doesn't

    A reverse proxy in front of the Replit app, such as Cloudflare or Azure Front Door, gives you control over the domain, SSL, caching and geoblocking without moving the application. Cloudflare processes traffic data on global edge servers, and the actual application data still flows to Replit. With a database in Azure Switzerland, the stored data is in Switzerland, but it is still processed by the application at Replit. If you want to route all traffic through Swiss infrastructure, you can run your own reverse proxy with Caddy or Nginx on a Swiss VPS. Even then, the application itself runs at Replit.

    Alternatives to Azure

    PlatformLocationWhat to check
    AWSZurich, region eu-central-2That every service you need is available in the region
    Google CloudZurich, region europe-west6Set the regions for compute, database and storage individually
    Swiss container providersDepends on the providerOwnership, subprocessors, support access and recovery against current contracts

    When moving to Azure Switzerland pays off

    • The app processes personal data.
    • Files and documents need to be stored.
    • Regulatory requirements apply, for example under FINMA supervision or in healthcare.
    • Business customers require Swiss hosting.

    What we look after in operation

    1. 1Document data locations: which data is stored where.
    2. 2Encryption: TLS 1.3 for data in transit, AES-256 for stored data.
    3. 3Grant access on the principle of least privilege.
    4. 4Keep all secrets and API keys in Azure Key Vault in the Swiss region.
    5. 5Run monitoring with Azure Monitor and Log Analytics in the Swiss region.
    6. 6Keep backups geo-redundant within Switzerland (GRS between Zurich and Geneva).
    7. 7Conclude and review data processing agreements with all providers.
    8. 8Set up storage lifecycle policies for archiving and deletion after retention periods.

    What to bear in mind

    “Hosted in Switzerland” applies to the components that actually run there; a Swiss location does not replace a data protection review of the other data flows. Check for every service you need whether it is available in the chosen region, and set the regions for compute, database, storage, backups and logs individually. Development on Replit remains a data flow of its own: code, test data and AI prompts are processed there.

    Sources

    ReplitAzure AISchweizDSGMicrosoft 365ComplianceMigration
    Teilen:

    AI tools may have supported the creation of this article. CNEXT is responsible for the published content. Product features and prices can change; check the linked primary sources for current details.

    Marcel Haas

    Marcel Haas

    Solution Architect, CEO

    6x Microsoft Applied Skills

    Discuss your hosting architecture

    We plan with you where the components of your Replit app run and support the migration to Azure Switzerland through to operation.