A password of 12 or more
The template refuses anything shorter, because the SSH port faces the internet.
Selfhost.dev runs a Docker SSH server as a one-click template: OpenSSH in its own container, with your own Linux user, sudo and port 2222, on a dedicated server we provision, secure and run. It stays separate from the server's own shell.
No Dockerfile, no compose file and no port to map by hand.
OpenSSH is the standard SSH server. This template runs it in a container of its own, so you get a Linux login on its own port without access to the server underneath.
Developers who want a remote Linux shell for scripts and CLI tools. Also teams giving someone SSH access without handing over the whole server.
When a laptop terminal is not enough and you would rather not build, expose and secure an SSH container yourself.
Docker SSH server guides start from a prebuilt image or a Dockerfile, then a compose file, a port, a user and a key. Here all of it is set before you connect.
Your terminal
SSH, port 2222
OpenSSH server
Your Linux user
Home under /config
The server's own shell
| A Docker SSH server by hand | Docker SSH server on Selfhost.dev |
|---|---|
| Pick an image or write a Dockerfile | OpenSSH in its own container |
| Write a compose file and publish a port | Port 2222 or one you choose, already open |
| Create a user and set its password | Your Linux user and password, set at deploy |
| Copy a public key into the container | Your public key, added at deploy |
The port faces the internet, so sign-in is set before the server starts: a password, an optional public key and whether the password still opens SSH.
The template refuses anything shorter, because the SSH port faces the internet.
Paste it in when you deploy. In the same form, switch password sign-in off so only the key opens SSH.
With password sign-in off, only your key opens SSH; sudo inside the container still asks for the password.
The console starts this template on a 4 GB server, the smallest server we offer, on x86 or ARM. You need a username, a password of 12 characters or more and any SSH client.
Launch, connect, get to work.
Set a username, a 12+ character password and an optional port and public key. Accept the no-mining terms. Before a first top-up, an admin approves it. The template deploys in about ten minutes.
Copy the ssh command the console shows and run it in any terminal. Sign in with your password or your key.
Run scripts, CLI tools and long jobs; sudo takes your password. Files in your home under /config stay across restarts.
A Docker SSH server here is one server billed by the hour from prepaid credits, with no fee per user or per connection. A European 4 GB server is $0.02/hr, about $15 to $16 a month.
| Item | Cost |
|---|---|
| The OpenSSH server template | $0 |
| A second SSH server in the same project | $0, it shares the server |
| Bandwidth over SSH | $0, included in the server price |
| Optional daily backups | +20% of the server price |
| Server | RAM, cores, disk | Where | Rate | About a month |
|---|---|---|---|---|
cx23 (recommended) | 4 GB, 2 cores, 40 GB | Europe | $0.02/hr | $15.18 |
cax11 (ARM) | 4 GB, 2 cores, 40 GB | Europe | $0.02/hr | $16.35 |
cpx21 | 4 GB, 3 cores, 80 GB | US | $0.12/hr | $87.75 |
cpx22 | 4 GB, 2 cores, 80 GB | Singapore | $0.10/hr | $72.56 |
cx33 (more room) | 8 GB, 4 cores, 80 GB | Europe | $0.03/hr | $23.36 |
Monthly figures assume 730 hours. The US and Singapore servers need a first top-up.
With a card on file or a past top-up, OpenSSH server runs for 5 more days after your balance reaches zero, then stops. Top up within 24 hours to restart it; after that it is deleted, with a 14-day copy you can restore. Welcome-credit-only servers are deleted at zero.
Price an 8 GB server for heavier jobs in the calculator, no signup.
Shell access to the project server itself is granted on request; it sees every service but has no sudo. This template turns that around.
| Project server shell access | OpenSSH server template | |
|---|---|---|
| You sign in as | A non-root shell user | Your own Linux user |
| sudo | No | Yes, with your password |
| What it reaches | Every service in the project | Its own container |
| How you get it | Granted on request | One click, on its own port |
The console estimates about ten minutes for the OpenSSH server template after the server is ready; first-time server provisioning adds time.
Nothing here in your way? The template deploys in about ten minutes.
Launch OpenSSH serverTell us how many people need a login and what they run. We reply with a layout and its monthly cost.
The console shows the host, the port and a ready ssh command. Run it in any terminal and sign in as dev or the Linux username you chose, never root, with your password or your key. sudo takes the same password.
Yes. Paste a public key in the deploy form and switch password sign-in off in the same form, so only your key opens SSH. Both are chosen at deploy, not later in Settings. The password still exists for sudo inside the container, so keep it somewhere safe.
It is built to be. You sign in as your own Linux user, never root. The password must be at least 12 characters because the port faces the internet. A public key with password sign-in turned off is safer still. The container stays separate from the project server's own shell.
Yes. Each OpenSSH server in a project needs a port of its own, so give the second one a port other than 2222 when you deploy it. Both share the project's server and its price. Use them for two people or two separate environments that should not share a home folder.
Yes. Your home lives under /config, which persists across restarts, so scripts, dotfiles and anything you saved there are still in place when the container comes back. Keep a copy of anything important in a repository or another machine too, so it lives beyond this server.
On an organisation that has never topped up, a platform admin approves each new OpenSSH server before it starts. Its name and port stay reserved and an email tells you the decision. After a top-up, new ones start straight away. Deleting the service withdraws the request.
Selfhost.dev is a managed self hosting platform for developers and small teams. Open source apps and databases on dedicated servers you control, billed by the hour, in six locations across three continents.
Best for: A Linux login beside the editors, notebooks and VPN on the same project, plus managed PostgreSQL, MySQL and Redis.