How To Open Website On Startup with a Raspberry Pi

by Danny


Want to automatically launch a full-screen Chrome browser on your Raspberry Pi after it reboots?

If so, then this guide is for you.

Keep in mind, there are a number of different ways to do this. We still want the ability to use the Raspberry PI OS desktop like normal so this is the route we’ve chosen to go with. It’s far the easiest method we could find and is one of the cheapest ways to create a dashboard in your house without needing to hook up an extra computer.

Raspberry Pi Auto Open Website Use Cases

There are a number of reasons you might want to automatically launch a website on startup. This works for both internal URL’s and actual websites.

Here’s some examples:

For purposes of this guide, we are using our Raspberry Pi to display our Microsoft Teams Chats via URL.


You will need a Raspberry Pi device loaded with the latest version of Raspberry Pi OS 32-bit with Desktop and recommended software. If you haven’t installed Raspberry Pi OS yet, you can follow our Raspberry Pi OS Installation guide using Balena Etcher.

You also need to connect your raspberry pi to your network/internet.

Equipment List

If you want to purchase the parts separately, here is what we recommend:

No products found.

If you want to purchase everything as a kit, here’s what we recommend:

Vilros Raspberry Pi 4 4GB Basic Kit with Fan Cooled Case
  • KEEP YOUR PROCESSOR COOL: The busier a processor gets, the more it heats up, leading to suboptimal performance. To prevent this common issue, we’ve included a pre-installed and ready-to-connect fan in the case. Also included are a set of 4 heat sinks that can help to passively expel heat from your setup. These cooling mechanisms will help push the limits of your processor and increase its flexibility.
  • SIZABLE RAM: This Raspberry Pi 4 comes equipped with 4GB of RAM, which is the same amount of RAM many mainstream laptops contain. With 2GB of RAM, your processor will be capable of running retro gaming setups and common computer applications, media players and much more!

Step by Guide To Automatically Launch URL On Startup with Raspberry PI Os

Before following this guide, we recommend opening this URL from the Chromium web browser on the Raspberry Pi.

Doing that will allow you to copy/paste the code below instead of manually typing it out.

Update your Raspberry PI

1. To update your Rasberry Pi OS, open a terminal and type. Hit enter after the first line.

sudo apt update
sudo apt full-upgrade

2. Next, you’ll need to configure the Chromium browser to open websites in full screen. Open a terminal and type this to get to the configuration setting:

cd .config

3. That should open the hidden configuration directory in your Pi user directory. Next, create the lxsession and lxde-pi directories. If you receive an error, then this folder already exists but if you’re setting up a brand new Pi – it won’t be there yet.

sudo mkdir -p lxsession/LXDE-pi

4. This next line opens a folder called autostart.

sudo nano lxsession/LXDE-pi/autostart

5. Paste the code below into the nano text editor. On the very last line, change the URL to the website you want to automatically open on startup or after a reboot.

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
@chromium-browser --start-fullscreen --start-maximized

5. Press CTRL+X to exit the nano text editor. Then press Y, then Enter to accept and save the “autostart” file.

Set default URL in Chromium Settings

During our test, we were able to get Chromium to launch in full screen with the website we specified. If you plan on changing the URL frequently, another route is to NOT specify a URL in the configuration but instead manage it through the Chrome browser.

To do this, you can change the default Chromium URL to

  1. Open Chromium. (If already maximized, click the X first.)
  2. Click the 3 dots on the far right to Customize and control Chromium.
  3. Settings > On Startup > Open a specific set of pages.
  4. Site Url:

Test Automatically Opening Website On Raspberry Pi On Startup

After you’ve created the autostart file and set the default webpage, it’s time to test it out by rebooting your device.

To reboot your Raspberry Pi, click the raspberry icon in the top left corner > Shutdown > Restart.

If all goes well – the URL you specified should launch automatically in a full screen Chromium browser window! You can now display any website in the world as a dashboard for your smarthome, office, or garage.

Final Step

Now that you are able to get your Raspberry Pi to automatically launch a webpage after it reboots, the last step is to disable screenblanking or turn off the sleep settings.

Other Helpful Articles

My Homelab Equipment

Here is some of the gear I use in my Homelab. I highly recommend each of them.

The full list of server components I use can be found on my Equipment List page.


You may also like


Pobzeb October 14, 2020 - 9:32 pm

Just a comment about your URL not working in the autostart file. You need to make sure that the chromium command and the URL are all on the same line (no newline after the –start-maximized argument. Thanks for a great tutorial!

Danny October 14, 2020 - 10:18 pm

Thanks for the tip! I updated my doc and confirmed that your solution works perfectly.

Teresa May 20, 2021 - 1:46 pm

Regarding step 5, what if you don’t care if the screen is maximized? I just want the Pi to go to a youtube channel and play the music there.

Danny May 21, 2021 - 7:24 pm

You can just delete these so it doesn’t open in full screen or maximized: –start-fullscreen –start-maximized

Killproc July 22, 2021 - 6:39 pm

Install Unclutter and edit the LXDE autostart script:
sudo apt-get install unclutter
nano ~/.config/lxsession/LXDE-pi/autostart

Turn the cursor Off by adding the following line:
@unclutter -idle 2

Dan B October 19, 2021 - 10:31 pm

Would really like to know how I can automate logging into a web page. We have a Cisco Dashboard we’d like to monitor and they use angular.js login, where the login and the password are on 2 different pages.. (Enter username only, then enter, then on new page enter your password only, then enter)
This has been stumping me as I can’t use the typical plain txt in the URL, it fails to log in.
Making the login/password visible to users/public is a non-issue as it’s a generic user account with no permissions..

Any help to stitch this together would be amazing! Thank you in advance!!

Danny October 19, 2021 - 10:42 pm

You may be able to use Powershell and Selenium to fill out the username and password.

wesley November 24, 2021 - 12:52 am

Hi, is it possible to navigate between different URL with chrome browser on raspberry pi? On startup, eg, load google news then after 1 minute, it will load google finance url, after 1 minute load weather url.

is this doable on raspberry pi? appreciate your advice!

thank you!

Danny December 3, 2021 - 9:48 am

Yes it is, but you’ll need to download a Chromium extension called Revolver-Tabs:

Greg Quenemoen April 22, 2022 - 5:02 pm

I’m trying to autoload a published Google Slideshow, and I get a page I get a Page Unresponsive message, and I hit Exit Page. Then I reload page and it plays.

tom June 3, 2022 - 4:59 am

In my situation the power will cut off at midnight.
Every time in the morning when my Raspberry Pi wakes up it opens Chromium with the notification : Chromium was not shut off correctly… instead of my desired URL.
Anyone a suggestion how I can get rid of that notification???

Roberto September 5, 2022 - 4:56 am

Hello. Is there a command to have the website refresh every X minutes?

Danny September 16, 2022 - 5:37 pm

Possibly, but without googling for you I’m not sure. I just use a Chrome extension called Refresher to do that.

Vishnu September 16, 2022 - 1:30 am

Sir This was wonderful!! Neat and clean .. Only one this I wanna login directly to the website nagios , where it is asking credentials username and password , please help with code , where i could enter those
can I have it pre-entered so that i dont want to enter it again by connecting keyboard and Mouse… please suggest in your freeTime

Grant September 30, 2022 - 3:13 pm

Thanks very much for this, it was just what I was after!
Is it possible to add a delay before the webpage loads? I want to start a webpage that is rendered by Node Red which takes about 20 seconds.
Thanks again!


Leave a Comment