# How do I deploy my ASP.NET app?

https://www.seturack.com/en/knowledgebase/article/how-do-i-deploy-my-aspnet-app

1. In the panel, open **My servers** and click your server.
2. On the **Overview** tab, wait for the **App** row to say "ASP.NET is ready". The page refreshes itself.
3. Open the link in the **Site address** row. The sample Razor page opens.

## Publishing your own project

[Connect over SSH](https://www.seturack.com/en/knowledgebase/article/how-to-connect-with-ssh) and switch to the app user:

`su - app`

Bring your project to the server and publish it:

`dotnet publish -c Release -o ~/uygulama/yayin`

Then go back to root with `exit`. In `/etc/systemd/system/uygulama.service`, replace `kaynak.dll` on the `ExecStart` line with your own file name and run:

`systemctl daemon-reload`

`systemctl restart uygulama`

The app listens on port **5000** and Nginx forwards incoming requests to it.

## Your own domain

1. Point your domain's A record to your server's IP address.
2. Get the certificate: `certbot --nginx -d yourdomain.com`

Certificates renew by themselves.

Only **80**, **443** and **22** for SSH are open to the outside.

**No server yet?** [Order a server with ASP.NET installed](https://www.seturack.com/en/aspnet-vps): you choose the size and pay for what you choose.
