{"id":1940,"date":"2026-08-15T03:49:52","date_gmt":"2026-08-14T22:19:52","guid":{"rendered":"https:\/\/kwikserver.com\/tutorials\/basic-setup-guide-for-fresh-ubuntu-server\/"},"modified":"2026-08-15T03:49:52","modified_gmt":"2026-08-14T22:19:52","slug":"basic-setup-guide-for-fresh-ubuntu-server","status":"publish","type":"post","link":"https:\/\/kwikserver.com\/tutorials\/basic-setup-guide-for-fresh-ubuntu-server\/","title":{"rendered":"Basic Setup Guide for a Fresh Ubuntu Server"},"content":{"rendered":"<p>Spinning up a new Ubuntu server is only the first step &mdash; a few basic configuration tasks up front will make your server more secure and easier to manage long-term. Here&#8217;s a straightforward walkthrough for getting a fresh Ubuntu VPS ready for real use.<\/p>\n<h2>1. Log In as Root<\/h2>\n<p>Connect to your server over SSH using its public IP address and your root password or private key:<\/p>\n<pre><code>ssh root@your_server_ip<\/code><\/pre>\n<p>Accept the host authenticity prompt if it appears, then authenticate with your password or SSH key.<\/p>\n<p>The root account has unrestricted privileges on the system, which also makes it dangerous for everyday use &mdash; a single mistyped command can cause serious damage. The next step is to set up a regular user account for day-to-day work.<\/p>\n<h2>2. Create a New User<\/h2>\n<p>While logged in as root, create a new user account (replace <code>sammy<\/code> with whatever username you prefer):<\/p>\n<pre><code>adduser sammy<\/code><\/pre>\n<p>You&#8217;ll be prompted to set a password and, optionally, fill in a few extra details &mdash; feel free to leave those blank.<\/p>\n<h2>3. Grant Administrative (sudo) Privileges<\/h2>\n<p>Rather than switching back and forth between your new user and root, add the new account to the <code>sudo<\/code> group so it can run privileged commands when needed:<\/p>\n<pre><code>usermod -aG sudo sammy<\/code><\/pre>\n<p>From now on, prefixing a command with <code>sudo<\/code> runs it with administrative rights.<\/p>\n<h2>4. Set Up a Basic Firewall<\/h2>\n<p>Ubuntu ships with UFW (Uncomplicated Firewall), which makes it easy to restrict incoming connections to just the services you actually need. Check which application profiles are registered:<\/p>\n<pre><code>ufw app list<\/code><\/pre>\n<p>Make sure SSH stays allowed before you enable the firewall, or you&#8217;ll lock yourself out:<\/p>\n<pre><code>ufw allow OpenSSH\nufw enable<\/code><\/pre>\n<p>Confirm the rule is active:<\/p>\n<pre><code>ufw status<\/code><\/pre>\n<p>Any additional services you install later (a web server, a database, etc.) will need their own <code>ufw allow<\/code> rule before traffic can reach them.<\/p>\n<h2>5. Enable SSH Access for Your New User<\/h2>\n<p>Stay logged in as root until you&#8217;ve confirmed the new account works &mdash; that way you can troubleshoot from root if something goes wrong.<\/p>\n<p><strong>If your root account uses password login<\/strong>, just SSH in with the new username from a separate terminal session:<\/p>\n<pre><code>ssh sammy@your_server_ip<\/code><\/pre>\n<p>Run <code>sudo<\/code> before any command that needs elevated privileges; you&#8217;ll be prompted for your regular user&#8217;s password. For better security long-term, consider switching to SSH key authentication instead of passwords.<\/p>\n<p><strong>If your root account uses SSH keys<\/strong>, copy the authorized keys into the new user&#8217;s home directory so key-based login works for them too:<\/p>\n<pre><code>rsync --archive --chown=sammy:sammy ~\/.ssh \/home\/sammy<\/code><\/pre>\n<p>Be careful not to add a trailing slash after <code>~\/.ssh<\/code> &mdash; that changes what rsync copies. Once done, you should be able to log in as the new user without a password:<\/p>\n<pre><code>ssh sammy@your_server_ip<\/code><\/pre>\n<h2>Where to Go From Here<\/h2>\n<p>With a non-root user, sudo access, and a basic firewall in place, your server has a solid foundation. From here you&#8217;re ready to install whatever software your project needs.<\/p>\n<p>Need somewhere to practice this? KwikServer&#8217;s <a href=\"https:\/\/kwikserver.com\/linux-vps.php\">Linux VPS plans<\/a> give you full root access on a fresh Ubuntu image.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A first-boot checklist for a new Ubuntu VPS: creating a sudo user, locking down SSH, and enabling a basic firewall.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[20],"tags":[],"class_list":["post-1940","post","type-post","status-publish","format-standard","hentry","category-linux"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts\/1940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/comments?post=1940"}],"version-history":[{"count":0,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/posts\/1940\/revisions"}],"wp:attachment":[{"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/media?parent=1940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/categories?post=1940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kwikserver.com\/tutorials\/wp-json\/wp\/v2\/tags?post=1940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}